Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -448,7 +448,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { if (res.data.code == 200) { this.$message.success('发布成功') this.onLoad() @@ -479,10 +479,10 @@ if (this.selectRow.length === 1 && item.lcstatus === "Disabled" && showMessage) { this.$message.warning('选择的数据中状态无需再执行当前操作'); showMessage = false; } else if (this.selectRow.length >= 1 && !hasEditing && showMessage) { } else if (this.selectRow.length > 1 && !hasEditing && showMessage) { this.$message.warning('您选择的数据全部为【发布状态】才可以发起流程'); showMessage = false; } else if (this.selectRow.length > 1 && hasEditing && showMessage) { } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { if (res.data.records != [] && res.data.data.records.length != 0) { this.userName = localStorage.getItem("username"); @@ -500,7 +500,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); changeStatus({oid: oid, btmname: this.result, lcStatus: 'Disabled'}).then(res => { changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Disabled'}).then(res => { if (res.data.code == 200) { this.$message.success('停用成功') this.onLoad() @@ -515,7 +515,7 @@ } } }); } else { } else if(this.selectRow.length == 1 && !hasEditing && showMessage ) { this.$message.warning('您选择的数据为【发布状态】才可以发起流程') } }); @@ -551,7 +551,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); changeStatus({oid: oid, btmname: this.result, lcStatus: 'Released'}).then(res => { changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'Released'}).then(res => { if (res.data.code == 200) { this.$message.success('启用成功') this.onLoad() @@ -608,7 +608,7 @@ type: 'warning' }).then(() => { const oid = this.selectRow.map(obj => obj.oid).join(","); changeStatus({oid: oid, btmname: this.result, lcStatus: 'TakeBack'}).then(res => { changeStatus({oid: oid, btmname: this.selectRow[0].btmname, lcStatus: 'TakeBack'}).then(res => { if (res.data.code == 200) { this.$message.success('回收成功') this.onLoad() @@ -774,6 +774,7 @@ //多选 handleSelectionChange(list) { this.selectRow = list; console.log(this.selectRow) this.parameter.ids = []; list.forEach((item) => { this.parameter.ids.push(item.oid); Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -332,6 +332,7 @@ <script> import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto,listByFlag} from '@/api/template/templateAttr' import {getList} from "@/api/refer/table"; import func from "@/util/func"; export default { name: "attrCrud .vue", @@ -1686,14 +1687,63 @@ }, //保存 addsHandler(event) { batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => { this.$message.success('保存成功') this.editOpenFlag=false; // 调用父组件修改按钮状态 this.$emit('editCloseChildren') }).catch(()=>{ this.$message.warning('保存失败,请查看控制台输出!') this.$refs.referAttrCrud.sort("orderNum"); var ischeck = true; console.log(this.ProData) this.ProData.forEach((item,index)=>{ if((item.requireFlag && item.requireFlag.toString()=='true') && (item.readOnlyFlag && item.readOnlyFlag.toString()=='true')){ this.$message.warning(item.name+"("+item.id+")必输的属性不能是只读"); console.log(item) ischeck=false; return; } var num=0; if(item.componentRule){ //组合规则 num++ } if(item.enumString || item.enumId){ //枚举 num++ } if(item.referConfig || item.referBtmId){ //参照 num++ } if(item.codeDateFormat){ //时间格式 num++ } if(item.classifyInvokeLevel){ //分类注入 num++ } if(num>1 && ischeck){ this.$message({ showClose: true, message: item.name+"("+item.id+") 属性只能是组合规则,枚举,参照,时间格式,分类注入中的一种", type: 'warning' }); ischeck=false; return; } }) if(!ischeck){ return ; } // 新函数用于执行batchAddSave方法 const executeBatchAddSave = () => { batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => { this.$message.success('保存成功') this.editOpenFlag=false; // 调用父组件修改按钮状态 this.$emit('editCloseChildren') }).catch(()=>{ this.$message.warning('保存失败,请查看控制台输出!') }); } // 所有if条件和逻辑通过后调用executeBatchAddSave函数 executeBatchAddSave(); }, //表格行编辑 handleCellClicks(row, column) { Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -24,7 +24,7 @@ </div> </div> <!-- 树节点添加对话框--> <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" v-loading="AddLoading" append-to-body <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible" v-loading="AddLoading" append-to-body style="width: 1700px;margin: auto"> <el-form :model="TreeAddform" :rules="rules"> <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id"> @@ -52,7 +52,7 @@ </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button @click="TreeAddFormVisible = false">取 消</el-button> <el-button @click="TreeEscHandler">取 消</el-button> <el-button type="primary" @click="TreeAddHandler">确 定</el-button> </div> </el-dialog> @@ -354,10 +354,10 @@ inject: ["crudTreeData"], data() { return { masterRow:0, masterRow:null, AddLoading:false, // 定义一个变量来保存树请求的数量 requestCount:0, requestCount:null, //导入状态框 ThemeImportVisible:false, selectRow:'', @@ -1042,6 +1042,11 @@ loading.close(); } }, //树节点取消事件 TreeEscHandler(){ this.TreeAddform={}; this.TreeAddFormVisible=false }, //树节点添加事件 TreeAddHandler() { const data = this.TreeAddform;