update code

prv
haha 2024-04-29 23:00:47 +08:00
parent 5c3c325d71
commit 16a0bb92f7
3 changed files with 28 additions and 4 deletions

View File

@ -83,7 +83,9 @@
</el-col> </el-col>
<el-col :span="fontSize==2?12:12" class="item-data"> <el-col :span="fontSize==2?12:12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">材料名称:</span> <img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">材料名称:</span>
<div class="div-text">{{ it.materialName }}</div> <div class="div-text">{{ it.materialName }}
<el-link v-if="it.attachmentFiles && it.attachmentFiles.length>0" type="primary" @click="downFiles(it.attachmentFiles)"></el-link>
</div>
</el-col> </el-col>
<el-col :span="fontSize==2?12:12" class="item-data"> <el-col :span="fontSize==2?12:12" class="item-data">
<img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">使用部位:</span> <img src="images/title_icon.png"><span class="sp-lbl sp-lbl2">使用部位:</span>
@ -176,6 +178,13 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
downFiles(files){
files.forEach(item=>{
if (item) {
this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/") + 1));
}
})
},
handleCurrentChange(n) { handleCurrentChange(n) {
this.index = n; this.index = n;
this.loadData(); this.loadData();
@ -193,8 +202,11 @@ export default {
...this.opt ...this.opt
},this.size,this.index).then(d=>{ },this.size,this.index).then(d=>{
this.total=d.total||0; this.total=d.total||0;
this.dataTable=d.rows||[]; this.dataTable=(d.rows||[]).map(it=>{
this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][opt.checkType||0]+`[${this.dataTable.length}]`; it.attachmentFiles=this.$tryToJson(it.attachment,[]);
return it;
});
this.title="材料进场取样复试-"+['汇总','钢筋原材料','钢筋试拉件','混凝土试件','其他'][this.opt.checkType||0]+`[${this.dataTable.length}]`;
}); });
} }
}, },

View File

@ -91,6 +91,9 @@
</div> </div>
</div> </div>
<div v-if="row.attFiles && row.attFiles.length>0">
<el-link type="primary" @click="downFiles(row.attFiles)"></el-link>
</div>
</div> </div>
</div> </div>
@ -120,10 +123,18 @@ export default {
}, },
methods: { methods: {
downFiles(files){
files.forEach(item=>{
if (item) {
this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/") + 1));
}
})
},
download(it) { download(it) {
window.open(it.insuranceFile) window.open(it.insuranceFile)
}, },
showDialog(row) { showDialog(row) {
row.attFiles=this.$tryToJson(row.checkingFiles,[]);
this.row = row; this.row = row;
this.images = this.getBigProfileImage(row); this.images = this.getBigProfileImage(row);
this.show = true; this.show = true;

View File

@ -46,7 +46,8 @@ module.exports = defineConfig({
} }
}, },
'/profile':{ '/profile':{
target: `http://szgc.jhncidg.com/jhapi/profile`, //target: `http://szgc.jhncidg.com/jhapi/profile`,
target: `http://62.234.3.186/profile/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/profile':'/' '^/profile':'/'