zuoyezhidaoshu

This commit is contained in:
shilixia 2022-02-11 10:47:14 +08:00
parent 7990533f2f
commit 09a938a146
3 changed files with 43 additions and 14 deletions

View File

@ -13,7 +13,7 @@
stripe
highlight-current-row
height="100"
v-el-height-adaptive-table="{ bottomOffset: 42 }"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="index" width="50" />
@ -257,7 +257,7 @@ export default {
_this.mtmId.push(item.material_.id);
_this.materialshow.push(item);
});
this.ordershow = _this.materialshow[0].to_order_.number;
this.ordershow = _this.materialshow[0].order_.number;
this.customershow=_this.materialshow[0].order_.customer_.name;
this.contractshow=_this.materialshow[0].order_.contract_.name;
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(

View File

@ -622,7 +622,7 @@
:headers="upHeaders"
:file-list="fileList"
:limit="1"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>

View File

@ -63,9 +63,17 @@
:visible.sync="drawer"
direction="rtl"
size="70%">
<div class="word-wrap">
<div id="wordView" v-html="wordText" />
</div>
<el-tabs v-model="activeName" @tab-click="handleClick" >
<el-tab-pane
:key="item.file_.id"
v-for="item in techdocList"
:label="item.file_.name"
:name="item.file_.file"
:closable="item.close"
></el-tab-pane>
</el-tabs>
<div class="word-wrap" id = "file"> </div>
</el-drawer>
</el-card>
<el-row gutter="2">
@ -743,7 +751,7 @@ export default {
tprogressData: [],
tool:"",
wordText: "",
pdf:"",
};
},
computed: {},
@ -765,12 +773,15 @@ export default {
checkPermission,
//作业指导书
getWordText() {
this.drawer=true;
const xhr = new XMLHttpRequest();
//选项卡切换
handleClick(tab) {
var str = tab.label.substr(tab.label.length-1,1);
if(str=='x')
{
const xhr = new XMLHttpRequest();
xhr.open("get", this.techdocList, true);
xhr.open("get",tab.name, true);
xhr.responseType = "arraybuffer";
@ -787,12 +798,30 @@ export default {
}
};
xhr.send();
var filediv = document.getElementById('file');
filediv.innerHTML=' <div id="wordView" v-html='+this.wordText+' />';
}
else if (str=='f')
{
this.pdf=tab.name;
var filediv = document.getElementById('file');
filediv.innerHTML=' <iframe width=420 height=330 frameborder=0 scrolling=auto src='+tab.name+'></iframe>';
}
},
getWordText() {
this.drawer=true;
},
readbook(){
gettechdocList({operation:this.id,page:0}).then((response) => {
gettechdocList({operation:this.id,page:0,enabled:true}).then((response) => {
if (response.data) {
this.techdocList= response.data[0].file_.file;
this.techdocList= response.data;
console.log( this.techdocList);
}
});