| | |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button plain size="small" type="primary" @click="Enable">启用</el-button> |
| | | <el-button plain size="small" type="primary" @click="Deactivate">停用</el-button> |
| | | <el-button plain size="small" type="primary" @click="ImportExcel">导入</el-button> |
| | | <el-button plain size="small" type="primary" @click.native="ImportExcel">导入</el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel">导出</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <ThemeImport :visible.sync="ThemeImportVisible"></ThemeImport> |
| | | <!-- 导出--> |
| | | <ThemeImport :visible.sync="ThemeImportVisible" :codeClassifyOid="this.codeClassifyOid"></ThemeImport> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | //导入状态框 |
| | | ThemeImportVisible:false, |
| | | selectRow:'', |
| | | selectList:[], |
| | | //树节点显示隐藏 |
| | | TreeFlagCode:false, |
| | | //编码规则 |
| | |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "模板编号", |
| | |
| | | methods: { |
| | | /** 导入 */ |
| | | ImportExcel(){ |
| | | // debugger |
| | | // this.batchImportData.visible = true |
| | | // this.batchImportData.codeClassifyOid = this.codeClassifyOid |
| | | this.ThemeImportVisible=true; |
| | | console.log('ThemeImportVisible',this.ThemeImportVisible) |
| | | }, |
| | | /** 导出 */ |
| | | ExportExcel(){ |
| | |
| | | this.crudOid=row.oid; |
| | | this.crudLCStatus=row.lcStatus; |
| | | this.crudArray.push(row); |
| | | console.log(row.$index) |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => { |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | |
| | | //定义一个模板属性id,数据是模板管理表格里面的oid |
| | | if(data.parentId == ""){ |
| | | this.TreeFlagCode=true; |
| | | |
| | | } |
| | | this.nodeClickList = data |
| | | this.ProData=[] |
| | | this.selectRow=0; |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | | this.FlagObj = res.data.data |
| | |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | }) |
| | | console.log('form',this.Formlist) |
| | | if(this.Formlist.length >= 1){ |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | | this.crudOid=this.Formlist[this.selectRow].oid |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }else { |
| | | this.ProData = []; |
| | | } |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |