From c91ea4d8cda53c0f319c9f4306ff03e7c774bca0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 15 三月 2024 16:03:56 +0800
Subject: [PATCH] 业务管理:检验任务(update)
---
src/components/view/b2-standard-template.vue | 48 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/src/components/view/b2-standard-template.vue b/src/components/view/b2-standard-template.vue
index abcfd56..d6ca274 100644
--- a/src/components/view/b2-standard-template.vue
+++ b/src/components/view/b2-standard-template.vue
@@ -40,7 +40,7 @@
<div class="standard-template">
<div>
<el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">妫�楠屾ā鏉�</el-col>
+ <el-col :span="12" style="padding-left: 20px;">鍘熷璁板綍妯℃澘</el-col>
<el-col :span="12" style="text-align: right;">
<el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
</el-col>
@@ -59,11 +59,11 @@
</div>
<div class="table">
<ValueTable ref="ValueTable" :url="$api.StandardTemplate.selectStandardTemplatePageList"
- :upUrl="$api.enums.upEnum" :delUrl="$api.enums.delEnum" :componentData="componentData" :key="upIndex" />
+ :upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" :componentData="componentData" :key="upIndex" />
</div>
- <el-dialog title="妯℃澘缂栧埗" :visible.sync="isShow" width="80%">
+ <el-dialog title="妯℃澘缂栧埗" :visible.sync="isShow" width="80%" :before-close="isClose">
<div style="width: 100%;height: 80vh;overflow: auto;" v-if="isShow">
- <Excel></Excel>
+ <Excel :data="row.thing" :title="row.name" v-loading="loading"></Excel>
</div>
</el-dialog>
</div>
@@ -95,7 +95,7 @@
font: '缂栬緫',
type: 'text',
method: 'doDiy',
- field: ['createUserName', 'updateUserName']
+ field: ['createUserName', 'updateUserName','thing']
}, {
id: 'delete',
font: '鍒犻櫎',
@@ -115,7 +115,13 @@
upIndex: 0,
addDia: false,
addPower: true,
- isShow: false
+ isShow: false,
+ loading: false,
+ row: {
+ id: null,
+ thing: null,
+ name: null
+ }
}
},
mounted() {
@@ -161,11 +167,37 @@
},
templateWrite(row) {
this.isShow = true
+ this.row = row
},
closed(){
- let data = luckysheet.getAllSheets()
+ this.loading = true
+ let data = luckysheet.toJson()
console.log(data);
+ this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{
+ id: this.row.id,
+ thing: JSON.stringify(data),
+ name: luckysheet.getWorkbookName(['name'])
+ },{
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res=>{
+ if (res.code==201) return
+ this.loading = false
+ this.$message.success('宸蹭繚瀛�')
+ this.isShow = false
+ this.refreshTable()
+ })
+ },
+ isClose(done){
+ this.$confirm('鏄惁闇�瑕佷繚瀛�?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.closed()
+ }).catch(()=>{done()})
}
}
}
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3