| | |
| | | <!-- 左侧菜单--> |
| | | <el-aside> |
| | | <basic-container> |
| | | <div> |
| | | <div> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <div style="display: flex;"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改 |
| | | </el-button> |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新 |
| | | </el-button> |
| | | </div> |
| | | <div style="display: flex; margin-top: 10px"> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> |
| | | 停用 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" |
| | | @click.native="ImportExcel">导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" |
| | | @click="ExportExcel">导出 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;margin-top: 5px;margin-bottom: 5px"> |
| | | <el-button v-if="permissionList.flowingBtnStuatus" plain size="mini" type="primary" @click="testHandler">流水处理 |
| | | </el-button> |
| | | </div> |
| | | <div style="height: calc(100vh - 142px);!important;"> |
| | | <div class="headerCon" style="display: flex; flex-wrap: wrap;margin-bottom: 5px"> |
| | | <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加</el-button> |
| | | <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改</el-button> |
| | | <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除</el-button> |
| | | <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新</el-button> |
| | | <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用</el-button> |
| | | <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate">停用</el-button> |
| | | <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" @click.native="ImportExcel">导入</el-button> |
| | | <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" @click="ExportExcel">导出</el-button> |
| | | <el-button style="width: 56px;text-align: center;padding-left: 3px" v-if="permissionList.flowingBtnStuatus" plain size="small" type="primary" @click="flowingDependHandler">流水处理</el-button> |
| | | <el-button style="width: 56px;text-align: center;padding-left: 3px" v-if="permissionList.classifyAuth" plain size="small" type="primary" @click="classifyAuthHandler">分类授权</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 左侧树--> |
| | | <div style="height: calc(100vh - 230px);overflow: auto"> |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" |
| | | :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | class="classifyTree" |
| | | style="height: calc(100vh - 290px)" |
| | | @node-click="nodeClick" |
| | | > |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark" |
| | | open-delay="500" |
| | | placement="right-start"> |
| | | <!-- 左侧树--> |
| | | |
| | | <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" |
| | | :defaultExpandAll="false" |
| | | :option="Treeoption" |
| | | class="classifyTree" |
| | | style="height: 690px" |
| | | @node-click="nodeClick" |
| | | > |
| | | <template slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" |
| | | effect="dark" |
| | | open-delay="500" |
| | | placement="right-start"> |
| | | <span style="font-size: 14px;"> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | | </avue-tree> |
| | | |
| | | <!-- 树节点添加对话框--> |
| | | <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler" |
| | | :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" append-to-body |
| | | style="width: 1700px;margin: auto"> |
| | | <el-form ref="myForm" :model="TreeAddform" :rules= "rules"> |
| | | <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" prop="id" |
| | | style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="this.TreeFlag ? '分类名称:' :'主题库名称:'" label-width="110px" prop="name" |
| | | style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="TreeFlagCode" label="存储的业务类型:" label-width="150px" prop="btmTypeName"> |
| | | <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" |
| | | @focus="btmFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="编码规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" |
| | | @focus="CodeFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="关键属性查询规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" style="width: 585px" |
| | | @focus="Keyfouce"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否参与关键属性校验:" label-width="170px"> |
| | | <el-switch |
| | | v-model="TreeAddform.codeKeyAttrValue" |
| | | active-color="#13ce66" |
| | | active-text="是" |
| | | inactive-color="#ff4949" |
| | | inactive-text="否" |
| | | @change="switchChange"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="相似查询规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" style="width: 585px" |
| | | @focus="simFouce"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="TreeEscHandler">取 消</el-button> |
| | | <el-button type="primary" @click="TreeAddHandler">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 修改对话框--> |
| | | <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类"> |
| | | <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" |
| | | :flag="'edit'" |
| | | :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList" |
| | | :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed" |
| | | @referTreeForm="referTreeForm"></classifyTreeform> |
| | | </el-dialog> |
| | | </div> |
| | | <!-- 树节点添加对话框--> |
| | | <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler" |
| | | :title="this.TreeFlag ? '添加分类' :'添加主题库'" :visible.sync="TreeAddFormVisible" append-to-body |
| | | style="width: 1700px;margin: auto"> |
| | | <el-form ref="myForm" :model="TreeAddform" :rules="rules"> |
| | | <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" prop="id" |
| | | style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="this.TreeFlag ? '分类名称:' :'主题库名称:'" label-width="110px" prop="name" |
| | | style="display: inline-block"> |
| | | <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="TreeFlagCode" label="存储的业务类型:" label-width="150px" prop="btmTypeName"> |
| | | <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" |
| | | @focus="btmFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="编码规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" |
| | | @focus="CodeFoucus"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="关键属性查询规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" style="width: 585px" |
| | | @focus="Keyfouce"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否参与关键属性校验:" label-width="170px"> |
| | | <el-switch |
| | | v-model="TreeAddform.codeKeyAttrValue" |
| | | active-color="#13ce66" |
| | | active-text="是" |
| | | inactive-color="#ff4949" |
| | | inactive-text="否" |
| | | @change="switchChange"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="相似查询规则:" label-width="150px"> |
| | | <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" style="width: 585px" |
| | | @focus="simFouce"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="TreeEscHandler">取 消</el-button> |
| | | <el-button type="primary" @click="TreeAddHandler">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 修改对话框--> |
| | | <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类"> |
| | | <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" |
| | | :flag="'edit'" |
| | | :loneTreeNewForm="TreeEditObj" :nodeClickList="nodeClickList" |
| | | :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed" |
| | | @referTreeForm="referTreeForm"></classifyTreeform> |
| | | </el-dialog> |
| | | <!-- 分类授权对话框--> |
| | | <classify-auth-dialog |
| | | :classifyData="classifyData" |
| | | :visible.sync="classifyAuthVisible" |
| | | ></classify-auth-dialog> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | |
| | | <!-- 右侧表格--> |
| | | <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs> |
| | | <span v-if="type.prop==='tab1'"> |
| | | <classifyTreeform ref="childForm" :flag="'renonly'" :loneTreeNewForm="TreeList" |
| | | <classifyTreeform ref="childForm" :flag="'renonly'" :loneTreeNewForm="TreeEditObj" |
| | | :nodeList="nodeList"></classifyTreeform> |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | |
| | | </basic-container> |
| | | <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :codeClassifyOid="this.codeClassifyOid" |
| | | :crudArray="this.crudArray" :crudLCStatus="this.crudLCStatus" :crudOid="this.crudOid" |
| | | :rowIndex="this.selectRow"></templatePro> |
| | | :rowIndex="this.selectRow" :btnAuthList="btnAuthList"></templatePro> |
| | | </span> |
| | | <!-- 编码规则--> |
| | | <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body |
| | |
| | | import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' |
| | | import func from "@/util/func"; |
| | | import {mapGetters} from "vuex"; |
| | | import ClassifyAuth from './ClassifyAuthDialog.vue'; |
| | | import {getAuthButtonList} from '@/api/system/classifyAuth' |
| | | |
| | | export default { |
| | | components: {ClassifyAuth}, |
| | | name: "classifyTrees.vue", |
| | | data() { |
| | | return { |
| | | btnAuthList: [], |
| | | activeName: 'first', |
| | | masterRow: null, |
| | | AddLoading: false, |
| | |
| | | masterOption: { |
| | | addBtn: false, |
| | | index: true, |
| | | refreshBtn:false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | border: true, |
| | | menu: false, |
| | |
| | | addBtn: false, |
| | | index: true, |
| | | columnBtn: false, |
| | | refreshBtn:false, |
| | | refreshBtn: false, |
| | | border: true, |
| | | menu: false, |
| | | height: 380, |
| | |
| | | TreeEditFormVisible: false, |
| | | //添加对话框 |
| | | TreeAddFormVisible: false, |
| | | //分类授权对话框 |
| | | classifyAuthVisible: false, |
| | | //当前点击项 |
| | | nodeClickList: "", |
| | | ClonenodeClickList: "", |
| | |
| | | } |
| | | ], |
| | | //传递给子组件动态渲染的数据 |
| | | TreeList: {}, |
| | | TreeEditObj: {}, |
| | | codeClassifyOid: "", |
| | | upAndStopAndStartData: { |
| | | upVersion: { |
| | |
| | | }, |
| | | //模板管理编辑 |
| | | showEditBtn: false, |
| | | //传递给分类授权子组件对话框的当前选中的分类节点信息 |
| | | classifyData: "", |
| | | } |
| | | }, |
| | | watch: {}, |
| | |
| | | const treeEle = this.$refs.tree.$el |
| | | treeEle.addEventListener('click', (e) => { |
| | | if (e.target.nodeName !== 'SPAN') { |
| | | this.$refs.tree.setCurrentKey(null) |
| | | this.nodeClickList = {} |
| | | this.TreeList = [] |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.nodeClickList = {}; |
| | | this.TreeFlagCode = true; |
| | | // this.$nextTick(()=>{ |
| | | // this.btnAuthList = []; |
| | | // }) |
| | | } |
| | | }, true) |
| | | }, |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | TreeAddStatus: this.vaildData(this.permission.classifyTree.tree_add, false), |
| | | TreeEditStatus: this.vaildData(this.permission.classifyTree.tree_edit, false), |
| | | TreeDelStatus: this.vaildData(this.permission.classifyTree.tree_delete, false), |
| | | flushedStatus: this.vaildData(this.permission.classifyTree.tree_break, false), |
| | | EnableStatus: this.vaildData(this.permission.classifyTree.tree_enable, false), |
| | | DeactivateStatus: this.vaildData(this.permission.classifyTree.tree_stop, false), |
| | | ImportExcelStatus: this.vaildData(this.permission.classifyTree.tree_import, false), |
| | | ExportExcelStatus: this.vaildData(this.permission.classifyTree.tree_export, false), |
| | | FindStatus: this.vaildData(this.permission.classifyTree.manage_search, false), |
| | | TemRefreshStatus: this.vaildData(this.permission.classifyTree.manage_break, false), |
| | | CloneBtnStuatus: this.vaildData(this.permission.classifyTree.manage_clone, false), |
| | | flowingBtnStuatus: this.vaildData(this.permission.classifyTree.tree_flowing, false), |
| | | TreeAddStatus: this.vaildData(this.btnAuthList.tree_add, false), |
| | | TreeEditStatus: this.vaildData(this.btnAuthList.tree_edit, false), |
| | | TreeDelStatus: this.vaildData(this.btnAuthList.tree_delete, false), |
| | | flushedStatus: this.vaildData(this.btnAuthList.tree_break, false), |
| | | EnableStatus: this.vaildData(this.btnAuthList.tree_enable, false), |
| | | DeactivateStatus: this.vaildData(this.btnAuthList.tree_stop, false), |
| | | ImportExcelStatus: this.vaildData(this.btnAuthList.tree_import, false), |
| | | ExportExcelStatus: this.vaildData(this.btnAuthList.tree_export, false), |
| | | FindStatus: this.vaildData(this.btnAuthList.manage_search, false), |
| | | TemRefreshStatus: this.vaildData(this.btnAuthList.manage_break, false), |
| | | CloneBtnStuatus: this.vaildData(this.btnAuthList.manage_clone, false), |
| | | flowingBtnStuatus: this.vaildData(this.btnAuthList.tree_flowing, false), |
| | | classifyAuth: this.vaildData(this.btnAuthList.classify_auth, false), |
| | | } |
| | | }, |
| | | treeStyle() { |
| | | return { |
| | | height: this.btnAuthList.length > 0 ? '620px' : '785px', |
| | | }; |
| | | }, |
| | | crudTreeOption() { |
| | | return { |
| | |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleTabClick(){ |
| | | |
| | | // 分类授权对话框打开 |
| | | classifyAuthHandler() { |
| | | if (this.nodeClickList.oid === '' || this.nodeClickList.oid === undefined) { |
| | | this.$message.warning('请至少选择一条数据!') |
| | | return; |
| | | } |
| | | this.classifyData = this.nodeClickList; |
| | | this.classifyAuthVisible = true; |
| | | }, |
| | | testHandler(){ |
| | | if(this.nodeClickList.length <=0 ){ |
| | | flowingDependHandler() { |
| | | if (this.nodeClickList.length <= 0) { |
| | | this.$message.warning('请至少选择一条数据!') |
| | | return; |
| | | } |
| | |
| | | }, |
| | | //子传父 |
| | | MasterHandler(val) { |
| | | this.TreeList = val; |
| | | this.TreeEditObj = val; |
| | | }, |
| | | rowHandle(row, column) { |
| | | this.selectRow = row.$index; |
| | |
| | | }, |
| | | //树刷新 |
| | | async flushed() { |
| | | await this.getAttr() |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.nodeClickList = {} |
| | | this.TreeList = [] |
| | | this.TreeFlagCode = true; |
| | | await this.getAttr() |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.nodeClickList = {}; |
| | | this.TreeEditObj = {}; |
| | | this.TreeFlagCode = true; |
| | | }, |
| | | //启用和停用都先判断状态 |
| | | //启用 |
| | |
| | | }, |
| | | //树点击事件 |
| | | async nodeClick(data) { |
| | | getAuthButtonList({classifyId: data.oid}).then(res => { |
| | | this.btnAuthList = res.data.data; |
| | | }).catch(error => { |
| | | console.log(error) |
| | | }) |
| | | //操作新增和修改的业务类型隐藏 |
| | | this.TreeFlagCode = !data; |
| | | this.editTreeFLagCode = !data.parentId; |
| | |
| | | this.ProData = []; |
| | | this.crudOid = '' |
| | | } |
| | | this.TreeList = res3.data.data; |
| | | if (this.TreeList.isParticipateCheck === null || this.TreeList.isParticipateCheck === undefined || this.TreeList.isParticipateCheck === "") { |
| | | this.$set(this.TreeList, "isParticipateCheck", 1) |
| | | this.TreeEditObj = res3.data.data; |
| | | if (this.TreeEditObj.isParticipateCheck === null || this.TreeEditObj.isParticipateCheck === undefined || this.TreeEditObj.isParticipateCheck === "") { |
| | | this.$set(this.TreeEditObj, "isParticipateCheck", 1) |
| | | return |
| | | } |
| | | } catch (error) { |
| | |
| | | //基本信息表单刷新 |
| | | referTreeForm() { |
| | | getObjectByOid(this.nodeClickList.oid).then(res => { |
| | | this.TreeList = res.data.data; |
| | | this.TreeEditObj = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | |
| | | width: 500px; |
| | | } |
| | | |
| | | .headerCon{ |
| | | .el-button+.el-button { |
| | | margin-left: 5px; |
| | | } |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | .headerCon > .el-button:nth-child(5) { |
| | | margin-left: 0; |
| | | } |
| | | .headerCon > .el-button:nth-child(9) { |
| | | margin-left: 0; |
| | | } |
| | | </style> |