From b9367591279f75feba17a1301d7aa9ce8a6325f5 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 19 三月 2024 21:05:55 +0800
Subject: [PATCH] 集成相关更改
---
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 808 +++++++++++++++++++++------------------------------------
1 files changed, 303 insertions(+), 505 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index c8f38c1..d90f2a2 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -4,39 +4,66 @@
<!-- 宸︿晶鑿滃崟-->
<el-aside>
<basic-container>
- <div style="height: calc(100vh - 142px);!important;">
+ <div style="height: calc(100vh - 144px);!important;" @click="clearNode">
<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>
+ <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">娣诲姞
+ </el-button>
+ <el-button v-if="permissionList.TreeEditStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="TreeEdit">淇敼
+ </el-button>
+ <el-button v-if="permissionList.TreeDelStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="TreeDel">鍒犻櫎
+ </el-button>
+ <el-button v-if="permissionList.flushedStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="flushed">鍒锋柊
+ </el-button>
+ <el-button v-if="permissionList.EnableStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="Enable">鍚敤
+ </el-button>
+ <el-button v-if="permissionList.DeactivateStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="Deactivate">鍋滅敤
+ </el-button>
+ <el-button v-if="permissionList.ImportExcelStatus" v-show="allButtons" plain size="small" type="primary"
+ @click.native="ImportExcel">瀵煎叆
+ </el-button>
+ <el-button v-if="permissionList.ExportExcelStatus" v-show="allButtons" plain size="small" type="primary"
+ @click="ExportExcel">
+ 瀵煎嚭
+ </el-button>
+ <el-button v-if="permissionList.flowingBtnStuatus" v-show="allButtons" plain
+ size="small" style="width: 56px;text-align: center;padding-left: 3px" type="primary"
+ @click="flowingDependHandler">娴佹按澶勭悊
+ </el-button>
+ <el-button v-if="permissionList.classifyAuth" v-show="allButtons" plain size="small"
+ style="width: 56px;text-align: center;padding-left: 3px" type="primary"
+ @click="classifyAuthHandler">鍒嗙被鎺堟潈
+ </el-button>
+ <el-button v-if="permissionList.classifyAuth" v-show="allButtons" plain size="small"
+ style="width: 56px;text-align: center;padding-left: 3px" type="primary"
+ @click="dataAuthHandler">鏁版嵁鎺堟潈
+ </el-button>
</div>
<!-- 宸︿晶鏍�-->
-
- <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">
+ <div style="height: calc(100vh - 242px);overflow: auto">
+ <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
+ :defaultExpandAll="false"
+ :option="Treeoption"
+ class="classifyTree"
+ @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>
+ </el-tooltip>
+ </template>
+ </avue-tree>
+ <div style="height: 25px"></div>
+ </div>
</div>
<!-- 鏍戣妭鐐规坊鍔犲璇濇-->
@@ -97,13 +124,20 @@
</el-dialog>
<!-- 鍒嗙被鎺堟潈瀵硅瘽妗�-->
<classify-auth-dialog
+ :TreeNode="TreeEditObj"
:classifyData="classifyData"
:visible.sync="classifyAuthVisible"
></classify-auth-dialog>
+ <!-- 鏁版嵁鎺堟潈瀵硅瘽妗� -->
+ <data-auth-dialog
+ :TreeNode="TreeEditObj"
+ :classifyData="classifyData"
+ :visible.sync="dataAuthVisible"
+ ></data-auth-dialog>
</basic-container>
</el-aside>
<el-main>
- <basic-container style="height: calc(100vh - 150px);">
+ <basic-container>
<!-- 鍙充晶琛ㄦ牸-->
<avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
<span v-if="type.prop==='tab1'">
@@ -131,31 +165,19 @@
@click="TemRefresh">鍒锋柊</el-button>
<el-button v-if="permissionList.CloneBtnStuatus" plain size="small" type="primary" @click="CloneBtn">浠庡叾瀹冩ā鏉垮厠闅�</el-button>
<!-- 鏌ヨ瀵硅瘽妗�-->
- <el-dialog :visible.sync="FindFormVisible" append-to-body title="楂樼骇鏌ヨ">
- <div>
- <el-button size="small" type="primary" @click="AdvQueries">鏌ヨ</el-button>
- <el-button size="small" type="primary">閲嶇疆</el-button>
- </div>
- <div style="padding-left: 80px;margin-top: 15px;">
- <template v-for="(value, key) in FindSelect">
- <div style="display: flex; justify-content: space-around; width: 85%; margin-bottom: 15px">
- <el-select v-model="FindSelect[key]" placeholder="璇烽�夋嫨" style="width: 28%"
- @change="handleSelectChange(key)">
- <el-option label="妯℃澘缂栧彿" value="0"></el-option>
- <el-option label="妯℃澘鍚嶇О" value="1"></el-option>
- <el-option label="妯℃澘鎻忚堪" value="2"></el-option>
- <el-option label="鐗堟湰鍙�" value="3"></el-option>
- <el-option label="鐘舵��" value="4"></el-option>
- </el-select>
- <el-select v-model="condition[0]" placeholder="璇烽�夋嫨" style="width: 15%">
- <el-option label="鍖呭惈" value="0"></el-option>
- <el-option label="绛変簬" value="1"></el-option>
- </el-select>
- <el-input v-model="QueryArray[key]" style="width: 49%"></el-input>
- <span> <i class="el-icon-delete" style="font-size: 22px;margin-top:8px;margin-left: 10px"/></span>
+ <el-dialog :visible.sync="FindFormVisible" append-to-body title="楂樼骇鏌ヨ" width="30%" @close="searchReset">
+ <div style="text-align: center; margin-top: 5px;">
+ <el-select v-model="searchSelect" style="width: 35%">
+ <el-option v-for="item in crudFindTreeArray" :key="item.field" :label="item.title"
+ :value="item.queryField"></el-option>
+ </el-select>
+ <el-input v-model="SearchValue"
+ placeholder="璇疯緭鍏ュ叧閿瓧杩涜鏌ヨ" style="width: 45%; margin-left: 5px;"></el-input>
</div>
- </template>
- </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="advQueries">鏌ヨ</el-button>
+ <el-button type="danger" @click="searchReset">閲嶇疆</el-button>
+ </span>
</el-dialog>
<!-- 妯℃澘鍏嬮殕 -->
<el-dialog :before-close="cloneClose" :visible.sync="CloneVisible" append-to-body title="鍏嬮殕妯℃澘">
@@ -253,147 +275,58 @@
</template>
</avue-crud>
</basic-container>
- <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :codeClassifyOid="this.codeClassifyOid"
- :crudArray="this.crudArray" :crudLCStatus="this.crudLCStatus" :crudOid="this.crudOid"
- :rowIndex="this.selectRow" :btnAuthList="btnAuthList"></templatePro>
+ <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :btnAuthList="btnAuthList"
+ :codeClassifyOid="this.codeClassifyOid" :crudArray="this.crudArray"
+ :crudLCStatus="this.crudLCStatus"
+ :crudOid="this.crudOid" :rowIndex="this.selectRow"></templatePro>
</span>
<!-- 缂栫爜瑙勫垯-->
- <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body
- title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�">
- <template>
- <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
- <el-option
- v-for="item in SelectOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- style="width: 150px">
- </el-option>
- </el-select>
- <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
- <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectFindeHandler">鏌ヨ
- </el-button>
- </template>
- <avue-crud :data="masterData" :option="Option" @row-click="masterSelect">
- <template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
- </el-radio>
- </template>
- </avue-crud>
- <div style="height: 30px">
- <div
- style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
- 宸茶缃殑鍊间负:[{{ this.TreeAddform.coderuleoidName == '' ? '鏈缃��' : this.TreeAddform.coderuleoidName }}]
- </div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
- <el-button size="small" type="primary" @click="MasterHandlerClick">纭畾</el-button>
- <el-button size="small" @click="masterEscHandler">鍙栨秷</el-button>
- </div>
- </div>
- </el-dialog>
+ <ThemeChildren
+ ref="ThemeMasterChildren"
+ :SelectOption="SelectOption"
+ :TreeAddform="TreeAddform"
+ :visible.sync="MasterdialogVisible"
+ code-lcstatus="Released"
+ codeName="codeRuleOidName"
+ codeType="coderule"
+ dialogTitle="缂栫爜瑙勫垯"
+ @defineHandler="handlerDefine"
+ ></ThemeChildren>
<!-- 鍏抽敭灞炴�ф煡璇㈣鍒�-->
- <el-dialog :before-close="KeyEscHandler" :visible.sync="KeydialogVisible" append-to-body title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�">
- <template>
- <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
- <el-option
- v-for="item in SelectOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- style="width: 150px">
- </el-option>
- </el-select>
- <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
- <el-button plain size="small" style="margin-left: 20px" type="primary" @click="KeySelectFindeHandler">鏌ヨ
- </el-button>
- </template>
- <avue-crud :data="KeyData" :option="Option" @row-click="KeySelect">
- <template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
- </el-radio>
- </template>
- </avue-crud>
- <div style="height: 30px">
- <div
- style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
- 宸茶缃殑鍊间负:[{{
- this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '鏈缃��' : this.TreeAddform.codekeyattrrepeatoidName
- }}]
- </div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
- <el-button size="small" type="primary" @click="KeyHandlerClick">纭畾</el-button>
- <el-button size="small" @click="KeyEscHandler">鍙栨秷</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 鐩镐技椤规煡璇㈣鍒�-->
- <el-dialog :before-close="simEscHandler" :visible.sync="SimidialogVisible" append-to-body title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�">
- <template>
- <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
- <el-option
- v-for="item in SelectOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- style="width: 150px">
- </el-option>
- </el-select>
- <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
- <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SimSelectFindeHandler">鏌ヨ
- </el-button>
- </template>
- <avue-crud :data="simData" :option="Option" @row-click="simSelect">
- <template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
- </el-radio>
- </template>
- </avue-crud>
- <div style="height: 30px">
- <div
- style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
- 宸茶缃殑鍊间负:[{{
- this.TreeAddform.codeResembleRuleOidName == '' ? '鏈缃��' : this.TreeAddform.codeResembleRuleOidName
- }}]
- </div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
- <el-button size="small" type="primary" @click="simHandlerClick">纭畾</el-button>
- <el-button size="small" @click="simEscHandler">鍙栨秷</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 涓氬姟绫诲瀷-->
- <el-dialog :before-close="BtmEscHandler" :visible.sync="BtmdialogVisible" append-to-body title="涓恒�愪笟鍔$被鍨嬭鍒欍�戦�夊彇鍊�">
- <template>
- <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;">
- <el-option
- v-for="item in masterSelectOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- style="width: 130px">
- </el-option>
- </el-select>
- <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
- <el-button plain size="small" style="margin-left: 20px" type="primary" @click="BtmSelectFindeHandler">鏌ヨ
- </el-button>
- </template>
- <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect">
- <template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
- </el-radio>
- </template>
- </avue-crud>
- <div style="height: 30px">
- <div
- style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
- 宸茶缃殑鍊间负:[{{ this.TreeAddform.btmTypeName }}]
- </div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
- <el-button size="small" type="primary" @click="btmHandlerClick">纭畾</el-button>
- <el-button size="small" @click="BtmEscHandler">鍙栨秷</el-button>
- </div>
- </div>
- </el-dialog>
+ <ThemeChildren
+ ref="ThemeKeyChildren"
+ :SelectOption="SelectOption"
+ :TreeAddform="TreeAddform"
+ :visible.sync="KeydialogVisible"
+ code-lcstatus="Enabled"
+ codeName="codeKeyAttrRepeatOidName"
+ codeType="codekeyattrrepeat"
+ dialogTitle="鍏抽敭灞炴�ф煡璇㈣鍒�"
+ @defineHandler="handlerDefine"
+ ></ThemeChildren>
+ <!-- 鐩镐技椤规煡璇㈣鍒� -->
+ <ThemeChildren
+ ref="ThemeSimChildren"
+ :SelectOption="SelectOption"
+ :TreeAddform="TreeAddform"
+ :visible.sync="SimidialogVisible"
+ code-lcstatus="Enabled"
+ codeName="codeResembleRuleOidName"
+ codeType="coderesemblerule"
+ dialogTitle="鐩镐技椤规煡璇㈣鍒�"
+ @defineHandler="handlerDefine"
+ ></ThemeChildren>
+ <!-- 涓氬姟绫诲瀷 -->
+ <ThemeChildren
+ ref="ThemeBtmChildren"
+ :SelectOption="btmSelectOption"
+ :TreeAddform="TreeAddform"
+ :visible.sync="BtmdialogVisible"
+ codeName="btmTypeName"
+ codeType="btmCode"
+ dialogTitle="涓氬姟绫诲瀷"
+ @defineHandler="handlerDefine"
+ ></ThemeChildren>
<!-- 瀵煎嚭-->
<ThemeImport :codeClassifyOid="this.codeClassifyOid" :visible.sync="ThemeImportVisible"></ThemeImport>
</basic-container>
@@ -406,7 +339,6 @@
TreeSave,
TreeDel,
TreeCheckDel,
- TreeObjcet,
TreeEnable,
TreeDeactivate,
gridCodeClassifyTemplate,
@@ -428,12 +360,48 @@
import {mapGetters} from "vuex";
import ClassifyAuth from './ClassifyAuthDialog.vue';
import {getAuthButtonList} from '@/api/system/classifyAuth'
+import ThemeChildren from '@/components/FormTemplate/ThemeChildren'
export default {
- components: {ClassifyAuth},
+ components: {ClassifyAuth, ThemeChildren},
name: "classifyTrees.vue",
data() {
return {
+ crudFindTreeArray: [
+ {
+ title: '妯℃澘缂栧彿',
+ field: 'id',
+ fieldType: 'text',
+ queryField: 'id'
+ },
+ {
+ title: '妯℃澘鍚嶇О',
+ field: 'name',
+ fieldType: 'text',
+ queryField: 'name'
+ },
+ {
+ title: '妯℃澘鎻忚堪',
+ field: 'description',
+ fieldType: 'text',
+ queryField: 'description'
+ },
+ {
+ title: '鐗堟湰鍙�',
+ field: 'revisionSeq',
+ fieldType: 'text',
+ queryField: 'revisionSeq'
+ },
+ {
+ title: '鐘舵��',
+ field: 'lcStatusText',
+ fieldType: 'text',
+ queryField: 'lcStatusText'
+ },
+ ],
+ searchSelect: 'id',
+ SearchValue: '',
+ allButtons: Boolean,
btnAuthList: [],
activeName: 'first',
masterRow: null,
@@ -450,97 +418,24 @@
editTreeFLagCode: false,
//缂栫爜瑙勫垯
MasterdialogVisible: false,
- masterData: [],
- masterSelectList: [],
- masterName: "",
- masterOid: "",
- //鍏抽敭灞炴�tmTypeId
+ //鍏抽敭灞炴��
KeydialogVisible: false,
- KeyName: "",
- KeyOid: "",
- KeyData: [],
- KeySelectLIst: [],
//鐩镐技椤�
- simName: "",
- simOid: "",
- simData: [],
SimidialogVisible: false,
- simSelectList: [],
//涓氬姟绫诲瀷
- btmName: "",
- btmOid: "",
- BtmData: [],
BtmdialogVisible: false,
- btmSelectList: [],
- masterOption: {
- addBtn: false,
- index: true,
- refreshBtn: false,
- columnBtn: false,
- border: true,
- menu: false,
- height: 380,
- column: [
- {
- label: '',
- prop: 'radio',
- width: 60,
- display: false
- },
- {
- label: '涓氬姟绫诲瀷缂栧彿',
- prop: 'id'
- },
- {
- label: '涓氬姟绫诲瀷鍚嶇О',
- prop: 'name'
- },
- {
- label: '鎻忚堪',
- prop: 'description'
- }
- ]
- },
- Option: {
- addBtn: false,
- index: true,
- columnBtn: false,
- refreshBtn: false,
- border: true,
- menu: false,
- height: 380,
- column: [
- {
- label: '',
- prop: 'radio',
- width: 60,
- display: false
- },
- {
- label: '鑻辨枃鍚嶇О',
- prop: 'id'
- },
- {
- label: '涓枃鍚嶇О',
- prop: 'name'
- },
- {
- label: '鎻忚堪',
- prop: 'description'
- }
- ]
- },
SelectOption: [
+ {
+ value: 'id',
+ label: '鑻辨枃鍚嶇О',
+ },
{
value: 'name',
label: '涓枃鍚嶇О'
- },
- {
- value: 'id',
- label: '鑻辨枃鍚嶇О'
}
+
],
- masterSelectOption: [
+ btmSelectOption: [
{
value: 'id',
label: '涓氬姟绫诲瀷缂栧彿'
@@ -550,8 +445,6 @@
label: '涓氬姟绫诲瀷鍚嶇О'
},
],
- SelectValue: "id",
- SelectFInd: "",
addFlag: false,
// 琛ㄦ牸褰撳墠琛宨d
crudOid: "",
@@ -599,6 +492,8 @@
TreeAddFormVisible: false,
//鍒嗙被鎺堟潈瀵硅瘽妗�
classifyAuthVisible: false,
+ //鏁版嵁鎺堟潈瀵硅瘽妗�
+ dataAuthVisible: false,
//褰撳墠鐐瑰嚮椤�
nodeClickList: "",
ClonenodeClickList: "",
@@ -640,6 +535,7 @@
Treedata: [],
CloneTreedata: [],
Treeoption: {
+ height: 'auto',
addBtn: false,
editBtn: false,
delBtn: false,
@@ -796,11 +692,12 @@
showEditBtn: false,
//浼犻�掔粰鍒嗙被鎺堟潈瀛愮粍浠跺璇濇鐨勫綋鍓嶉�変腑鐨勫垎绫昏妭鐐逛俊鎭�
classifyData: "",
+
}
},
watch: {},
mounted() {
- this.type = this.tabOption.column[0];
+ this.type = this.tabOption.column[0] || {label: '鍩烘湰淇℃伅', prop: 'tab1'};
this.getAttr();
const treeEle = this.$refs.tree.$el
treeEle.addEventListener('click', (e) => {
@@ -808,6 +705,7 @@
this.$refs.tree.setCurrentKey(null);
this.nodeClickList = {};
this.TreeFlagCode = true;
+ this.allButtons = false;
// this.$nextTick(()=>{
// this.btnAuthList = [];
// })
@@ -818,7 +716,7 @@
...mapGetters(["permission"]),
permissionList() {
return {
- TreeAddStatus: this.vaildData(this.btnAuthList.tree_add, false),
+ TreeAddStatus: this.vaildData(this.permission.classifyTree.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),
@@ -835,7 +733,7 @@
},
treeStyle() {
return {
- height: this.btnAuthList.length > 0 ? '620px' : '785px',
+ height: this.allButtons ? '610px' : '690px',
};
},
crudTreeOption() {
@@ -843,7 +741,8 @@
index: true,
border: true,
columnBtn: false,
- height: 180,
+ height: 150,
+ refreshBtn: false,
addBtn: this.Formlist.length <= 0 && this.nodeClickList != "",
editBtn: false,
delBtn: false,
@@ -893,19 +792,34 @@
codeClassifyOid: ''
}
}
- }
+ },
},
created() {
},
methods: {
+ clearNode(){
+ this.$refs.tree.setCurrentKey(null);
+ this.nodeClickList = {};
+ this.TreeFlagCode = true;
+ this.allButtons = false;
+ },
// 鍒嗙被鎺堟潈瀵硅瘽妗嗘墦寮�
classifyAuthHandler() {
if (this.nodeClickList.oid === '' || this.nodeClickList.oid === undefined) {
this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒')
return;
}
- this.classifyData = this.nodeClickList;
+ // this.classifyData = this.nodeClickList;
this.classifyAuthVisible = true;
+ },
+ // 鏁版嵁鎺堟潈瀵硅瘽妗嗘墦寮�
+ dataAuthHandler() {
+ if (this.nodeClickList.oid === '' || this.nodeClickList.oid === undefined) {
+ this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒')
+ return;
+ }
+ // this.classifyData = this.nodeClickList;
+ this.dataAuthVisible = true;
},
flowingDependHandler() {
if (this.nodeClickList.length <= 0) {
@@ -922,34 +836,6 @@
switchChange() {
this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0;
},
- //瀛樺偍鐨勪笟鍔$被鍨嬪叧闂�
- BtmEscHandler() {
- this.SelectFInd = '';
- this.SelectValue = 'id';
- this.masterRow = null;
- this.BtmdialogVisible = false;
- },
- //鐩镐技椤瑰叧闂�
- simEscHandler() {
- this.SelectFInd = '';
- this.SelectValue = 'id';
- this.masterRow = null;
- this.SimidialogVisible = false;
- },
- //鍏抽敭灞炴�у叧闂�
- KeyEscHandler() {
- this.SelectFInd = '';
- this.SelectValue = 'id';
- this.masterRow = null;
- this.KeydialogVisible = false;
- },
- //缂栫爜瑙勫垯鍏抽棴
- masterEscHandler() {
- this.SelectFInd = '';
- this.SelectValue = 'id';
- this.masterRow = null;
- this.MasterdialogVisible = false;
- },
// 鍏抽棴寮圭獥
/** 瀵煎叆 */
ImportExcel() {
@@ -965,179 +851,56 @@
this.$message.warning('璇峰厛閫夋嫨瑕佸鍑虹殑涓婚搴撳垎绫�')
}
},
+ //鏍戞柊澧炲弬鐓у瓙缁勪欢浜嬩欢
+ handlerDefine(val) {
+ const codeTypeMap = {
+ coderule: {
+ nameKey: 'codeRuleOidName',
+ oidKey: 'codeRuleOid'
+ },
+ codekeyattrrepeat: {
+ nameKey: 'codeKeyAttrRepeatOidName',
+ oidKey: 'codeKeyAttrRepeatOid'
+ },
+ coderesemblerule: {
+ nameKey: 'codeResembleRuleOidName',
+ oidKey: 'codeResembleRuleOid'
+ },
+ btmCode: {
+ nameKey: 'btmTypeName',
+ oidKey: 'btmTypeId',
+ clearValidate: true
+ }
+ };
+
+ const codeType = codeTypeMap[val.codeType];
+ if (codeType) {
+ if (codeType.clearValidate) {
+ this.$refs.myForm.clearValidate();
+ }
+ this.$set(this.TreeAddform, codeType.nameKey, val.crudName);
+ this.$set(this.TreeAddform, codeType.oidKey, val.crudOid);
+ }
+ },
//缂栫爜瑙勫垯澶辩劍
CodeFoucus() {
this.MasterdialogVisible = true;
- this.MasterdefaultRend()
+ this.$refs.ThemeMasterChildren.defaultSearchRend()
},
- //缂栫爜澶氶��
- masterSelect(row) {
- this.masterRow = row.$index;
- this.masterSelectList = row;
- this.masterName = row.name;
- this.masterOid = row.oid;
-
- },
- //缂栫爜瑙勫垯鏌ヨ
- SelectFindeHandler() {
- const masterParameter = {};
- masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
- this.MasterdefaultRend(masterParameter)
- },
- //缂栫爜瑙勫垯纭畾
- MasterHandlerClick() {
- if (this.masterSelectList.length > 1) {
- this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- } else if (this.masterSelectList.length <= 0) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- } else {
- this.MasterdialogVisible = false;
- this.masterSelectList = []
- this.$set(this.TreeAddform, 'codeRuleOidName', this.masterName)
- this.$set(this.TreeAddform, 'codeRuleOid', this.masterOid)
- this.$emit('MasterHandler', this.loneTreeNewForm)
- this.masterRow = null;
- }
- },
- //缂栫爜鎺ュ彛
- MasterdefaultRend(masterParameter) {
- defaultReferDataGrid({
- referType: 'coderule',
- isMuti: 'false',
- 'conditionMap["lcstatus"]': 'Released',
- 'limit': '-1',
- ...masterParameter
- }).then(res => {
- this.masterData = res.data.records;
- })
- },
+ //鍏抽敭灞炴�уけ鐒�
Keyfouce() {
this.KeydialogVisible = true;
- this.KeydefaultRend()
+ this.$refs.ThemeKeyChildren.defaultSearchRend();
},
- //鍏抽敭灞炴�х‘瀹�
- KeyHandlerClick() {
- if (this.KeySelectLIst.length > 1) {
- this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- } else if (this.KeySelectLIst.length <= 0) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- } else {
- this.KeydialogVisible = false;
- this.KeySelectLIst = []
- this.$set(this.TreeAddform, 'codeKeyAttrRepeatOidName', this.KeyName)
- this.$set(this.TreeAddform, 'codeKeyAttrRepeatOid', this.KeyOid)
- this.masterRow = null;
- }
- },
- //鍏抽敭灞炴�ф煡璇�
- KeySelectFindeHandler() {
- const masterParameter = {};
- masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
- this.KeydefaultRend(masterParameter)
- },
- //鍏抽敭灞炴�ф帴鍙�
- KeydefaultRend(masterParameter) {
- defaultReferDataGrid({
- referType: 'codekeyattrrepeat',
- isMuti: 'false',
- 'conditionMap["lcstatus"]': 'Enabled',
- 'limit': '-1',
- ...masterParameter
- }).then(res => {
- this.KeyData = res.data.records;
- })
- },
- // 鍏抽敭澶氶��
- KeySelect(row) {
- this.masterRow = row.$index;
- this.KeySelectLIst = row;
- this.KeyName = row.name;
- this.KeyOid = row.oid;
- },
- //鍏抽敭澶辩劍
+ //鐩镐技椤瑰け鐒�
simFouce() {
this.SimidialogVisible = true;
- this.simdefaultRend()
- },
- //鐩镐技椤圭‘瀹�
- simHandlerClick() {
- if (this.simSelectList.length > 1) {
- this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- } else if (this.simSelectList.length <= 0) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- } else {
- this.SimidialogVisible = false;
- this.simSelectList = []
- this.$set(this.TreeAddform, 'codeResembleRuleOidName', this.simName)
- this.$set(this.TreeAddform, 'codeResembleRuleOid', this.simOid)
- this.$emit('MasterHandler', this.loneTreeNewForm)
- this.masterRow = null;
- }
- },
- //鐩镐技椤规煡璇�
- SimSelectFindeHandler() {
- const masterParameter = {};
- masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
- this.simdefaultRend(masterParameter)
- },
- // 鐩镐技椤瑰閫�
- simSelect(row) {
- this.masterRow = row.$index;
- this.simSelectList = row;
- this.simName = row.name;
- this.simOid = row.oid;
- },
- //鐩镐技椤归」鎺ュ彛
- simdefaultRend(masterParameter) {
- defaultReferDataGrid({
- referType: 'coderesemblerule',
- isMuti: 'false',
- 'conditionMap["lcstatus"]': 'Enabled',
- 'limit': '-1',
- ...masterParameter
- }).then(res => {
- this.simData = res.data.records;
- })
+ this.$refs.ThemeSimChildren.defaultSearchRend();
},
//涓氬姟绫诲瀷澶辩劍
btmFoucus() {
this.BtmdialogVisible = true;
- this.btmdefaultRend()
- },
- //涓氬姟绫诲瀷纭畾
- btmHandlerClick() {
- if (this.btmSelectList.length > 1) {
- this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- } else if (this.btmSelectList.length <= 0) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- } else {
- this.$refs.myForm.clearValidate();
- this.BtmdialogVisible = false;
- this.btmSelectList = []
- this.$set(this.TreeAddform, 'btmTypeName', this.btmName)
- this.$set(this.TreeAddform, 'btmTypeId', this.btmOid)
- this.$emit('MasterHandler', this.loneTreeNewForm)
- this.masterRow = null;
- }
- },
- //涓氬姟绫诲瀷鏌ヨ
- BtmSelectFindeHandler() {
- const masterParameter = {};
- masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
- this.btmdefaultRend(masterParameter);
- },
- //涓氬姟绫诲瀷澶氶��
- btmSelect(row) {
- this.masterRow = row.$index;
- this.btmSelectList = row;
- this.btmName = row.name;
- this.btmOid = row.id;
- },
- //涓氬姟绫诲瀷鎺ュ彛
- btmdefaultRend(masterParameter) {
- referDataGrid({valueField: 'id', isMuti: 'false', 'limit': '-1', ...masterParameter}).then(res => {
- this.BtmData = res.data.data.records
- })
+ this.$refs.ThemeBtmChildren.btmDefaultRend();
},
//瀛愪紶鐖�
MasterHandler(val) {
@@ -1154,7 +917,12 @@
getAttr() {
this.loading = true;
return new Promise((resolve, reject) => {
- getAtrrList()
+ let conditionMaps = {};
+ conditionMaps["conditionMap[authType]"] = "classify_auth";
+ conditionMaps["conditionMap[buttonCode]"] = "classifyTree";
+ // 鍒嗙被鎺堟潈涓槸鍚﹀叿澶囨煡鐪嬫潈闄�
+ conditionMaps["conditionMap[menuCode]"] = "classify_view";
+ getAtrrList(conditionMaps)
.then(res => {
this.Treedata = res.data;
this.CloneTreedata = res.data;
@@ -1369,7 +1137,6 @@
this.loading = false;
}
},
-
async Deactivate() {
if (Object.keys(this.nodeClickList).length < 1) {
this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�');
@@ -1414,7 +1181,12 @@
},
//鏍戠偣鍑讳簨浠�
async nodeClick(data) {
- getAuthButtonList({classifyId: data.oid}).then(res => {
+ const response = this.findTheTopLevelNode(data, this.Treedata)
+ this.classifyData = response;
+ // console.log(response)
+ // console.log('response',response.attributes.id)
+ this.allButtons = true;
+ getAuthButtonList({classifyId: data.oid, code: "classifyTree", authType: "classify_auth"}).then(res => {
this.btnAuthList = res.data.data;
}).catch(error => {
console.log(error)
@@ -1427,10 +1199,9 @@
this.crudArray = []
try {
this.requestCount += 1;
- const [res1, res2, res3] = await Promise.all([
- TreeObjcet(data.oid),
+ const [res1, res2] = await Promise.all([
+ getObjectByOid(data.oid),
gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}),
- getObjectByOid(data.oid)
]);
this.FlagObj = res1.data.data;
this.Formlist = res2.data.data.filter(item => {
@@ -1448,7 +1219,7 @@
this.ProData = [];
this.crudOid = ''
}
- this.TreeEditObj = res3.data.data;
+ this.TreeEditObj = res1.data.data;
if (this.TreeEditObj.isParticipateCheck === null || this.TreeEditObj.isParticipateCheck === undefined || this.TreeEditObj.isParticipateCheck === "") {
this.$set(this.TreeEditObj, "isParticipateCheck", 1)
return
@@ -1457,7 +1228,32 @@
this.$message.error(error);
}
},
-
+ // 閫掑綊鏌ユ壘椤跺眰鑺傜偣Id
+ findTheTopLevelNode(data, TreeData) {
+ if (data.parentId === "") {
+ return data;
+ }
+ const parentNode = this.findParentNode(data.parentId, TreeData);
+ if (parentNode) {
+ return this.findTheTopLevelNode(parentNode, TreeData); // 缁х画鏌ユ壘鐖惰妭鐐�
+ }
+ },
+ // 閫掑綊鏌ユ壘鍑烘潵澶氬眰鑺傜偣鐨勭埗鑺傜偣
+ findParentNode(parentId, TreeData) {
+ for (const node of TreeData) {
+ if (node.oid === parentId) {
+ return node;
+ }
+ // 濡傛灉褰撳墠鑺傜偣杩樻湁瀛愯妭鐐癸紝缁х画鍘绘煡瀛愯妭鐐圭殑鐖惰妭鐐�
+ if (node.children) {
+ const parentNode = this.findParentNode(parentId, node.children);
+ if (parentNode) {
+ return parentNode;
+ }
+ }
+ }
+ return null;
+ },
async gridCode() {
try {
const res = await gridCodeClassifyTemplateAttr({
@@ -1508,34 +1304,28 @@
handleChange(column) {
this.type = column;
},
- AdvQueries() {
- this.FindFormVisible = false
- //濡傛灉鍏ㄩ儴涓虹┖ allEmpty涓簍rue
- const allEmpty = Object.values(this.QueryArray).every(value => !value);
- //濡傛灉鍏ㄩ儴涓虹┖锛岀偣鍑绘煡璇㈠嚭鐜版墍鏈夋暟鎹�
- if (allEmpty) {
- gridCodeClassifyTemplate().then(res => {
- this.Formlist = res.data.data
- })
+ advQueries() {
+ if (this.SearchValue === "") {
+ this.$message.warning('璇疯緭鍏ヨ鏌ヨ鐨勫唴瀹癸紒');
} else {
- //榛樿鏄瓑浜�
- gridCodeClassifyFindTemplate({'conditionMap[id]': this.QueryArray.id},
- {'conditionMap[name]': this.QueryArray.name},
- {'conditionMap[description]': this.QueryArray.description},
- {'conditionMap[revisionValue]': this.QueryArray.revisionValue},
- {'conditionMap[lcStatus]': this.QueryArray.lcStatus}
- ).then(res => {
- this.Formlist = res.data.data
- })
+ const condition = {
+ 'conditionMap[codeclassifyoid]': this.nodeClickList.oid,
+ [`conditionMap[${this.searchSelect}]`]: this.SearchValue
+ };
+ gridCodeClassifyFindTemplate(condition).then(res => {
+ if (res.data.data.length > 0) {
+ this.Formlist = res.data.data;
+ } else {
+ this.$message.error('鏆傛湭鏌ヨ鍒扮浉鍏虫ā鏉匡紒')
+ }
+ this.FindFormVisible = false;
+ });
}
},
- //妯℃澘绠$悊娓叉煋
- CrudRend() {
- gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': this.nodeClickList.oid}).then(res => {
- this.Formlist = res.data.data
- })
+ searchReset() {
+ this.SearchValue = "";
+ this.searchSelect = 'id'
},
-
//妯℃澘绠$悊琛ㄦ牸娣诲姞
CrudRowSave(row, done) {
if (this.nodeClickList.length <= 0) {
@@ -1733,9 +1523,9 @@
</script>
<style lang="scss" scoped>
-.el-container {
- height: 100%;
-}
+//.el-container {
+// height: 100%;
+//}
.el-aside {
//height: calc(100% - 30px);
@@ -1763,18 +1553,26 @@
width: 500px;
}
-.headerCon{
- .el-button+.el-button {
+.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;
}
+
+///deep/.el-scrollbar__bar.is-vertical{
+// width: 8px;
+//}
+
</style>
--
Gitblit v1.9.3