| | |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.StandardTemplate.selectStandardTemplatePageList" |
| | | :upUrl="$api.StandardTemplate.upStandardTemplate" :delUrl="$api.StandardTemplate.delStandardTemplate" :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%" :before-close="isClose"> |
| | | <div style="width: 100%;height: 80vh;overflow: auto;" v-if="isShow"> |
| | |
| | | this.isShow = true |
| | | this.row = row |
| | | }, |
| | | closed(){ |
| | | closed() { |
| | | this.loading = true |
| | | let data = luckysheet.toJson() |
| | | this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{ |
| | | delete data.title |
| | | delete data.container |
| | | delete data.lang |
| | | delete data.showsheetbar |
| | | delete data.showstatisticBarConfig |
| | | delete data.enableAddRow |
| | | delete data.enableAddBackTop |
| | | delete data.showtoolbarConfig |
| | | delete data.cellRightClickConfig |
| | | delete data.myFolderUrl |
| | | delete data.functionButton |
| | | if(data.data[0].config.borderInfo != undefined){ |
| | | for (var i = 0; i < data.data[0].config.borderInfo.length; i++) { |
| | | let str = data.data[0].config.borderInfo |
| | | if (str[i].rangeType === 'range') { |
| | | if (str[i].borderType === 'border-none') { |
| | | data.data[0].config.borderInfo.splice(i, 1) |
| | | i -= 1 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | 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 |
| | | }).then(res => { |
| | | if (res.code == 201) return |
| | | this.loading = false |
| | | this.$message.success('已保存') |
| | | this.isShow = false |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | isClose(done){ |
| | | isClose(done) { |
| | | this.$confirm('是否需要保存?', "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.closed() |
| | | }).catch(()=>{done()}) |
| | | }).catch(() => { |
| | | done() |
| | | }) |
| | | } |
| | | } |
| | | } |