From 7ff176bf622d6a4bad0fb2bdf92f11a79f0dd24a Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 04 五月 2023 14:17:49 +0800
Subject: [PATCH] 增加弹窗界面,整合代码
---
Source/UBCS-WEB/src/api/code/codebasic.js | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java | 39
Source/UBCS-WEB/src/const/code/cloneOption.js | 48
Source/UBCS-WEB/src/api/code/codeClassifyValue.js | 33
Source/UBCS-WEB/src/const/code/referBtmDialog.js | 1
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyValueController.java | 6
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java | 20
Source/UBCS-WEB/src/const/code/parentClassifyParentOptionDialog.js | 1
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeClassifyValueVO.java | 36
Source/UBCS-WEB/src/const/code/fixedValueMgrDialog.js | 4
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeBasicSecMapper.xml | 2
Source/UBCS-WEB/src/views/code/code.vue | 4418 +++++++++++++++++++++---------------------
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeClassifyValueDTO.java | 36
Source/UBCS-WEB/src/const/code/selectAttrOptionDialog.js | 1
Source/UBCS-WEB/src/const/code/codebasic.js | 25
Source/UBCS-WEB/src/const/code/mdmrule.js | 2
Source/UBCS-WEB/src/views/code/clonecode.vue | 13
/dev/null | 615 -----
Source/UBCS/ubcs-common/src/main/java/com/vci/ubcs/common/constant/LauncherConstant.java | 2
Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue | 705 ++++++
Source/UBCS-WEB/src/const/code/cloneCodeRuleDialogOption.js | 44
Source/UBCS-WEB/src/main.js | 5
Source/UBCS-WEB/src/const/code/classisyValueTreeDialog.js | 58
Source/UBCS-WEB/src/const/code/cloneBasicDialogOption.js | 48
Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js | 2
25 files changed, 3,249 insertions(+), 2,917 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/code/codeClassifyValue.js b/Source/UBCS-WEB/src/api/code/codeClassifyValue.js
index b0c6927..91bb573 100644
--- a/Source/UBCS-WEB/src/api/code/codeClassifyValue.js
+++ b/Source/UBCS-WEB/src/api/code/codeClassifyValue.js
@@ -6,7 +6,38 @@
method: 'get',
params: {
...params,
-
}
})
+}
+
+export const addSaveCodeClassifyValue = (codeFixedValueDTO) => {
+ return request({
+ url: '/api/ubcs-code/codeClassifyValueController/addSave',
+ method: 'post',
+ data: codeFixedValueDTO
+ })
+}
+
+export const editCodeClassifyValue = (codeFixedValueDTO) => {
+ return request({
+ url: '/api/ubcs-code/codeClassifyValueController/editSave',
+ method: 'put',
+ data: codeFixedValueDTO,
+ })
+}
+
+export const deleteCodeClassifyValue = (codeFixedValueDTO) => {
+ return request({
+ url: '/api/ubcs-code/codeClassifyValueController/deleteData',
+ method: 'delete',
+ data: codeFixedValueDTO,
+ })
+}
+
+export const saveCodeClassifyValueOrder = (data) => {
+ return request({
+ url: '/api/ubcs-code/codeClassifyValueController/saveOrder',
+ method: 'post',
+ data: data,
+ })
}
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/api/code/codebasic.js b/Source/UBCS-WEB/src/api/code/codebasic.js
index 38829d7..845eff6 100644
--- a/Source/UBCS-WEB/src/api/code/codebasic.js
+++ b/Source/UBCS-WEB/src/api/code/codebasic.js
@@ -80,7 +80,7 @@
})
}
-export const clone = (row) => {
+export const cloneCodeBasic = (row) => {
return request({
url: '/api/ubcs-code/codeBasicSecController/clone',
method: 'post',
diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue b/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
new file mode 100644
index 0000000..1b582e6
--- /dev/null
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
@@ -0,0 +1,705 @@
+<template>
+ <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐� -->
+ <el-dialog
+ title="鍏紡缂栬緫妗�"
+ append-to-body
+ :visible.sync="isShowformulaEdit"
+ @close="closeFormulaEdit"
+ width="78%"
+ style="height: 150vh; margin-top: -13vh; overflow: hidden">
+
+ <div style="overflow-y: auto; height: 80vh">
+ <el-row>
+ <!-- 宸︿晶鍏紡鍐呭 -->
+ <el-col :span="14" style="overflow: hidden">
+ <el-card
+ class="box-card"
+ style="height: 33vh; overflow-y: auto; overflow-x: auto">
+ <div slot="header" class="clearfix">
+ <span style="font-size: medium">鍏紡鍐呭</span>
+ <el-button
+ type="primary"
+ size="mini"
+ style="float: right"
+ @click="saveFormulaContent">
+ 纭畾
+ </el-button>
+ <el-button
+ type="warning"
+ size="mini"
+ style="margin-right: 10px; float: right"
+ @click="resetFormulaContent">
+ 娓呯┖鍐呭
+ </el-button>
+ </div>
+ <div class="text item">
+ <el-input
+ type="textarea"
+ :rows="5"
+ style="width: 560px"
+ v-model="formulaContent"
+ ></el-input>
+ </div>
+ </el-card>
+ </el-col>
+ <!-- 鍙充晶杩愮畻绗� -->
+ <el-col :span="10">
+ <el-card
+ class="box-card"
+ style="height: 33vh;">
+ <div slot="header" class="clearfix">
+ <span style="font-size: medium">杩愮畻绗�</span>
+ </div>
+ <div class="text item">
+ <div class="formula-editor">
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '7' })"
+ >
+ 7
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '8' })"
+ >
+ 8
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '9' })"
+ >
+ 9
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '/' })"
+ >
+ /</button
+ ><br />
+ </div>
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '4' })"
+ >
+ 4
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '5' })"
+ >
+ 5
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '6' })"
+ >
+ 6
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '*' })"
+ >
+ *</button
+ ><br />
+ </div>
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '1' })"
+ >
+ 1
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '2' })"
+ >
+ 2
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '3' })"
+ >
+ 3
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '>' })"
+ >
+ -</button
+ ><br />
+ </div>
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '0' })"
+ >
+ 0
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '00' })"
+ >
+ 00
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '.' })"
+ >
+ .
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '+' })"
+ >
+ +</button
+ ><br />
+ </div>
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '->' })"
+ >
+ ->
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '==' })"
+ >
+ ==
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '(' })"
+ >
+ (
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: ')' })"
+ >
+ )</button
+ ><br />
+ </div>
+ <div class="one">
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '<' })"
+ >
+ <
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '>' })"
+ >
+ >
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '<=' })"
+ >
+ <=
+ </button>
+ <button
+ class="formula-editor-btn-sm"
+ @click="dbClickAddContent({ formula: '>=' })"
+ >
+ >=
+ </button>
+ </div>
+ </div>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+ <el-row>
+ <!-- 宸︿晶鍏紡閫夋嫨鍖哄煙 -->
+ <el-col :span="14" style="overflow: hidden">
+ <el-card
+ class="box-card"
+ style="height: 40vh; overflow-y: auto; overflow-x: auto"
+ >
+ <div slot="header" class="clearfix">
+ <span style="font-size: medium">鍏紡閫夋嫨</span>
+ </div>
+ <div class="text item">
+ <el-tabs v-model="activeName">
+ <el-tab-pane label="甯哥敤" name="first">
+ <el-table
+ :data="commonFormulaTableData"
+ :show-header="false"
+ @row-dblclick="dbClickAddContent"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="300">
+ </el-table-column>
+ <el-table-column prop="desc" width="300"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+
+ <el-tab-pane label="璐㈠姟" name="second">
+ <el-table
+ :data="financialFormulaTableData"
+ @row-dblclick="dbClickAddContent"
+ :show-header="false"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="300">
+ </el-table-column>
+ <el-table-column prop="desc" width="300"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+
+ <el-tab-pane label="鏃ユ湡" name="third">
+ <el-table
+ :data="dateFormulaTableData"
+ :show-header="false"
+ @row-dblclick="dbClickAddContent"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="300">
+ </el-table-column>
+ <el-table-column prop="desc" width="300"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+
+ <el-tab-pane label="鏁板" name="fourth">
+ <el-table
+ :data="mathFormulaTableData"
+ :show-header="false"
+ @row-dblclick="dbClickAddContent"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="300">
+ </el-table-column>
+ <el-table-column prop="desc" width="300"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+
+ <el-tab-pane label="鍏朵粬" name="five">
+ <el-table
+ :data="otherFormulaTableData"
+ @row-dblclick="dbClickAddContent"
+ :show-header="false"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="300">
+ </el-table-column>
+ <el-table-column prop="desc" width="300"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </el-card>
+ </el-col>
+ <!-- 鍙充晶鍙橀噺閫夋嫨鍖哄煙 -->
+ <el-col :span="10" style="overflow: hidden">
+ <el-card
+ class="box-card"
+ style="height: 40vh; overflow-y: auto; overflow-x: auto"
+ >
+ <div slot="header" class="clearfix">
+ <span style="font-size: medium">鍙橀噺</span>
+ </div>
+ <div class="text item">
+ <el-tabs v-model="activeNameAttr">
+ <el-tab-pane label="鏈満鏅彉閲�" name="first">
+ <el-table
+ :data="thisSceneTableData"
+ @row-dblclick="dbClickAddContent"
+ :show-header="false"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="40">
+ </el-table-column>
+ <el-table-column prop="desc" width="100"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ <el-tab-pane label="绯荤粺鍙橀噺" name="second">
+ <el-table
+ :data="systemVariableTableData"
+ @row-dblclick="dbClickAddContent"
+ :show-header="false"
+ style="width: 100%"
+ >
+ <el-table-column prop="formula" width="150">
+ </el-table-column>
+ <el-table-column prop="desc" width="150"> </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+ </div>
+
+ </el-dialog>
+</template>
+
+ <script>
+export default {
+ name: "formulaEditor",
+ props: {
+ //鏈満鏅彉閲�
+ thisSceneTableData: {
+ type: Array,
+ },
+ //绯荤粺鍙橀噺
+ systemVariableTableData: {
+ type: Array,
+ },
+ },
+ data() {
+ return {
+ isShowformulaEdit: false, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
+ formulaContent: '', //鍏紡缂栬緫妗嗗唴瀹�,鏂逛究鍊肩殑鍥炰紶
+ activeName: 'first', //褰撳墠娲诲姩鐨則ab
+ activeNameAttr: 'first', //鍙橀噺涓殑褰撳墠娲诲姩tab
+ //甯哥敤鍏紡
+ commonFormulaTableData: [
+ {
+ formula: "if(compare,trueResult,falseResult)",
+ desc: "濡傛灉compare鐨勮〃杈惧紡涓簍rue锛屽垯鎵цtrueResult鐨勮〃杈惧紡锛屽惁鍒欐墽琛宖laseResult.渚嬪if(3>2,2*(3+2),3/(2-4)),鍊肩瓑浜�10",
+ },
+ {
+ formula: "sum(douber1,douber2)",
+ desc: "涓や釜鏍煎紡涓篸ouber鐨勫弬鏁版眰鍜�",
+ },
+ {
+ formula: "sub(douber1,douber2)",
+ desc: "鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1鍑忓幓鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2",
+ },
+ {
+ formula: "mul(douber1,douber2)",
+ desc: "涓や釜鏍煎紡涓篸ouber鐨勫弬鏁扮浉涔�",
+ },
+ {
+ formula: "div(douber1,douber2)",
+ desc: "鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1闄や互鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2.褰揹ouber2绛変簬0鐨勬椂鍊欙紝杩斿洖0;濡傛灉闄や笉灏界殑鏃跺�欎繚鐣�10浣嶅皬鏁�",
+ },
+ {
+ formula: "mod(int,int)",
+ desc: "姹備綑鏁�",
+ },
+ {
+ formula: "toInt(string)",
+ desc: "杞崲涓篿nt鏍煎紡",
+ },
+ {
+ formula: "doubleRound(string,count)",
+ desc: "澶勭悊douber鐨勫皬鏁颁綅鏁帮紝count琛ㄧず灏忔暟浣嶆暟",
+ },
+ {
+ formula: "zeroIfNull(value)",
+ desc: '濡傛灉鍙傛暟鐨勫�间负null鎴栬��"",灏嗚繑鍥�0',
+ },
+ {
+ formula: "endsWith(string,str1)",
+ desc: "瀛楃涓瞫tring鏄笉鏄互str1缁撳熬",
+ },
+ {
+ formula: "startsWith(string,str1)",
+ desc: "瀛楃涓瞫tring鏄惁浠tr1寮�澶�",
+ },
+ {
+ formula: "charAt(string,index)",
+ desc: "鑾峰彇瀛楃涓瞫tring涓index浣嶇疆鐨勫瓧绗︼紝濡傛灉闀垮害灏忎簬index锛屽垯杩斿洖",
+ },
+ {
+ formula: "equalsIgnoreCase(str1,str2)",
+ desc: "瀛楃涓瞫tr1鍜屽瓧绗︿覆str2鏄惁鐩哥瓑",
+ },
+ {
+ formula: "indexOf(str1,str2)",
+ desc: "瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓娆″嚭鐜扮殑浣嶇疆",
+ },
+ {
+ formula: "isEmpty(str1)",
+ desc: "鍙傛暟str1鏄惁涓虹┖锛屽叾涓璶ull杩欎釜瀛楃涓蹭篃琛ㄧず涓虹┖",
+ },
+ {
+ formula: "lastIndexOf(str1,str2)",
+ desc: "瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓渶鍚庡嚭鐜扮殑浣嶇疆",
+ },
+ {
+ formula: "leftStr(str1,index)",
+ desc: "鑾峰彇index浣嶇疆宸︿晶鐨勬墍鏈夊瓧绗�",
+ },
+ {
+ formula: "rightStr(str1,str2)",
+ desc: "鑾峰彇index浣嶇疆鍙充晶鐨勬墍鏈夊瓧绗�",
+ },
+ {
+ formula: "length(str1)",
+ desc: "鍙傛暟str1鐨勯暱搴�",
+ },
+ {
+ formula: "mid(str1,start,end)",
+ desc: "鑾峰彇str1鐨勪粠start鍒癳nd鐩存帴鐨勫瓧绗︿覆锛屽嚭鐜板紓甯告椂杩斿洖",
+ },
+ {
+ formula: "tolowercase(str1)",
+ desc: "灏嗗瓧绗︿覆str1杞负灏忓啓",
+ },
+ {
+ formula: "touppercase(str1)",
+ desc: "灏嗗瓧绗︿覆str1杞负澶у啓",
+ },
+ {
+ formula: "trimzero(str1)",
+ desc: "鍘婚櫎瀛楃涓瞫tr1涓殑0",
+ },
+ {
+ formula: "MD5(str1)",
+ desc: "灏嗗瓧绗︿覆杩涜MD5鍔犲瘑",
+ },
+ ],
+ //璐㈠姟鍏紡
+ financialFormulaTableData: [
+ {
+ formula: "toChinese(value)",
+ desc: "灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楀ぇ鍐欐柟寮�",
+ },
+ {
+ formula: "getChineseCurrency(value)",
+ desc: "灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楅噾棰濆ぇ鍐欐柟寮忥紝涓巘ochiness鐨勫尯鍒槸杩欎釜浼氭樉绀哄厓銆佽銆佸垎",
+ },
+ {
+ formula: "setThmark(value)",
+ desc: "涓哄弬鏁皏alue璁剧疆鍗冨垎浣�",
+ },
+ ],
+ //鏃ユ湡鍏紡
+ dateFormulaTableData: [
+ {
+ formula: "compareDate(d1,d2)",
+ desc: "瀵规瘮鍙傛暟d1,d2鐨勫ぇ灏忋�俤1,d2涓簓yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆",
+ },
+ {
+ formula: "nowDate()",
+ desc: "鑾峰彇褰撳墠鏃ユ湡",
+ },
+ {
+ formula: "chinaDate(d1)",
+ desc: "灏嗘椂闂磋浆鎹负鍐滃巻锛宒1鏄痽yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆",
+ },
+ {
+ formula: "dateAdd(d1,count)",
+ desc: "鍦╠1鐨勫熀纭�涓婃坊鍔燾ount澶�,d1涓簓yyy-MM-dd HH:mm:ss鏍煎紡鐨勬椂闂村瓧绗︿覆",
+ },
+ {
+ formula: "dateBalanceYear(sourceDate,targetDate,false)",
+ desc: '璁$畻鐩稿樊鐨勫勾浠斤紝姣斿璁$畻骞撮緞锛宼argetDate涓�""琛ㄧず褰撳墠鏃堕棿锛岀涓変釜鍙傛暟涓簍rue琛ㄧず鏈夊浣欑殑鏈堜唤鎴栬�呭ぉ鏁版椂锛屽氨鍔�1;',
+ },
+ {
+ formula: "dateBalanceDay(sourceDate,targetDate)",
+ desc: '璁$畻鐩稿樊鐨勫ぉ鏁帮紝targetDate涓�""琛ㄧず褰撳墠鏃堕棿',
+ },
+ {
+ formula: "dateformat(d1,format)<",
+ desc: "灏嗗綋鍓嶇殑鏃ユ湡锛堟椂闂达級瀛楃涓茶浆涓烘寚瀹氱殑瀛楃涓诧紝濡傛灉format鐨勫唴瀹规湁绌烘牸锛岃浣跨敤&浠f浛",
+ },
+ {
+ formula: "nowDatetime()",
+ desc: "鑾峰彇褰撳墠鏃ユ湡鍜屾椂闂淬�傛牸寮忎负yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ formula: "dayOf(d1)",
+ desc: "鑾峰彇鏍煎紡涓簓yyy-MM-dd鐨勬棩鏈熺殑澶╂暟",
+ },
+ {
+ formula: "nowMon()",
+ desc: "鑾峰彇褰撳墠鐨勬湀浠斤紝鏍煎紡涓篗M",
+ },
+ {
+ formula: "monOf(d1)",
+ desc: "鑾峰彇鏃ユ湡d1鐨勬湀浠芥暟",
+ },
+ {
+ formula: "nowTime()",
+ desc: "鑾峰彇褰撳墠鏃堕棿锛屾牸寮忎负HH:mm:ss",
+ },
+ {
+ formula: "nowYear()",
+ desc: "鑾峰彇骞翠唤锛屾牸寮忎负yyyy",
+ },
+ {
+ formula: "yearOf()",
+ desc: "鑾峰彇鏃堕棿d1鐨勫勾浠�",
+ },
+ ],
+ //鏁板鍏紡
+ mathFormulaTableData: [
+ {
+ formula: "abs(value)",
+ desc: "姹傚弬鏁皏alue鐨勭粷瀵瑰�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "acos(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弽浣欏鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "asin(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弽姝e鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "atan(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弽姝e垏锛寁alue蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "cbrt(value)",
+ desc: "姹傚弬鏁皏alue鐨勭珛鏂规牴锛寁alue蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "ceil(value)",
+ desc: "杩斿洖涓嶅ぇ浜庡弬鏁皏alue鐨勬渶灏忔暣鏁帮紝渚嬪ceil(1.7)灏辩瓑浜�2锛寁alue蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "cos(value)",
+ desc: "姹傚弬鏁皏alue鐨勪綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "cosh(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弻鏇蹭綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "exp(n)",
+ desc: "娆ф媺鏁� e 鐨刵娆″箓锛宯蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "floor(n)",
+ desc: "娆ф媺鏁� e 鐨刵娆″箓鍑�1锛宯蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "log(value)",
+ desc: "杩斿洖涓嶅皬浜庡弬鏁皏alue鐨勬渶澶ф暣鏁帮紝渚嬪floor(1.7)绛変簬1锛宯蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "log10(value)",
+ desc: "鑷劧瀵规暟,value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "log1p(value)",
+ desc: "璁$畻搴曟暟涓� 10 鐨勫鏁�,value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "random()",
+ desc: "杩斿洖鍙傛暟涓� 1 涔嬪拰鐨勮嚜鐒跺鏁帮紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "rint(value)",
+ desc: "杩斿洖涓�涓吉闅忔満鏁帮紝璇ュ�煎ぇ浜庣瓑浜� 0.0 涓斿皬浜� 1.0",
+ },
+ {
+ formula: "round(value)",
+ desc: "杩斿洖鍏跺�兼渶鎺ヨ繎鍙傛暟骞朵笖鏄暣鏁扮殑 double 鍊笺�傚鏋滀袱涓暣鏁扮殑 double 鍊奸兘鍚屾牱鎺ヨ繎锛岄偅涔堢粨鏋滃彇鍋舵暟銆傜壒娈婃儏鍐垫槸锛氬鏋滃弬鏁板�兼槸鏁存暟锛岄偅涔堢粨鏋滃氨鏄鍙傛暟銆傚鏋滃弬鏁版槸 NaN 鎴栨棤绌峰ぇ鎴栨闆舵垨璐熼浂锛岄偅涔堢粨鏋滀笌鍙傛暟鐩稿悓",
+ },
+ {
+ formula: "signum(value)",
+ desc: "绗﹀彿鍑芥暟锛涘鏋滃弬鏁颁负 0锛屽垯杩斿洖 0锛涘鏋滃弬鏁板ぇ浜� 0锛� 鍒欒繑鍥� 1.0锛涘鏋滃弬鏁板皬浜� 0锛屽垯杩斿洖 -1.0",
+ },
+ {
+ formula: "sin(value)",
+ desc: "姹傚弬鏁皏alue鐨勬寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "sinh(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弻鏇叉寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "tan(value)",
+ desc: "姹傚弬鏁皏alue鐨勬鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "tanh(value)",
+ desc: "姹傚弬鏁皏alue鐨勫弻鏇叉鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�",
+ },
+ {
+ formula: "max(v1,v2)",
+ desc: "姹備袱涓暟涓殑杈冨ぇ鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3.2",
+ },
+ {
+ formula: "min(v1,v2)",
+ desc: "姹備袱涓暟涓殑杈冨皬鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3",
+ },
+ {
+ formula: "sqrt(value)",
+ desc: "姹傚钩鏂规牴",
+ },
+ ],
+ //鍏朵粬鍏紡
+ otherFormulaTableData: [
+ {
+ formula: "getcolvalue(servername,tablename,fieldname,pkField,pkValue)",
+ desc: "鏌ヨservername涓璽ablename鏁版嵁搴撹〃涓璮ieldname瀛楁鐨勫�硷紝pkfield琛ㄧず涓婚敭鐨勫瓧娈靛悕绉帮紝pkValue琛ㄧず涓婚敭鐨勫�硷紝serverName鐜板湪榛樿涓簂ocalServer",
+ },
+ ],
+ };
+ },
+ methods: {
+
+ //鍙屽嚮娣诲姞鍏紡鍐呭
+ dbClickAddContent(row){
+ //console.log(row.formula);
+ this.formulaContent = this.formulaContent + row.formula;
+ },
+ //娓呯┖鍏紡鍐呭
+ resetFormulaContent(){
+ this.formulaContent = '';
+ },
+ //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
+ closeFormulaEdit(){
+ this.resetFormulaContent();
+ },
+ //缂栬緫瀹屾垚鍏紡鍐呭鍥炴樉骞跺叧闂璇濇
+ saveFormulaContent(){
+ //console.log(this.formulaContent);
+ if(this.formulaContent.trim == null || this.formulaContent.trim == ''){
+ this.$message.warning("鍏紡鍐呭涓嶈兘涓虹┖锛�");
+ return;
+ }
+ //鍏紡鍐呭鍥炴樉
+ this.$emit('updateFormulaContent', this.formulaContent) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
+ this.isShowformulaEdit = false;
+ },
+
+ },
+};
+</script>
+
+<style scoped>
+ .formula-editor{
+ margin-top: -15px;
+ margin-left: 4vw;
+ /*璁剧疆寮规�х洅瀛�*/
+ display: flex;
+ /*瀛愬厓绱犱互绔栧垪鎺掑垪锛屼竴鍏辨湁6鍒�*/
+ flex-direction:column;
+ width: 310px;
+ height: 185px;
+ /*宸﹀彸鍧囧寑鎺掑垪*/
+ justify-content: space-around;
+ /*涓婁笅鍧囧寑鎺掑垪*/
+ align-items: center;
+ }
+
+ .one{
+ display: flex;
+ /*浠ヨ鎺掑垪*/
+ flex-direction: row;
+ width: 223px;
+ height: 80px;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .formula-editor-btn-sm {
+ width: 55px;
+ height: 29px;
+ background: rgb(153, 214, 240);
+ border-radius: 10%;
+ }
+</style>
+
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js b/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js
index 8ae347a..c812387 100644
--- a/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js
+++ b/Source/UBCS-WEB/src/const/code/classifyTreeOptionDialog.js
@@ -6,7 +6,7 @@
lazy: true,
treeLoad: function (node, resolve) {
// const parentId = (node.level === 0) ? 0 : node.data.id;
- treeTopCodeClassify({"queryAllLevel": true,"loadType": "all","multipleSelect": false,}).then( res=> {
+ treeTopCodeClassify({"queryAllLevel": true,"loadType": "all","multipleSelect": false}).then( res=> {
resolve(res.data.map(classifyitem => {
let item = {
"hasChildren": false,
diff --git a/Source/UBCS-WEB/src/const/code/classisyValueTreeDialog.js b/Source/UBCS-WEB/src/const/code/classisyValueTreeDialog.js
index 574257d..8673ed6 100644
--- a/Source/UBCS-WEB/src/const/code/classisyValueTreeDialog.js
+++ b/Source/UBCS-WEB/src/const/code/classisyValueTreeDialog.js
@@ -1,43 +1,41 @@
-import { treeCodeClassifyValue } from "@/api/code/codeClassifyValue";
-
export default {
nodeKey: 'oid',
border: true,
- lazy: true,
+ lazy: false,
+ defaultExpandAll: true,
treeLoad: function (node, resolve) {
// const parentId = (node.level === 0) ? 0 : node.data.id;
- let condtionData = {
- "queryAllLevel": true,
- "loadType": "all",
- "multipleSelect": false,
- "isMuti": false,
- "isQueryAllColumn": true,
- 'conditionMap[codeclassifysecoid]':this.currentSelectTreeData.oid}
- treeCodeClassifyValue().then( res=> {
- console.log(res);
- resolve(res.data.map(classifyitem => {
- let item = {
- "hasChildren": false,
- "oid": classifyitem.oid,
- "key": classifyitem.oid,
- "parentId": 0,
- "title": classifyitem.text,
- "value": classifyitem.oid,
- }
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
+
+ // treeCodeClassifyValue(condtionData).then( res=> {
+ // console.log(res);
+ // resolve(res.data.map(classifyValueItem => {
+ // let item = {
+ // "hasChildren": item.children!=null,
+ // "oid": classifyValueItem.oid,
+ // "key": classifyValueItem.oid,
+ // "parentId": classifyValueItem.parentclassifyvalueoid,
+ // "title": classifyValueItem.text,
+ // "value": classifyValueItem.oid,
+ // }
+ // return {
+ // ...item,
+ // leaf: item.hasChildren
+ // }
+ // }))
+ // });
},
addBtn: false,
menu: false,
size: 'small',
props: {
- labelText: '鏍囬',
- label: 'title',
- value: 'value',
+ labelText: 'text',
+ label: 'text',
+ key: 'oid',
+ value: 'oid',
+ parentId: 'parentId',
+ parentBtmName: 'parentBtmName',
+ parentName: 'parentName',
+ codeclassifysecoid: 'codeclassifysecoid',
children: 'children'
}
}
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/const/code/cloneBasicDialogOption.js b/Source/UBCS-WEB/src/const/code/cloneBasicDialogOption.js
new file mode 100644
index 0000000..9652ecc
--- /dev/null
+++ b/Source/UBCS-WEB/src/const/code/cloneBasicDialogOption.js
@@ -0,0 +1,48 @@
+export default {
+ height:"190px",
+ calcHeight: 30,
+ tip: false,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ searchShow: false,
+ searchBtn: false,
+ searchMenuSpan: 5,
+ disablePage: false,
+ border: true,
+ index: true,
+ viewBtn: false,
+ selection: true,
+ menu: false,
+ refreshBtn: false,
+ columnBtn: false,
+ dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
+ column: [
+ {
+ label: "鐮佹缂栧彿",
+ prop: "id",
+ search: false,
+ searchLabelWidth: 80,
+ searchSpan: 5,
+ },
+ {
+ label: "鐮佹鍚嶇О",
+ prop: "name",
+ search: false,
+ searchLabelWidth: 80,
+ searchSpan: 5,
+ },
+ {
+ label: "鐮佹鎻忚堪",
+ prop: "description",
+ search: false,
+ span: 24,
+ },
+ {
+ label: "鐮佹绫诲瀷",
+ prop: "secTypeText",
+ }
+
+ ]
+}
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/const/code/cloneCodeRuleDialogOption.js b/Source/UBCS-WEB/src/const/code/cloneCodeRuleDialogOption.js
new file mode 100644
index 0000000..abc2316
--- /dev/null
+++ b/Source/UBCS-WEB/src/const/code/cloneCodeRuleDialogOption.js
@@ -0,0 +1,44 @@
+export default {
+ height:"210px",
+ calcHeight: 30,
+ tip: false,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ searchShow: false,
+ searchMenuSpan: 5,
+ disablePage: true,
+ border: true,
+ index: true,
+ viewBtn: false,
+ selection: true,
+ menu: false,
+ refreshBtn: false,
+ columnBtn: false,
+ dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
+ column: [
+ {
+ label: "缂栧彿",
+ prop: "id",
+ search: false,
+ },
+ {
+ label: "鍚嶇О",
+ prop: "name",
+ search: false,
+ },
+ {
+ label: "鎻忚堪",
+ prop: "description",
+ search: false,
+ type: "textarea",
+ span: 24,
+ },
+ {
+ label: "鐘舵��",
+ prop: "lcStatusText",
+ search: false,
+ },
+ ]
+ }
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/const/code/cloneOption.js b/Source/UBCS-WEB/src/const/code/cloneOption.js
new file mode 100644
index 0000000..cb90ef4
--- /dev/null
+++ b/Source/UBCS-WEB/src/const/code/cloneOption.js
@@ -0,0 +1,48 @@
+export default {
+ height:'350px',
+ calcHeight: 30,
+ tip: false,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ searchShow: false,
+ searchMenuSpan: 5,
+ disablePage: false,
+ border: true,
+ index: true,
+ viewBtn: false,
+ selection: false,
+ menu:true,
+ refreshBtn: false,
+ columnBtn: false,
+ dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
+ column: [
+ {
+ label: "鐮佹缂栧彿",
+ prop: "id",
+ search: false,
+ searchLabelWidth: 80,
+ searchSpan: 5,
+ },
+ {
+ label: "鐮佹鍚嶇О",
+ prop: "name",
+ search: false,
+ searchLabelWidth: 80,
+ searchSpan: 5,
+ },
+ {
+ label: "鐮佹鎻忚堪",
+ prop: "description",
+ search: false,
+ span: 24,
+ },
+ {
+ label: "鐮佹绫诲瀷",
+ prop: "secTypeText",
+ search: false,
+ }
+
+ ]
+}
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/const/code/codebasic.js b/Source/UBCS-WEB/src/const/code/codebasic.js
index 78dae04..a67ccaa 100644
--- a/Source/UBCS-WEB/src/const/code/codebasic.js
+++ b/Source/UBCS-WEB/src/const/code/codebasic.js
@@ -1,6 +1,5 @@
export default {
height:'auto',
- with: '60%',
calcHeight: 30,
tip: false,
editBtn: false,
@@ -12,6 +11,7 @@
index: true,
viewBtn: false,
selection: true,
+ menuWidth:260,
dialogClickModal: false,
highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
column: [
@@ -21,11 +21,6 @@
search: true,
searchLabelWidth: 80,
searchSpan: 5,
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ爜娈电紪鐮�",
- trigger: "blur",
- }]
},
{
label: "鐮佹鍚嶇О",
@@ -33,34 +28,16 @@
search: true,
searchLabelWidth: 80,
searchSpan: 5,
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ爜娈靛悕绉�",
- trigger: "blur"
- }]
},
{
label: "鐮佹鎻忚堪",
prop: "description",
search: false,
- type: "textarea",
span: 24,
- rules: [{
- required: false,
- message: "璇疯緭鍏ョ爜娈靛悕绉�",
- trigger: "blur"
- }]
},
{
label: "鐮佹绫诲瀷",
prop: "secTypeText",
- search: false,
- type: "select",
- rules: [{
- required: true,
- message: "璇烽�夋嫨鐮佹绫诲瀷",
- trigger: "blur"
- }],
}
]
diff --git a/Source/UBCS-WEB/src/const/code/fixedValueMgrDialog.js b/Source/UBCS-WEB/src/const/code/fixedValueMgrDialog.js
index 2226b8f..674ff41 100644
--- a/Source/UBCS-WEB/src/const/code/fixedValueMgrDialog.js
+++ b/Source/UBCS-WEB/src/const/code/fixedValueMgrDialog.js
@@ -1,6 +1,6 @@
export default {
- with: '70%',
- height: '55vh',
+ //width: '70%',
+ height: '60vh',
calcHeight: 30,
tip: false,
editBtn: false,
diff --git a/Source/UBCS-WEB/src/const/code/mdmrule.js b/Source/UBCS-WEB/src/const/code/mdmrule.js
index 791bd76..2a27f96 100644
--- a/Source/UBCS-WEB/src/const/code/mdmrule.js
+++ b/Source/UBCS-WEB/src/const/code/mdmrule.js
@@ -1,5 +1,5 @@
export default {
- height:"200px",
+ height:"220px",
calcHeight: 30,
tip: false,
editBtn:false,
diff --git a/Source/UBCS-WEB/src/const/code/parentClassifyParentOptionDialog.js b/Source/UBCS-WEB/src/const/code/parentClassifyParentOptionDialog.js
index 2767104..b195987 100644
--- a/Source/UBCS-WEB/src/const/code/parentClassifyParentOptionDialog.js
+++ b/Source/UBCS-WEB/src/const/code/parentClassifyParentOptionDialog.js
@@ -1,5 +1,4 @@
export default {
- with: '60%',
height: '40vh',
calcHeight: 30,
tip: false,
diff --git a/Source/UBCS-WEB/src/const/code/referBtmDialog.js b/Source/UBCS-WEB/src/const/code/referBtmDialog.js
index 4ccf4d3..9533435 100644
--- a/Source/UBCS-WEB/src/const/code/referBtmDialog.js
+++ b/Source/UBCS-WEB/src/const/code/referBtmDialog.js
@@ -1,5 +1,4 @@
export default {
- with: '60%',
height: '40vh',
calcHeight: 30,
tip: false,
diff --git a/Source/UBCS-WEB/src/const/code/selectAttrOptionDialog.js b/Source/UBCS-WEB/src/const/code/selectAttrOptionDialog.js
index babacb9..2437b44 100644
--- a/Source/UBCS-WEB/src/const/code/selectAttrOptionDialog.js
+++ b/Source/UBCS-WEB/src/const/code/selectAttrOptionDialog.js
@@ -1,5 +1,4 @@
export default {
- with: '60%',
calcHeight: 30,
tip: false,
editBtn: false,
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index b4ba27a..70cbc70 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -32,10 +32,11 @@
import Torelationpackage from "@/views/modeling/Torelationpackage"
import originalRange from "@/views/modeling/originalRange"
import originalLink from "@/views/modeling/originalLink"
-import addBasicCode from './views/code/addbasiccode';
import classifyTrees from "@/components/Tree/classifyTrees"
import classifyTreeform from "@/components/Tree/classifyTreeform"
import TemplatePro from "@/components/Tree/TemplatePro"
+import formulaEditor from "@/components/code-dialog-page/formulaEditor"
+
// 娉ㄥ唽鍏ㄥ眬crud椹卞姩
window.$crudCommon = crudCommon;
// 鍔犺浇Vue鎷撳睍
@@ -64,10 +65,10 @@
Vue.component('Torelationpackage',Torelationpackage)
Vue.component('originalRange',originalRange)
Vue.component('originalLink',originalLink)
-Vue.component('addBasicCode',addBasicCode)
Vue.component('classifyTrees',classifyTrees)
Vue.component('classifyTreeform',classifyTreeform)
Vue.component('TemplatePro',TemplatePro)
+Vue.component('formulaEditor',formulaEditor)
// 鍔犺浇鐩稿叧url鍦板潃
Object.keys(urls).forEach(key => {
diff --git a/Source/UBCS-WEB/src/views/code/addbasiccode.vue b/Source/UBCS-WEB/src/views/code/addbasiccode.vue
deleted file mode 100644
index 86c742e..0000000
--- a/Source/UBCS-WEB/src/views/code/addbasiccode.vue
+++ /dev/null
@@ -1,615 +0,0 @@
-<template>
-
- <div class="total" style="overflow-y: auto; height: 70vh">
- <el-form :model="form" :rules="formRules" ref="form" >
- <span class="left">
- <el-form-item label="鐮佹缂栧彿:" :label-width="leftFormLabelWidth" required prop="id">
- <el-input v-model="form.id" ></el-input>
- </el-form-item>
-
- <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required prop="name">
- <el-input v-model="form.name"></el-input>
- </el-form-item>
-
- <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required prop="sectype">
- <el-select v-model="form.sectype" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems">
- <el-option
- v-for="item in sectypeList"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item label="鎻忚堪:" :label-width="leftFormLabelWidth">
- <el-input type="textarea" v-model="form.description"></el-input>
- </el-form-item>
-
- <el-form-item label="鏄惁娴佹按渚濊禆:" :label-width="leftFormLabelWidth">
- <el-switch v-model="form.serialDependFlag"></el-switch>
- <el-input-number v-show="form.serialDependFlag" v-model="form.serialDependOrder" controls-position="right"></el-input-number>
- </el-form-item>
-
- <el-form-item label="鏄惁涓虹┖:" :label-width="leftFormLabelWidth">
- <el-switch v-model="form.nullableFlag"></el-switch>
- </el-form-item>
- </span>
-
- <el-divider direction="vertical"></el-divider>
-
- <span class="right">
-
- <!-- 鍥哄畾鐮佹 -->
- <div v-show="form.sectype==='codefixedsec' ? true:false">
- <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
- <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeSecLengthType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength"></el-input>
- </el-form-item>
- </div>
-
- <!-- 灞炴�х爜娈� -->
- <div v-show="form.sectype==='codeattrsec' ? true:false">
-
- <el-form-item label="灞炴��:" :label-width="rightFormLabelWidth" required prop="referAttributeName">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referAttributeName"
- @focus="openAttrSelectOrGetValue('attr')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('attr')" style="cursor: pointer;"></i>
- </el-input>
- </el-form-item>
-
- <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
- <el-input
- v-model="form.referCodeClassifyOidName"
- disabled>
- </el-input>
- </el-form-item>
-
- <el-form-item label="鍙栧�艰鍒�:" :label-width="rightFormLabelWidth">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.getValueClass"
- @focus="openAttrSelectOrGetValue('value')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('value')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
-
- </div>
-
- <!-- 娴佹按鐮佹 -->
- <div v-show="form.sectype==='codeserialsec' ? true:false">
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鍙风殑璧峰鍊�:" :label-width="rightFormLabelWidth" prop="serialStart">
- <el-input v-model="form.serialStart"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鐨勬闀�:" :label-width="rightFormLabelWidth" prop="serialStep">
- <el-input v-model="form.serialStep"></el-input>
- </el-form-item>
- <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
- <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨">
- <el-option label="宸﹁ˉ浣�" value="codeattrsec"
- v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth" prop="codeFillSeparatorSelect">
- <el-select v-model="form.codeFillSeparatorSelect" filterable placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="濉厖闀垮害:" :label-width="rightFormLabelWidth" required prop="codeFillLength">
- <el-input v-model="form.codeFillLength"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按涓婇檺:" :label-width="rightFormLabelWidth" required prop="codeFillLimit">
- <el-input v-model="form.codeFillLimit"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鏄惁琛ョ爜:" :label-width="rightFormLabelWidth" required>
- <el-switch v-model="form.codeFillFlag"></el-switch>
- </el-form-item>
- <el-form-item label="鑷畾涔夌殑娴佹按绠楁硶:" :label-width="rightFormLabelWidth">
- <el-input v-model="form.customCodeSerialClass"></el-input>
- </el-form-item>
- </div>
-
- <!-- 灞傜骇鐮佹 -->
- <div v-show="form.sectype==='codelevelsec' ? true:false">
- <el-form-item label="灞傜骇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeLevelType">
- <el-select v-model="form.codeLevelType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeLevelType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="灞傜骇鐨勫��:" :label-width="rightFormLabelWidth" prop="codeLevelValue">
- <el-input v-model="form.codeLevelValue"></el-input>
- </el-form-item>
- <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="valueCutType">
- <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeCutType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth">
- <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeGetValueType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
-
- <!-- 寮曠敤鐮佹 -->
- <div v-show="form.sectype==='coderefersec' ? true:false">
- <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required prop="referBtmId">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referBtmId"
- @focus="openAttrSelectOrGetValue('referBtmId')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referBtmId')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required prop="referConfig">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referConfig"
- @focus="openAttrSelectOrGetValue('referConfig')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referConfig')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- </div>
-
- <!-- 鏃ユ湡鐮佹 -->
- <div v-show="form.sectype==='codedatesec' ? true:false">
- <el-form-item label="鏃ユ湡鏍煎紡:" :label-width="rightFormLabelWidth" required prop="codeDateFormatStr">
- <el-input v-model="form.codeDateFormatStr"></el-input>
- </el-form-item>
- </div>
-
- <!-- 鍒嗙被鐮佹 -->
- <div v-show="form.sectype==='codeclassifysec' ? true:false">
- <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
- <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeSecLengthType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength "></el-input>
- </el-form-item>
- <el-form-item label="鏄惁鑷姩鍒嗛厤鍒嗙被鍊�:" :label-width="rightFormLabelWidth">
- <el-switch v-model="form.matchClassifyValueFlag"></el-switch>
- </el-form-item>
- <el-form-item label="鐖跺垎绫荤爜娈�:" :label-width="rightFormLabelWidth">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.parentClassifySecOid"
- @focus="openAttrSelectOrGetValue('parentClassifySecOid')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- </div>
-
- <!-- 鍙彉鐮佹 -->
- <div v-show="form.sectype==='codevariablesec' ? true:false">
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength"></el-input>
- </el-form-item>
- <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
- <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
- <el-select v-model="form.codeFillSeparatorSelect" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
-
- </span>
- </el-form>
- </div>
-
-</template>
-
-<script>
-import { addSave } from "@/api/code/codebasic";
-import { getDictionary } from "@/api/omd/dict";
-export default {
- name: "addBasicCode",
- data() {
- return {
- form: {
- id: '', //缂栧彿
- name: '', //鍚嶇О
- sectype: 'codefixedsec', //鐮佹绫诲瀷
- description: '', //鎻忚堪
- serialDependFlag: false, //鏄惁娴佹按渚濊禆
- serialDependOrder: '', //娴佹按渚濊禆椤哄簭
- nullableFlag: false, //鏄惁涓虹┖
- displayFlag: false, //
- componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
- pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
- },
- formRules: {
- id: [
- { required: true, message: '璇疯緭鍏ョ爜娈电紪鍙�', trigger: 'blur' },
- ],
- name: [
- { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
- ],
- sectype: [
- { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
- ],
- codeSecLengthType: [
- { required: true, message: '璇烽�夋嫨鐮佹闀垮害绫诲瀷', trigger: 'change' },
- ],
- codeSecLength: [
- { required: true, message: '璇疯緭鍏ョ爜娈电殑闀垮害', trigger: 'blur' },
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- referAttributeName: [
- { required: true, message: '璇烽�夋嫨灞炴��', trigger: 'blur' },
- ],
- serialStart: [
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- serialStep: [
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- codeFillType: [
- { required: true, message: '璇烽�夋嫨缂栫爜琛ヤ綅鏂瑰紡', trigger: 'blur' },
- ],
- // 璁剧疆琛ヤ綅鏃剁殑瀛楃锛岄渶瑕佽嚜瀹氫箟鏂规硶鏉ュ仛鍒ゆ柇
- codeFillSeparatorSelect: [
- { required: true, message: '璇疯緭鍏ヨˉ浣嶆椂鐨勫瓧绗�', trigger: 'blur' },
- ],
- codeFillLength: [
- { required: true, message: '璇疯緭鍏ュ~鍏呴暱搴�', trigger: 'blur' },
- { type: 'number', message: '濉厖闀垮害蹇呴』涓烘暟瀛楀��'}
- ],
- codeFillLimit: [
- { required: true, message: '璇疯緭鍏ユ祦姘翠笂闄�', trigger: 'blur' },
- { type: 'number', message: '娴佹按涓婇檺蹇呴』涓烘暟瀛楀��'}
- ],
- codeLevelType: [
- { required: true, message: '璇烽�夋嫨灞傜骇绫诲瀷', trigger: 'change' },
- ],
- codeLevelValue: [
- { type: 'number', message: '灞傜骇鐨勫�煎繀椤讳负鏁板瓧鍊�'}
- ],
- valueCutType: [
- { required: true, message: '璇烽�夋嫨瀛楃鎴彇绫诲瀷', trigger: 'change' },
- ],
- referBtmId: [
- { required: true, message: '璇烽�夊弬鐓у簲鐢ㄧ殑涓氬姟绫诲瀷', trigger: 'change' },
- ],
- referConfig: [
- { required: true, message: '璇烽�夋嫨鍙傜収閰嶇疆', trigger: 'change' },
- ],
- codeDateFormatStr: [
- { required: true, message: '璇疯緭鍏ユ棩鏈熸牸寮�', trigger: 'blur' },
- ],
-
- },
-
- //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
- sectypeList:[], //鐮佹绫诲瀷
- codeSecLengthType:[], //鐮佹闀垮害绫诲瀷
- codeFillType:[], //缂栫爜琛ヤ綅鏂瑰紡
- codeFillSeparator:[], //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夊唴瀹�
- codeLevelType:[], //灞傜骇绫诲瀷
- codeCutType:[], //瀛楃鎴彇绫诲瀷
- codeGetValueType:[], //鍙栧�肩被鍨�
-
- //琛ㄥ崟鍏冪礌鏍囩瀹藉害
- leftFormLabelWidth: '110px',
- rightFormLabelWidth: '150px',
-
- };
- },
- computed: {
-
-
- },
- methods: {
-
- //缂栬緫鍜屾煡鐪嬫暟鎹洖鏄�
- showFormData(row){
- //this.form.sectype = row.sectype;
- console.log(row);
- //this.changeSectypeFormItems();
- //this.form = Object.assign({},this.form,row);
- this.$emit("showFormData")
- },
-
- // 涓虹埗鍒嗙被鐮佹鍙栧�硷紝鍐呭鍥炴樉
- selectedParentClassify(data){
- //console.log(data);
- this.form.parentClassifySecOid = data.parentClassifySecOid;
- this.form.parentClassifySecText = data.parentClassifySecText;
- },
-
- //鍏紡鍐呭鍥炶皟鍒板瓙缁勪欢杩涜鍥炴樉
- saveFormulaContent(data){
- //console.log(data);
- this.form.getValueClass = data;
- },
-
- // 涓哄睘鎬ч�夊彇鍊间箣鍚庣殑鍥炴樉
- selectedListClassifyLinkAttr(data){
- //console.log(data);
- this.form = Object.assign({}, this.form, {
- referAttributeId:data.referAttributeId,
- referAttributeName:data.referAttributeName,
- referCodeClassifyOid: data.referCodeClassifyOid,
- referCodeClassifyOidName: data.referCodeClassifyOidName,
- })
- },
-
- // 鎵撳紑涓哄睘鎬ч�夊彇鍊兼垨鑰呭彇鍊艰鍒欑瓑绐楀彛
- openAttrSelectOrGetValue(condition){
- if(condition === 'attr'){
- //璋冪敤鐖剁粍浠剁殑鏂规硶
- this.$emit('openAttrSelectOrGetValue')
- }else if(condition === 'value'){
- //console.log('value');
- this.$emit('openformulaEdit')
- }else if(condition === 'parentClassifySecOid'){
- this.$emit('openSelectParentClassify')
- }else if(condition === 'referBtmId'){
- this.$emit('openSelectReferBtm')
- }else if(condition === 'referConfig'){
- this.$emit('openSelectreferConfig')
- }
- },
-
- // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
- clearAttrDataByIcon(condition){
- if(condition === 'attr'){
- this.form.referAttributeName = '';
- this.form.referAttributeId = '';
- this.form.referCodeClassifyOid = '';
- this.form.referCodeClassifyOidName = '';
- }else if(condition === 'value'){
- this.form.getValueClass = '';
- }else if(condition === 'parentClassifySecOid'){
- this.form.parentClassifySecOid = '';
- }else if(condition === 'referBtmId'){
- this.form.referBtmId = '';
- }else if(condition === 'referConfig'){
- this.form.referBtmId = '';
- }
- },
-
- addSave(pkCodeRule) {
- this.form.pkCodeRule = pkCodeRule;
- console.log(this.form);
- addSave(this.form).then(() => {
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- }, error => {
- window.console.log(error);
- });
- },
-
- loadCodeSecType(){
- getDictionary({code: "codeBasicSecType"}).then(res=>{
- this.sectypeList = res.data.data;
- })
- this.loadCodeSecLength();
- //console.log(this.sectypeList);
- },
-
- loadCodeSecLength(){
- getDictionary({code: "codeSecLength"}).then(res=>{
- this.codeSecLengthType = res.data.data;
- })
- },
-
- loadCodeFillType(){
- getDictionary({code: "codeFillType"}).then(res=>{
- this.codeFillType = res.data.data;
- })
- },
-
- loadCodeFillSeparator(){
- getDictionary({code: "codeFillSeparator"}).then(res=>{
- this.codeFillSeparator = res.data.data;
- })
- },
-
- loadCodeLevelType(){
- getDictionary({code: "codeLevelType"}).then(res=>{
- this.codeLevelType = res.data.data;
- })
- },
-
- loadCodeCutType(){
- getDictionary({code: "codeCutType"}).then(res=>{
- this.codeCutType = res.data.data;
- })
- },
-
- loadCodeGetValueType(){
- getDictionary({code: "codeGetValueType"}).then(res=>{
- this.codeGetValueType = res.data.data;
- //console.log(this.codeGetValueType);
- })
- },
-
- // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
- changeSectypeFormItems(){
- if(this.form.sectype==='codefixedsec'){
- //鍥哄畾鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: '',
- codeSecLengthType: 'code_sec_length_variable'
- });
- this.loadCodeSecLength();
- }else if(this.form.sectype==='codeattrsec'){
- //灞炴�х爜娈�
- this.form = Object.assign({}, this.form, {
- referCodeClassifyOid: '', //灞炴�d
- referCodeClassifyOidName: '', //灞炴�ф墍鍦ㄥ垎绫�
- referAttributeId: '', //灞炴�х紪鍙�
- referAttributeName:'', //灞炴��
- getValueClass:'' //鍙栧�艰鍒�
- });
- }else if(this.form.sectype==='codeserialsec'){
- //娴佹按鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: '', //鐮佹鐨勯暱搴�
- serialStart: '1', //娴佹按鍙疯捣濮嬪��
- serialStep: '1', //娴佹按鐨勬闀�
- codeFillType: 'code_fill_right', //缂栫爜琛ヤ綅鏂瑰紡
- codeFillSeparatorSelect: '0', //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
- codeFillSeparator: '0', //琛ヤ綅鏃剁殑瀛楃
- codeFillLength: '', //濉厖闀垮害
- codeFillLimit: '', //娴佹按涓婇檺
- codeFillFlag: 'false', //娴佹按鏄惁琛ョ爜
- customCodeSerialClass: '', //鑷畾涔夋祦姘寸畻娉�
- });
- this.loadCodeFillType();
- this.loadCodeFillSeparator();
- }else if(this.form.sectype==='codelevelsec'){
- //灞傜骇鐮佹
- this.form = Object.assign({}, this.form,{
- codeLevelType: 'code_level_min', //灞傜骇绫诲瀷 鏋氫妇鏌ヨ
- codeLevelValue: '', //灞傜骇鐨勫��
- valueCutType: 'code_cut_none', //瀛楃鎴彇绫诲瀷 鏋氫妇鏌ヨ
- valueCutLength: '', //
- codeGetValueType: 'code_get_value_all_up', //鍙栧�肩被鍨� 鏋氫妇鏌ヨ
- });
- this.loadCodeLevelType();
- this.loadCodeCutType();
- this.loadCodeGetValueType();
- }else if(this.form.sectype==='coderefersec'){
- //寮曠敤鐮佹
- this.form = Object.assign({}, this.form,{
- referBtmId: '', //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
- referBtmName: '', //鍙傜収寮曠敤鐨勪笟鍔$被鍨�
- referConfig: '' //鍙傜収閰嶇疆
- });
- }else if(this.form.sectype==='codedatesec'){
- //鏃ユ湡鐮佹
- this.form = Object.assign({}, this.form,{
- codeDateFormatStr: '', //鏃ユ湡鏍煎紡
- });
- }else if(this.form.sectype==='codeclassifysec'){
- //鍒嗙被鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLengthType: 'code_sec_length_variable', //鐮佹闀垮害绫诲瀷
- codeSecLength: '', //鐮佹鐨勯暱搴�
- matchClassifyValueFlag: 'false', //鏄惁鑷姩鍖归厤鍊�
- parentClassifySecOid: '', //鐖跺垎绫荤爜娈甸�変腑鐨刬d
- parentClassifySecText: '', //鐖跺垎绫荤爜娈�
- });
- this.loadCodeSecLength();
- }else if(this.form.sectype==='codevariablesec'){
- //鍙彉鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: '', //鐮佹鐨勯暱搴�
- codeFillType: 'code_fill_right', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇�
- codeFillSeparatorSelect: '0', //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣
- codeFillSeparator: '', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
- });
- this.loadCodeFillType();
- this.loadCodeFillSeparator();
- }
- //console.log(this.form);
- }
-
- }
-};
-</script>
-
-<style>
- .total{
- height: 500px;
- width: 100%;
- }
-
- .total .el-input__inner,.total .el-textarea__inner {
- width: 220px;
- }
-
- .el-divider--vertical {
- width: 2px;
- height: 72vh;
- margin: 0 5px;
- position: fixed;
- }
-
- .left {
- float: left;
- width: 49%;
- }
- .right {
- float: right;
- margin-right: 2.5vw;
- /* width: 40%; */
- }
- .right > .el-form > .el-form-item{
- margin-bottom: 8px;
- }
-
-
-</style>
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/views/code/clonecode.vue b/Source/UBCS-WEB/src/views/code/clonecode.vue
index 9160e00..6cf8451 100644
--- a/Source/UBCS-WEB/src/views/code/clonecode.vue
+++ b/Source/UBCS-WEB/src/views/code/clonecode.vue
@@ -1,10 +1,11 @@
<template>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :permission="permissionList"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :permission="permissionList"
+ @refresh-change="refreshChange"
+ @on-load="onLoad">
</avue-crud>
</template>
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 3a0f97e..5cb66a3 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -2,9 +2,10 @@
<basic-container style="height: 350px;">
<!-- 缂栫爜瑙勫垯淇℃伅灞曠ず鍖哄煙 -->
- <basic-container>
- <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">缂栫爜瑙勫垯</p>
- <avue-crud :option="optionRule"
+ <basic-container class="code-rule-container">
+ <p style="margin-top: -5px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">缂栫爜瑙勫垯</p>
+ <avue-crud class="code-rule-crud"
+ :option="optionRule"
:table-loading="loading"
:data="data"
:page.sync="page"
@@ -64,13 +65,13 @@
<el-button size="small"
icon="icon-kelong"
plain
- @click="cloneCodeSetting">鍏� 闅�
+ @click="openCodeRuleDialog">鍏� 闅�
</el-button>
<el-button size="small"
icon="icon-lianjiekelong"
style="font-size: 12px;"
plain
- @click="handleDelete">浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
+ @click="openOtherCodeRuleDialog">浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
</el-button>
<el-button size="small"
icon="el-icon-s-help"
@@ -80,7 +81,7 @@
<el-button size="small"
icon="icon-qingkong"
plain
- @click="handleDelete">娓呯┖鐮佸��
+ @click="clearAllCodeSec">娓呯┖鐮佸��
</el-button>
</template>
</avue-crud>
@@ -88,9 +89,10 @@
<!-- 缂栫爜瑙勫垯鐩稿叧瀵硅瘽妗� -->
<el-dialog title="缂栫爜瑙勫垯浣跨敤鑼冨洿"
- append-to-body
- :visible.sync="codeRangeSettingBox"
- width="800px">
+ append-to-body
+ :visible.sync="codeRangeSettingBox"
+ width="800px"
+ style="height: 116vh; margin-top: -10vh;">
<avue-crud
:option="dialogeOption"
:table-loading="dialogLoading"
@@ -98,18 +100,105 @@
@refresh-change="refreshUseRangeChange">
</avue-crud>
</el-dialog>
- <!-- 缂栫爜瑙勫垯鐩稿叧鍏嬮殕瀵硅瘽妗� -->
+ <!-- 缂栫爜瑙勫垯,鍏嬮殕瀵硅瘽妗� -->
<el-dialog title="鍏嬮殕缂栫爜瑙勫垯"
append-to-body
:visible.sync="cloneSettingBox"
- width="800px">
- <clone-code></clone-code>
+ width="800px"
+ style="height: 120vh; margin-top: -14vh; overflow: hidden;">
+ <div style="overflow-y: auto; height: 78vh">
+ <el-row>
+ <el-form ref="form" :model="form" label-width="80px" :inline="true">
+ <el-form-item label="缂栧彿" required>
+ <el-input v-model="cloneCodeRuleForm.id"></el-input>
+ </el-form-item>
+ <el-form-item label="鍚嶇О" required>
+ <el-input v-model="cloneCodeRuleForm.name"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪" class="clone-input-textarea">
+ <el-input :autosize="{ minRows: 3, maxRows: 5}" type="textarea" v-model="cloneCodeRuleForm.description"></el-input>
+ </el-form-item>
+ </el-form>
+ </el-row>
+ <el-row>
+ <p style="margin: -3vh 0px 16px 50%; font-weight: 500; font-size: 16px; color: #000;">鐮佹绠$悊</p>
+ <avue-crud
+ class="clone-avue-crud"
+ :option="cloneOption"
+ :table-loading="cloneTableLoading"
+ :data="cloneData"
+ @on-load="cloneDataOnLoad">
+ <template slot="menu" slot-scope="scope">
+ <el-button
+ type="text"
+ size="small"
+ icon="el-icon-arrow-up"
+ v-show="scope.row.orderNum > 1"
+ plain
+ @click="upOrderNum(scope.row)">涓婄Щ
+ </el-button>
+ <el-button
+ type="text"
+ size="small"
+ icon="el-icon-arrow-down"
+ plain
+ @click="downOrderNum(scope.row)">涓嬬Щ
+ </el-button>
+ </template>
+ </avue-crud>
+ </el-row>
+ </div>
+ <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
+ <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveCloneCodeRule">淇� 瀛�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
+ <el-dialog title="鍏嬮殕缂栫爜瑙勫垯鐨勫熀纭�淇℃伅"
+ append-to-body
+ :visible.sync="cloneOtherCodeRuleSettingBox"
+ width="800px"
+ style="height: 150vh; margin-top: -14vh;"
+ destroy-on-close>
+ <div>
+ <el-row>
+ <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">缂栫爜瑙勫垯</p>
+ <avue-crud
+ class="other-clone-coderule-crud"
+ :option="cloneCodeRuleOption"
+ @row-click="codeOtherCloneRuleRowClick"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ ref="crudCloneCodeRuleOther"
+ @size-change="sizeChange"
+ @selection-change="selectionOtherCloneCodeRuleChange"
+ @on-load="onLoad">
+ </avue-crud>
+ </el-row>
+ <el-row>
+ <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">鐮佹淇℃伅</p>
+ <avue-crud
+ class="other-clone-codebasic-crud"
+ :option="cloneBasicOption"
+ ref="crudCloneCodeBasicOther"
+ :table-loading="loadingBasic"
+ :data="basicData"
+ @selection-change="selectionOtherCloneCodeBasicChange">
+ </avue-crud>
+ </el-row>
+ </div>
+ <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
+ <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveOtherCodeBasic">淇� 瀛�</el-button>
+ </div>
</el-dialog>
<!-- 鍩虹鐮佹灞曠ず鍖哄煙 -->
- <basic-container>
- <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">鐮佹绠$悊</p>
- <avue-crud :option="optionBasic"
+ <basic-container class="code-basicsec-container">
+ <p style="margin-top: -5px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">鐮佹绠$悊</p>
+ <avue-crud class="code-basic-crud"
+ :option="optionBasic"
ref="crudBasic"
:table-loading="loadingBasic"
:data="basicData"
@@ -178,2091 +267,2060 @@
</avue-crud>
</basic-container>
- <!-- 鐮佹鐮佸�肩鐞嗗璇濇 -->
- <el-dialog title="鐮佹鐮佸�肩鐞�"
- :visible.sync="isShowBasicSecCodeValueMgr"
- :width="isShowFixedForm ? '68vw':'50vw'"
- append-to-body
- style="height: 116vh; margin-top: -10vh;"
- @close="clearFixedOrClassifyForm('close')"
- destroy-on-close>
- <!-- 鍒嗙被鐮佹鐮佸�肩鐞� -->
- <el-row v-show="!isShowFixedForm">
- <el-col :span="11">
- <basic-container>
- <div class="box" style="height:65vh; margin-bottom:-40px">
- <el-scrollbar style="border-bottom-right-radius:8px ">
- <basic-container>
- <div class="abox" style="height:54vh">
- <avue-tree
- :data="attrClassifyTreeData"
- :option="treeOption"
- @node-click="nodeClick"
- style="overflow-y: auto; height: 54vh"/>
- </div>
- </basic-container>
- </el-scrollbar>
- </div>
- <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
- <el-button size="mini" type="primary" icon="el-icon-arrow-up" class="button">涓婄Щ</el-button>
- <el-button size="mini" type="primary" icon="el-icon-arrow-down" class="button">涓嬬Щ</el-button>
- </div>
- </basic-container>
- </el-col>
- <el-col :span="13">
- <basic-container>
- <div class="box" style="height:65vh; margin-bottom:-40px">
+ <!-- 鐮佹鐮佸�肩鐞嗗璇濇 -->
+ <el-dialog title="鐮佹鐮佸�肩鐞�"
+ :visible.sync="isShowBasicSecCodeValueMgr"
+ :width="isShowFixedForm ? '68vw':'50vw'"
+ append-to-body
+ style="height: 116vh; margin-top: -10vh;"
+ @close="clearFixedOrClassifyForm('close')"
+ destroy-on-close>
+ <!-- 鍒嗙被鐮佹鐮佸�肩鐞� -->
+ <el-row v-show="!isShowFixedForm">
+ <el-col :span="11">
+ <basic-container>
+ <div class="box classify_value_box" style="height:65vh; margin-bottom:-40px">
+ <el-scrollbar style="border-bottom-right-radius:8px ">
+ <basic-container>
+ <div class="abox" style="height:54vh">
+ <avue-tree
+ :data="classifyValueTreeData"
+ :option="classisyValueTreeOption"
+ @node-click="classisyValueTreeOnodeClick"
+ style="overflow-y: auto; height: 54vh"/>
+ </div>
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+ <el-button size="mini" type="primary" icon="el-icon-arrow-up" class="button" @click="codeClassifyValueOpetion('up')">涓婄Щ</el-button>
+ <el-button size="mini" type="primary" icon="el-icon-arrow-down" class="button" @click="codeClassifyValueOpetion('down')">涓嬬Щ</el-button>
+ </div>
+ </basic-container>
+ </el-col>
+ <el-col :span="13">
+ <basic-container>
+ <div class="box" style="height:65vh; margin-bottom:-40px">
+ <el-form>
+ <el-form-item label="鐮佸��:" :label-width="50" required>
+ <el-input style="width: 18vw" v-model="codeClassifyForm.id"></el-input>
+ </el-form-item >
+ <el-form-item label="鍚嶇О:" :label-width="50" required>
+ <el-input style="width: 18vw" v-model="codeClassifyForm.name"></el-input>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+ <el-button size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codeclassifyvaluesec')">娣诲姞</el-button>
+ <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codeclassifyvaluesec')">淇敼</el-button>
+ <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button" @click="delCodeSecValue('codeclassifyvaluesec')">鍒犻櫎</el-button>
+ <el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codeclassifyvaluesec')">鍙栨秷</el-button>
+ </div>
+ </basic-container>
+ </el-col>
+ </el-row>
+ <!-- 鍥哄畾鐮佹鐮佸�肩鐞� -->
+ <el-row v-show="isShowFixedForm">
+ <el-col :span="15">
+ <basic-container>
+ <div class="box fixedbox" style="height:65vh; margin-bottom:-40px">
+ <avue-crud
+ class="fixed-avue-crud"
+ ref="crudFixedValue"
+ :data="fixedValueData"
+ :option="fixedValueOption"
+ :table-loading="fixedValueOptionLoading"
+ @row-click="selectedCodeValueRow">
+ <!-- 琛ㄦ牸鍐呮寜閽厤缃� -->
+ <template slot="menu" slot-scope="scope">
+ <el-button size="mini" type="text" icon="el-icon-arrow-up" @click="codeFixedValueOpetion('up',scope.row)">涓婄Щ</el-button>
+ <el-button size="mini" type="text" icon="el-icon-arrow-down" @click="codeFixedValueOpetion('down',scope.row)">涓嬬Щ</el-button>
+ <el-button size="mini" type="text" icon="el-icon-minus" @click="codeFixedValueOpetion('remove',scope.row)">绉婚櫎</el-button>
+ </template>
+ </avue-crud>
+ </div>
+ <div style="margin-top:20px;">
+ <el-button size="mini" type="primary" icon="el-icon-success" class="button" @click="saveCodeFixedOrClassifyValueOption('fixedValue')">淇濆瓨</el-button>
+ </div>
+ </basic-container>
+ </el-col>
+ <el-col :span="9">
+ <basic-container>
+ <div class="box" style="height: 65vh; margin-bottom:-40px; overflow:hidden;" >
+ <div style="overflow-y:auto;height: 60vh;">
<el-form>
- <el-form-item label="鐮佸��:" :label-width="50" required>
- <el-input style="width: 18vw" v-model="codeClassifyForm.id"></el-input>
+ <el-form-item label="鐮佸��:" label-width="54px" required>
+ <el-input style="width: 19.5vw" v-model="codeFixdForm.id"></el-input>
</el-form-item >
- <el-form-item label="鍚嶇О:" :label-width="50" required>
- <el-input style="width: 18vw" v-model="codeClassifyForm.name"></el-input>
+ <el-form-item label="鎻忚堪:">
+ <el-input type="textarea" style="width: 20vw;" v-model="codeFixdForm.description"></el-input>
</el-form-item>
</el-form>
</div>
- <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
- <el-button size="mini" type="primary" icon="el-icon-circle-plus" class="button">娣诲姞</el-button>
- <el-button size="mini" type="success" plain icon="el-icon-edit-outline" class="button">淇敼</el-button>
- <el-button size="mini" type="danger" icon="el-icon-close" class="button">鍒犻櫎</el-button>
- <el-button size="mini" type="warning" plain icon="el-icon-close" class="button">鍙栨秷</el-button>
- </div>
- </basic-container>
- </el-col>
- </el-row>
- <!-- 鍥哄畾鐮佹鐮佸�肩鐞� -->
- <el-row v-show="isShowFixedForm">
- <el-col :span="15">
- <basic-container>
- <div class="box fixedbox" style="height:65vh; margin-bottom:-40px">
- <avue-crud
- ref="crudFixedValue"
- :data="fixedValueData"
- :option="fixedValueOption"
- :table-loading="fixedValueOptionLoading"
- @row-click="selectedCodeValueRow">
- <!-- 琛ㄦ牸鍐呮寜閽厤缃� -->
- <template slot="menu" slot-scope="scope">
- <el-button size="mini" type="text" icon="el-icon-arrow-up" @click="codeFixedValueOpetion('up',scope.row)">涓婄Щ</el-button>
- <el-button size="mini" type="text" icon="el-icon-arrow-down" @click="codeFixedValueOpetion('down',scope.row)">涓嬬Щ</el-button>
- <el-button size="mini" type="text"icon="el-icon-minus" @click="codeFixedValueOpetion('remove',scope.row)">绉婚櫎</el-button>
- </template>
- </avue-crud>
- </div>
- <div style="margin-top:20px;">
- <el-button size="mini" type="primary" icon="el-icon-success" class="button" @click="saveCodeFixedValueOption">淇濆瓨</el-button>
- </div>
- </basic-container>
- </el-col>
- <el-col :span="9">
- <basic-container>
- <div class="box" style="height: 65vh; margin-bottom:-40px; overflow:hidden;" >
- <div style="overflow-y:auto;height: 60vh;">
- <el-form>
- <el-form-item label="鐮佸��:" label-width="54px" required>
- <el-input style="width: 19.5vw" v-model="codeFixdForm.id"></el-input>
- </el-form-item >
- <el-form-item label="鎻忚堪:">
- <el-input type="textarea" style="width: 20vw; "v-model="codeFixdForm.description"></el-input>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
- <el-button :disabled="selectedFixedOrCodeclassifyValue!=''" size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codefixedsec')">娣诲姞</el-button>
- <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">淇敼</el-button>
- <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button" @click="delCodeSecValue('codefixedsec')">鍒犻櫎</el-button>
- <el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codefixedsec')">鍙栨秷</el-button>
- </div>
- </basic-container>
- </el-col>
- </el-row>
- </el-dialog>
+ </div>
+ <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+ <el-button :disabled="selectedFixedOrCodeclassifyValue!=''" size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codefixedsec')">娣诲姞</el-button>
+ <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">淇敼</el-button>
+ <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button" @click="delCodeSecValue('codefixedsec')">鍒犻櫎</el-button>
+ <el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codefixedsec')">鍙栨秷</el-button>
+ </div>
+ </basic-container>
+ </el-col>
+ </el-row>
+ </el-dialog>
- <!-- 鍩虹鐮佹鏂板鐩稿叧瀵硅瘽妗� -->
- <el-dialog :title="basicSecDialogTitle"
- :visible.sync="addBasicCodeSettingBox"
- width="60vw"
- append-to-body
- style="height: 115vh; margin-top: -13vh; overflow: hidden"
- destroy-on-close
- @close="clearBasicAddForm">
+ <!-- 鍩虹鐮佹鏂板鐩稿叧瀵硅瘽妗� -->
+ <el-dialog :title="basicSecDialogTitle"
+ :visible.sync="addBasicCodeSettingBox"
+ width="60vw"
+ append-to-body
+ style="height: 115vh; margin-top: -13vh; overflow: hidden"
+ destroy-on-close
+ @close="clearBasicAddForm">
+ <!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
+ <div class="total" style="overflow-y: auto; height: 70vh">
+ <el-form :model="form">
+ <span class="left">
+ <el-form-item label="鐮佹缂栧彿:" :label-width="leftFormLabelWidth" required>
+ <el-input v-model="form.id" :readonly="basicSecOnlyRead" ref="id"></el-input>
+ </el-form-item>
- <!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
- <div class="total" style="overflow-y: auto; height: 70vh">
- <el-form :model="form" :rules="formRules" ref="form" >
- <span class="left">
- <el-form-item label="鐮佹缂栧彿:" :label-width="leftFormLabelWidth" required prop="id">
- <el-input v-model="form.id" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
+ <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required>
+ <el-input ref="name" v-model="form.name" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+
+ <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required>
+ <el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in sectypeList"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
- <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required prop="name">
- <el-input v-model="form.name" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required prop="secType">
- <el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
+ <el-form-item label="鎻忚堪:" :label-width="leftFormLabelWidth">
+ <el-input type="textarea" v-model="form.description" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+
+ <el-form-item label="鏄惁娴佹按渚濊禆:" :label-width="leftFormLabelWidth">
+ <el-switch v-model="form.serialDependFlag" :disabled="basicSecOnlyRead"></el-switch>
+ <el-input-number v-show="form.serialDependFlag" v-model="form.serialDependOrder" controls-position="right" :readonly="basicSecOnlyRead"></el-input-number>
+ </el-form-item>
+
+ <el-form-item label="鏄惁涓虹┖:" :label-width="leftFormLabelWidth">
+ <el-switch v-model="form.nullableFlag" :disabled="basicSecOnlyRead"></el-switch>
+ </el-form-item>
+ </span>
+ <el-divider direction="vertical"></el-divider>
+ <span class="right">
+ <!-- 鍥哄畾鐮佹 -->
+ <div v-show="form.secType==='codefixedsec' ? true:false">
+ <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
- v-for="item in sectypeList"
+ v-for="item in codeSecLengthType"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeSecLength" ref="codeSecLength" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ </div>
+ <!-- 灞炴�х爜娈� -->
+ <div v-show="form.secType==='codeattrsec' ? true:false">
+ <el-form-item label="灞炴��:" :label-width="rightFormLabelWidth" required>
+ <el-input
+ placeholder="璇烽�夋嫨"
+ prefix-icon="el-icon-search"
+ readonly="true"
+ ref="referAttributeId"
+ v-model="form.referAttributeName"
+ @focus="openAttrSelectOrGetValue('attr')"
+ :disabled="basicSecOnlyRead">
+ <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('attr')" style="cursor: pointer;"></i>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
+ <el-input
+ v-model="form.referCodeClassifyOidName"
+ disabled>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鍙栧�艰鍒�:" :label-width="rightFormLabelWidth">
+ <el-input
+ placeholder="璇烽�夋嫨"
+ prefix-icon="el-icon-search"
+ readonly="true"
+ v-model="form.getValueClass"
+ :disabled="basicSecOnlyRead"
+ @focus="openAttrSelectOrGetValue('value')">
+ <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('value')" style="margin-right: 5px;cursor: pointer;"></i>
+ </el-input>
+ </el-form-item>
+ </div>
+ <!-- 娴佹按鐮佹 -->
+ <div v-show="form.secType==='codeserialsec' ? true:false">
+ <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeSecLength" ref="seriaCodeSecLength" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="娴佹按鍙风殑璧峰鍊�:" :label-width="rightFormLabelWidth">
+ <el-input v-model.number="form.serialStart" ref="serialStart" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="娴佹按鐨勬闀�:" :label-width="rightFormLabelWidth">
+ <el-input v-model.number="form.serialStep" ref="serialStep" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option label="宸﹁ˉ浣�" value="codeattrsec"
+ v-for="item in codeFillType"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
-
- <el-form-item label="鎻忚堪:" :label-width="leftFormLabelWidth">
- <el-input type="textarea" v-model="form.description" :readonly="basicSecOnlyRead"></el-input>
+ <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+ <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeFillSeparator"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
</el-form-item>
-
- <el-form-item label="鏄惁娴佹按渚濊禆:" :label-width="leftFormLabelWidth">
- <el-switch v-model="form.serialDependFlag" :disabled="basicSecOnlyRead"></el-switch>
- <el-input-number v-show="form.serialDependFlag" v-model="form.serialDependOrder" controls-position="right" :readonly="basicSecOnlyRead"></el-input-number>
+ <el-form-item label="濉厖闀垮害:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeFillLength" ref="codeFillLength" :readonly="basicSecOnlyRead"></el-input>
</el-form-item>
-
- <el-form-item label="鏄惁涓虹┖:" :label-width="leftFormLabelWidth">
- <el-switch v-model="form.nullableFlag" :disabled="basicSecOnlyRead"></el-switch>
+ <el-form-item label="娴佹按涓婇檺:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeFillLimit" ref="codeFillLimit" :readonly="basicSecOnlyRead"></el-input>
</el-form-item>
- </span>
- <el-divider direction="vertical"></el-divider>
- <span class="right">
- <!-- 鍥哄畾鐮佹 -->
- <div v-show="form.secType==='codefixedsec' ? true:false">
- <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
- <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
+ <el-form-item label="娴佹按鏄惁琛ョ爜:" :label-width="rightFormLabelWidth" required>
+ <el-switch v-model="form.codeFillFlag" :disabled="basicSecOnlyRead"></el-switch>
+ </el-form-item>
+ <el-form-item label="鑷畾涔夌殑娴佹按绠楁硶:" :label-width="rightFormLabelWidth">
+ <el-input v-model="form.customCodeSerialClass" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ </div>
+ <!-- 灞傜骇鐮佹 -->
+ <div v-show="form.secType==='codelevelsec' ? true:false">
+ <el-form-item label="灞傜骇绫诲瀷:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.codeLevelType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeLevelType"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="灞傜骇鐨勫��:" :label-width="rightFormLabelWidth">
+ <el-input v-model.number="form.codeLevelValue" ref="codeLevelValue" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeCutType"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth">
+ <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeGetValueType"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </div>
+ <!-- 寮曠敤鐮佹 -->
+ <div v-show="form.secType==='coderefersec' ? true:false">
+ <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required>
+ <el-input
+ ref="referBtmId"
+ placeholder="璇烽�夋嫨"
+ prefix-icon="el-icon-search"
+ readonly="true"
+ v-model="form.referBtmId"
+ @focus="openAttrSelectOrGetValue('referBtmId')"
+ :disabled="basicSecOnlyRead">
+ <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referBtmId')" style="margin-right: 5px;cursor: pointer;"></i>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required>
+ <el-input
+ ref="referConfig"
+ placeholder="璇烽�夋嫨"
+ prefix-icon="el-icon-search"
+ readonly="true"
+ v-model="form.referConfig"
+ @focus="openAttrSelectOrGetValue('referConfig')"
+ :disabled="basicSecOnlyRead">
+ <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referConfig')" style="margin-right: 5px;cursor: pointer;"></i>
+ </el-input>
+ </el-form-item>
+ </div>
+ <!-- 鏃ユ湡鐮佹 -->
+ <div v-show="form.secType==='codedatesec' ? true:false">
+ <el-form-item label="鏃ユ湡鏍煎紡:" :label-width="rightFormLabelWidth" required>
+ <el-input ref="codeDateFormatStr" v-model="form.codeDateFormatStr" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ </div>
+ <!-- 鍒嗙被鐮佹 -->
+ <div v-show="form.secType==='codeclassifysec' ? true:false">
+ <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
v-for="item in codeSecLengthType"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- </div>
- <!-- 灞炴�х爜娈� -->
- <div v-show="form.secType==='codeattrsec' ? true:false">
- <el-form-item label="灞炴��:" :label-width="rightFormLabelWidth" required prop="referAttributeName">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referAttributeName"
- @focus="openAttrSelectOrGetValue('attr')"
- :disabled="basicSecOnlyRead">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('attr')" style="cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
- <el-input
- v-model="form.referCodeClassifyOidName"
- disabled>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeSecLength" ref="classCodeSecLength" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="鏄惁鑷姩鍒嗛厤鍒嗙被鍊�:" :label-width="rightFormLabelWidth">
+ <el-switch v-model="form.matchClassifyValueFlag" :disabled="basicSecOnlyRead"></el-switch>
+ </el-form-item>
+ <el-form-item label="鐖跺垎绫荤爜娈�:" :label-width="rightFormLabelWidth">
+ <el-input
+ placeholder="璇烽�夋嫨"
+ prefix-icon="el-icon-search"
+ readonly="true"
+ v-model="form.parentClassifySecOid"
+ @focus="openAttrSelectOrGetValue('parentClassifySecOid')"
+ :disabled="basicSecOnlyRead">
+ <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
</el-input>
- </el-form-item>
- <el-form-item label="鍙栧�艰鍒�:" :label-width="rightFormLabelWidth">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.getValueClass"
- :disabled="basicSecOnlyRead"
- @focus="openAttrSelectOrGetValue('value')">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('value')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- </div>
- <!-- 娴佹按鐮佹 -->
- <div v-show="form.secType==='codeserialsec' ? true:false">
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鍙风殑璧峰鍊�:" :label-width="rightFormLabelWidth" prop="serialStart">
- <el-input v-model="form.serialStart" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鐨勬闀�:" :label-width="rightFormLabelWidth" prop="serialStep">
- <el-input v-model="form.serialStep" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
- <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option label="宸﹁ˉ浣�" value="codeattrsec"
- v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth" prop="codeFillSeparatorSelect">
- <el-select v-model="form.codeFillSeparatorSelect" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="濉厖闀垮害:" :label-width="rightFormLabelWidth" required prop="codeFillLength">
- <el-input v-model="form.codeFillLength" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按涓婇檺:" :label-width="rightFormLabelWidth" required prop="codeFillLimit">
- <el-input v-model="form.codeFillLimit" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="娴佹按鏄惁琛ョ爜:" :label-width="rightFormLabelWidth" required>
- <el-switch v-model="form.codeFillFlag" :disabled="basicSecOnlyRead"></el-switch>
- </el-form-item>
- <el-form-item label="鑷畾涔夌殑娴佹按绠楁硶:" :label-width="rightFormLabelWidth">
- <el-input v-model="form.customCodeSerialClass" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- </div>
- <!-- 灞傜骇鐮佹 -->
- <div v-show="form.secType==='codelevelsec' ? true:false">
- <el-form-item label="灞傜骇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeLevelType">
- <el-select v-model="form.codeLevelType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeLevelType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="灞傜骇鐨勫��:" :label-width="rightFormLabelWidth" prop="codeLevelValue">
- <el-input v-model="form.codeLevelValue" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="valueCutType">
- <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeCutType"
+ </el-form-item>
+ </div>
+ <!-- 鍙彉鐮佹 -->
+ <div v-show="form.secType==='codevariablesec' ? true:false">
+ <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required>
+ <el-input v-model.number="form.codeSecLength" ref="varCodeSecLength" :readonly="basicSecOnlyRead"></el-input>
+ </el-form-item>
+ <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required>
+ <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeFillType"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth">
- <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeGetValueType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- <!-- 寮曠敤鐮佹 -->
- <div v-show="form.secType==='coderefersec' ? true:false">
- <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required prop="referBtmId">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referBtmId"
- @focus="openAttrSelectOrGetValue('referBtmId')"
- :disabled="basicSecOnlyRead">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referBtmId')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required prop="referConfig">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.referConfig"
- @focus="openAttrSelectOrGetValue('referConfig')"
- :disabled="basicSecOnlyRead">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referConfig')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- </div>
- <!-- 鏃ユ湡鐮佹 -->
- <div v-show="form.secType==='codedatesec' ? true:false">
- <el-form-item label="鏃ユ湡鏍煎紡:" :label-width="rightFormLabelWidth" required prop="codeDateFormatStr">
- <el-input v-model="form.codeDateFormatStr" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- </div>
- <!-- 鍒嗙被鐮佹 -->
- <div v-show="form.secType==='codeclassifysec' ? true:false">
- <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
- <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeSecLengthType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="鏄惁鑷姩鍒嗛厤鍒嗙被鍊�:" :label-width="rightFormLabelWidth">
- <el-switch v-model="form.matchClassifyValueFlag" :disabled="basicSecOnlyRead"></el-switch>
- </el-form-item>
- <el-form-item label="鐖跺垎绫荤爜娈�:" :label-width="rightFormLabelWidth">
- <el-input
- placeholder="璇烽�夋嫨"
- prefix-icon="el-icon-search"
- readonly="true"
- v-model="form.parentClassifySecOid"
- @focus="openAttrSelectOrGetValue('parentClassifySecOid')"
- :disabled="basicSecOnlyRead">
- <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
- </el-input>
- </el-form-item>
- </div>
- <!-- 鍙彉鐮佹 -->
- <div v-show="form.secType==='codevariablesec' ? true:false">
- <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
- <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
- </el-form-item>
- <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
- <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
- <el-select v-model="form.codeFillSeparatorSelect" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
- <el-option
- v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- </span>
- </el-form>
- </div>
- <!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
- <el-divider direction="horizontal"></el-divider>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
- <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
- </div>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+ <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+ <el-option
+ v-for="item in codeFillSeparator"
+ :key="item.dictValue"
+ :label="item.dictValue"
+ :value="item.dictKey">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </div>
+ </span>
+ </el-form>
+ </div>
+ <!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
+ <el-divider direction="horizontal"></el-divider>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
+ </div>
- <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨寮圭獥 -->
- <el-dialog title="涓恒�愬睘鎬с�戦�夊彇鍊�"
- append-to-body
- :visible.sync="isShowSelectAttrOption"
- width="78%"
- style="height: 100%; margin-top: -8vh; overflow: hidden">
- <div style="overflow-y: auto; height: 60vh">
- <el-row>
- <!-- 宸︿晶涓婚搴撳垎绫绘爲 -->
- <el-col :span="5">
- <div class="box">
- <el-scrollbar style="height: auto; border-bottom-right-radius:8px ">
- <basic-container>
- <div class="abox">
- <avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/>
- </div>
- </basic-container>
- </el-scrollbar>
+ <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨寮圭獥 -->
+ <el-dialog title="涓恒�愬睘鎬с�戦�夊彇鍊�"
+ append-to-body
+ :visible.sync="isShowSelectAttrOption"
+ width="78%"
+ style="height: 100%; margin-top: -8vh; overflow: hidden">
+ <div style="overflow-y: auto; height: 60vh">
+ <el-row>
+ <!-- 宸︿晶涓婚搴撳垎绫绘爲 -->
+ <el-col :span="5">
+ <div class="box">
+ <el-scrollbar style="height: auto; border-bottom-right-radius:8px ">
+ <basic-container>
+ <div class="abox">
+ <avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/>
+ </div>
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col>
+
+ <!-- 鍙充晶琛ㄦ牸鏄剧ず鍖哄煙 -->
+ <el-col span="19">
+ <basic-container>
+ <div class="bbox">
+ <avue-crud
+ :data="selectattrData"
+ :option="attrOption"
+ :table-loading="selectAttrOptionLoading"
+ @search-change="selectAttrOptionSearchChange"
+ @search-reset="searchAttrReset"
+ @selection-change="selectionChangeAttr">
+ </avue-crud>
</div>
- </el-col>
+ </basic-container>
+ </el-col>
- <!-- 鍙充晶琛ㄦ牸鏄剧ず鍖哄煙 -->
- <el-col span="19">
- <basic-container>
- <div class="bbox">
- <avue-crud
- :data="selectattrData"
- :option="attrOption"
- :table-loading="selectAttrOptionLoading"
- @search-change="selectAttrOptionSearchChange"
- @search-reset="searchAttrReset"
- @selection-change="selectionChangeAttr">
- </avue-crud>
- </div>
- </basic-container>
- </el-col>
+ </el-row>
+ </div>
- </el-row>
- </div>
-
- <div slot="footer" class="dialog-footer">
- <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="selectedListClassifyLinkAttr">纭� 瀹�</el-button>
- </div>
-
- </el-dialog>
-
- <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐� -->
- <el-dialog title="鍏紡缂栬緫妗�"
- append-to-body
- :visible.sync="isShowformulaEdit"
- @close="closeFormulaEdit"
- width="78%"
- style="height: 150vh; margin-top: -13vh; overflow: hidden">
-
- <div style="overflow-y: auto; height: 80vh">
- <el-row>
- <!-- 宸︿晶鍏紡鍐呭 -->
- <el-col :span="14" style="overflow: hidden">
- <el-card class="box-card" style="height: 33vh; overflow-y: auto; overflow-x: auto;">
- <div slot="header" class="clearfix">
- <span style="font-size: medium;" >鍏紡鍐呭</span>
- <el-button type="primary" size="mini" style="float: right;" @click="saveFormulaContent">纭畾</el-button>
- <el-button type="warning" size="mini" style="margin-right: 10px; float: right;" @click="resetFormulaContent">娓呯┖鍐呭</el-button>
- </div>
- <div class="text item">
- <el-input type="textarea" :rows="5" style="width: 560px;" v-model="formulaContent"></el-input>
- </div>
-
- </el-card>
- </el-col>
- <!-- 鍙充晶杩愮畻绗� -->
- <el-col :span="10">
- <el-card class="box-card" style="height: 33vh; overflow-y: auto; overflow-x: auto;">
- <div slot="header" class="clearfix">
- <span style="font-size: medium;">杩愮畻绗�</span>
- </div>
- <div class="text item">
- <div class="formula-editor">
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'7'})">7</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'8'})">8</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'9'})">9</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'/'})">/</button><br/>
- </div>
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'4'})">4</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'5'})">5</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'6'})">6</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'*'})">*</button><br/>
- </div>
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'1'})">1</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'2'})">2</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'3'})">3</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>'})">-</button><br/>
- </div>
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'0'})">0</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'00'})">00</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'.'})">.</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'+'})">+</button><br/>
- </div>
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'->'})">-></button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'=='})">==</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'('})">(</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':')'})">)</button><br/>
- </div>
- <div class="one">
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'<'})"><</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>'})">></button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'<='})"><=</button>
- <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>='})">>=</button>
- </div>
- </div>
- </div>
- </el-card>
- </el-col>
- </el-row>
-
- <el-row>
- <!-- 宸︿晶鍏紡閫夋嫨鍖哄煙 -->
- <el-col :span="14" style="overflow: hidden">
- <el-card class="box-card" style="height: 40vh; overflow-y: auto; overflow-x: auto;">
- <div slot="header" class="clearfix">
- <span style="font-size: medium;">鍏紡閫夋嫨</span>
- </div>
- <div class="text item">
- <el-tabs v-model="activeName">
-
- <el-tab-pane label="甯哥敤" name="first">
- <el-table
- :data="commonFormulaTableData"
- :show-header="false"
- @row-dblclick="dbClickAddContent"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="300">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="300">
- </el-table-column>
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="璐㈠姟" name="second">
- <el-table
- :data="financialFormulaTableData"
- @row-dblclick="dbClickAddContent"
- :show-header="false"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="300">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="300">
- </el-table-column>
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="鏃ユ湡" name="third">
- <el-table
- :data="dateFormulaTableData"
- :show-header="false"
- @row-dblclick="dbClickAddContent"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="300">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="300">
- </el-table-column>
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="鏁板" name="fourth">
- <el-table
- :data="mathFormulaTableData"
- :show-header="false"
- @row-dblclick="dbClickAddContent"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="300">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="300">
- </el-table-column>
- </el-table>
- </el-tab-pane>
-
- <el-tab-pane label="鍏朵粬" name="five">
- <el-table
- :data="otherFormulaTableData"
- @row-dblclick="dbClickAddContent"
- :show-header="false"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="300">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="300">
- </el-table-column>
- </el-table>
- </el-tab-pane>
-
- </el-tabs>
-
- </div>
- </el-card>
- </el-col>
- <!-- 鍙充晶鍙橀噺閫夋嫨鍖哄煙 -->
- <el-col :span="10" style="overflow: hidden">
- <el-card class="box-card" style="height: 40vh; overflow-y: auto; overflow-x: auto;">
- <div slot="header" class="clearfix">
- <span style="font-size: medium;">鍙橀噺</span>
- </div>
- <div class="text item">
- <el-tabs v-model="activeNameAttr">
- <el-tab-pane label="鏈満鏅彉閲�" name="first">
- <el-table
- :data="thisSceneTableData"
- @row-dblclick="dbClickAddContent"
- :show-header="false"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="40">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="100">
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="绯荤粺鍙橀噺" name="second">
- <el-table
- :data="systemVariableTableData"
- @row-dblclick="dbClickAddContent"
- :show-header="false"
- style="width: 100%">
- <el-table-column
- prop="formula"
- width="150">
- </el-table-column>
- <el-table-column
- prop="desc"
- width="150">
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </div>
-
- </el-dialog>
-
- <!-- 绗簩灞傚璇濇,涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊煎脊绐� -->
- <el-dialog title="涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊�"
- append-to-body
- :visible.sync="isShowParentClassifyOption"
- width="65%"
- style="height: 150vh; margin-top: -13vh;"
- destroy-on-close>
-
- <avue-crud
- :page.sync="parentClassifyDataPage"
- ref="crudParentClassify"
- :option="parentClassifyParentOption"
- :table-loading="classifyDialogLoading"
- :data="parentClassifyData"
- @refresh-change="refreshParentClassifyDataChange"
- @search-change="parentClassifySearchChange"
- @search-reset="parentClassifySearchReset"
- @selection-change="parentClassifySelectionChange"
- @current-change="parentClassifyCurrentChange"
- @size-change="parentClassifySizeChange"
- @on-load="parentClassifyOnLoad">
- </avue-crud>
-
- <div slot="footer" class="dialog-footer">
- <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="saveSelectedParentClassify">淇� 瀛�</el-button>
- </div>
- </el-dialog>
-
- <!-- 绗簩灞傚璇濇,涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊煎脊绐� -->
- <el-dialog title="涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊�"
- append-to-body
- :visible.sync="isShowSelectReferBtmOption"
- width="65%"
- style="height: 150vh; margin-top: -13vh;"
- destroy-on-close>
-
- <avue-crud
- :page.sync="referBtmDataPage"
- ref="crudReferBtm"
- :option="referBtmOption"
- :table-loading="referBtmDialogLoading"
- :data="referBtmData"
- @refresh-change="referBtmDataChange"
- @search-change="referBtmSearchChange"
- @search-reset="referBtmSearchReset"
- @selection-change="referBtmSelectionChange"
- @current-change="referBtmCurrentChange"
- @size-change="referBtmSizeChange"
- @on-load="referBtmOnLoad">
- </avue-crud>
-
- <div slot="footer" class="dialog-footer">
- <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="saveSelectedreferBtm">淇� 瀛�</el-button>
- </div>
- </el-dialog>
-
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="selectedListClassifyLinkAttr">纭� 瀹�</el-button>
+ </div>
+
</el-dialog>
+
+ <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐楃粍浠� -->
+ <formula-editor ref="formulaEditor"
+ @updateFormulaContent="updateFormulaContent"
+ :thisSceneTableData="thisSceneTableData"
+ :systemVariableTableData="systemVariableTableData">
+ </formula-editor>
+
+ <!-- 绗簩灞傚璇濇,涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊煎脊绐� -->
+ <el-dialog title="涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊�"
+ append-to-body
+ :visible.sync="isShowParentClassifyOption"
+ width="65%"
+ style="height: 150vh; margin-top: -13vh;"
+ destroy-on-close>
+
+ <avue-crud
+ :page.sync="parentClassifyDataPage"
+ ref="crudParentClassify"
+ :option="parentClassifyParentOption"
+ :table-loading="classifyDialogLoading"
+ :data="parentClassifyData"
+ @refresh-change="refreshParentClassifyDataChange"
+ @search-change="parentClassifySearchChange"
+ @search-reset="parentClassifySearchReset"
+ @selection-change="parentClassifySelectionChange"
+ @current-change="parentClassifyCurrentChange"
+ @size-change="parentClassifySizeChange"
+ @on-load="parentClassifyOnLoad">
+ </avue-crud>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveSelectedParentClassify">淇� 瀛�</el-button>
+ </div>
+ </el-dialog>
+
+ <!-- 绗簩灞傚璇濇,涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊煎脊绐� -->
+ <el-dialog title="涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊�"
+ append-to-body
+ :visible.sync="isShowSelectReferBtmOption"
+ width="65%"
+ style="height: 150vh; margin-top: -13vh;"
+ destroy-on-close>
+
+ <avue-crud
+ :page.sync="referBtmDataPage"
+ ref="crudReferBtm"
+ :option="referBtmOption"
+ :table-loading="referBtmDialogLoading"
+ :data="referBtmData"
+ @refresh-change="referBtmDataChange"
+ @search-change="referBtmSearchChange"
+ @search-reset="referBtmSearchReset"
+ @selection-change="referBtmSelectionChange"
+ @current-change="referBtmCurrentChange"
+ @size-change="referBtmSizeChange"
+ @on-load="referBtmOnLoad">
+ </avue-crud>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveSelectedreferBtm">淇� 瀛�</el-button>
+ </div>
+ </el-dialog>
+
+ </el-dialog>
</basic-container>
</template>
<script>
- import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus } from "@/api/code/mdmrule";
+ import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus,clone,clearAllCode } from "@/api/code/mdmrule";
import {
gridCodeBasicSec,
downOrderNum,
upOrderNum,
deleteData,
editSave,
- getObjectByOid,
- listDataByOids,
- refDataGrid,
+ cloneCodeBasic,
addSave,
refDataGridClassifySec,
} from "@/api/code/codebasic";
import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
- import { treeCodeClassifyValue } from "@/api/code/codeClassifyValue";
+ import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
+ import { getDictionary } from "@/api/omd/dict";
import optionBasic from "@/const/code/codebasic";
+ import cloneOption from "@/const/code/cloneOption";
+ import cloneBasicOption from "@/const/code/cloneBasicDialogOption";
+ import cloneCodeRuleOption from "@/const/code/cloneCodeRuleDialogOption.js";
import optionRule from "@/const/code/mdmrule";
import attrOption from "@/const/code/selectAttrOptionDialog";
import treeOption from "@/const/code/classifyTreeOptionDialog";
+ import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog";
import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
import referBtmOption from "@/const/code/referBtmDialog";
import fixedValueOption from "@/const/code/fixedValueMgrDialog";
- import { getDictionary } from "@/api/omd/dict";
import {mapGetters} from "vuex";
-export default {
- data() {
- return {
- ruleForm: {},
- query: {},
- loading: true,
- currentCodeRuleOid: '',
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- /*缂栫爜瑙勫垯琛ㄦ牸閰嶇疆*/
- optionRule: optionRule,
- data: [],
- currentRuleLcStatus: '',
- /*鍏嬮殕鎸夐挳瀵硅瘽妗嗘帶鍒�*/
- cloneSettingBox: false,
- optionBasic: optionBasic,
- /*浣跨敤鑼冨洿瀵硅瘽妗嗘樉绀烘帶鍒�*/
- codeRangeSettingBox: false,
- useRangeData: [],
- dialogLoading: true,
- /*浣跨敤鑼冨洿瀵硅瘽妗嗛厤缃�*/
- dialogeOption: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: false,
- searchMenuSpan: 6,
- border: true,
- index: true,
- disablePage:false,
- viewBtn: false,
- addBtn: false,
- menu: false,
- selection: false,
- dialogClickModal: false,
- align: 'center',
- dialogWidth: 400,
- column: [
+ export default {
+ data() {
+ return {
+ ruleForm: {},
+ query: {},
+ loading: true,
+ currentCodeRuleOid: '',
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ selectionList: [],
+ /*缂栫爜瑙勫垯琛ㄦ牸閰嶇疆*/
+ optionRule: optionRule,
+ data: [],
+ currentRuleLcStatus: '',
+ /*鍏嬮殕瀵硅瘽妗嗘帶鍒跺彉閲�*/
+ cloneSettingBox: false,
+ cloneTableLoading: false,
+ cloneOption: cloneOption,
+ cloneData: [],
+ cloneCodeRuleForm: {
+ id: '',
+ name: '',
+ description: '',
+ },
+ /*浠庡叾浠栬鍒欏厠闅嗙爜娈�*/
+ cloneOtherCodeRuleSettingBox: false,
+ cloneBasicOption: cloneBasicOption,
+ cloneCodeRuleOption: cloneCodeRuleOption,
+ selectionOtherCloneCodeBasicList: [], // 褰撳墠閫変腑鐨勫熀纭�鐮佹
+
+ /*浣跨敤鑼冨洿瀵硅瘽妗嗘樉绀烘帶鍒�*/
+ codeRangeSettingBox: false,
+ useRangeData: [],
+ dialogLoading: true,
+ /*浣跨敤鑼冨洿瀵硅瘽妗嗛厤缃�*/
+ dialogeOption: {
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ searchShow: false,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ disablePage:false,
+ viewBtn: false,
+ addBtn: false,
+ menu: false,
+ selection: false,
+ dialogClickModal: false,
+ align: 'center',
+ dialogWidth: 400,
+ column: [
+ {
+ label: "鍒嗙被缂栧彿",
+ prop: "id",
+ span: 24
+ },
+ {
+ label: "鍒嗙被鍚嶇О",
+ prop: "name",
+ span: 24,
+ }
+ ]
+ },
+
+ /*鍩虹鐮佹鐩稿叧鏁版嵁*/
+ optionBasic: optionBasic,
+ basicData:[],
+ loadingBasic: true,
+ selectionBasicList: [],
+ addBasicCodeSettingBox: false,
+ showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+ basicSecDialogTitle: '', //鍩虹鐮佹绗竴灞傚璇濇鏍囬
+ basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
+
+
+ /** 鐮佸�肩鐞嗙浉鍏虫暟鎹� */
+ isShowBasicSecCodeValueMgr: false, //鐮佹鐮佸�肩鐞嗗璇濇
+ codefixedsecOrCodeclassifysecOid: '', //瀛樻斁鍩虹鐮佹鐐瑰嚮鐮佸�肩鐞嗘椂鐨勫綋鍓嶈id锛岀敤浜庝繚瀛樼爜鍊兼椂浣跨敤
+ selectedFixedOrCodeclassifyValue: '', //褰撳墠閫変腑鐨勭爜鍊兼暟鎹�
+ //鍥哄畾鐮佹鐮佸�艰〃鍗�
+ codeFixdForm: {
+ codeFixedSecOid: "",
+ description: "",
+ id: "",
+ },
+ isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
+ fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
+ fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
+ fixedValueOptionLoading: false, //鍔犺浇琛ㄦ牸鐨勫姩鎬佹晥鏋�
+ fixedValueSelectList: [], //鍥哄畾鐮佹鐮佸�煎綋鍓嶉�変腑鐨勮
+
+ //鍒嗙被鐮佹鐮佸�艰〃鍗�
+ codeClassifyForm: {
+ codeClassifySecOid: "",
+ id: "",
+ name: "",
+ oid: "",
+ },
+ classisyValueTreeOption: classisyValueTreeOption, //鍒嗙被鐮佹鏍戠浉鍏抽厤缃」
+ classifyValueTreeData: [],
+ currentSelectTreeData: '', //褰撳墠閫変腑鐨勫垎绫荤爜鍊兼爲鑺傜偣
+
+ /* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
+ isShowSelectAttrOption: false,
+ /* 涓哄睘鎬ч�夊�煎乏渚ф爲鏁版嵁 */
+ attrClassifyTreeData: [],
+ treeOption: treeOption,
+ currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
+ /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
+ attrOption: attrOption,
+ selectattrData: [],
+ selectAttrOptionLoading: false,
+ selectionChangeAttrList: [],
+ // 灞炴�х爜娈碉紝鍏紡缂栬緫妗嗙粍浠剁殑鏈満鏅樉绀哄彉閲忋�佷笌绯荤粺鍙橀噺
+ thisSceneTableData: [
{
- label: "鍒嗙被缂栧彿",
- prop: "id",
- span: 24
+ formula: "${}",
+ desc: "",
+ }
+ ],
+ systemVariableTableData: [
+ {
+ formula: "#CURRENTUSER.OID#",
+ desc: "褰撳墠鐢ㄦ埛鐨勪富閿�",
},
{
- label: "鍒嗙被鍚嶇О",
- prop: "name",
- span: 24,
- }
- ]
- },
-
- /*鍩虹鐮佹鐩稿叧鏁版嵁*/
- basicData:[],
- loadingBasic: true,
- selectionBasicList: [],
- addBasicCodeSettingBox: false,
- showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
- basicSecDialogTitle: '', //鍩虹鐮佹绗竴灞傚璇濇鏍囬
- basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
-
-
- /** 鐮佸�肩鐞嗙浉鍏虫暟鎹� */
- isShowBasicSecCodeValueMgr: false, //鐮佹鐮佸�肩鐞嗗璇濇
- codefixedsecOrCodeclassifysecOid: '', //瀛樻斁鍩虹鐮佹鐐瑰嚮鐮佸�肩鐞嗘椂鐨勫綋鍓嶈id锛岀敤浜庝繚瀛樼爜鍊兼椂浣跨敤
- selectedFixedOrCodeclassifyValue: '', //褰撳墠閫変腑鐨勭爜鍊兼暟鎹�
- //鍥哄畾鐮佹鐮佸�艰〃鍗�
- codeFixdForm: {
- codeFixedSecOid: "",
- description: "",
- id: "",
- },
- isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
- fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
- fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
- fixedValueOptionLoading: false, //鍔犺浇琛ㄦ牸鐨勫姩鎬佹晥鏋�
- fixedValueSelectList: [], //鍥哄畾鐮佹鐮佸�煎綋鍓嶉�変腑鐨勮
-
- //鍒嗙被鐮佹鐮佸�艰〃鍗�
- codeClassifyForm: {
- codeclassifysecoid: "",
- id: "",
- name: "",
- oid: "",
- parentclassifyvalueoid: "",
- },
-
-
- /* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
- isShowSelectAttrOption: false,
- /* 涓哄睘鎬ч�夊�煎乏渚ф爲鏁版嵁 */
- attrClassifyTreeData: [],
- treeOption: treeOption,
- currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
- /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
- attrOption: attrOption,
- selectattrData: [],
- selectAttrOptionLoading: false,
- selectionChangeAttrList: [],
-
- /*鍏紡缂栬緫妗嗗璇濇鐩稿叧鏁版嵁*/
- isShowformulaEdit: false, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
- formulaContent: '', //鍏紡缂栬緫妗嗗唴瀹�
- activeName: 'first', //褰撳墠娲诲姩鐨則ab
- activeNameAttr: 'first', //鍙橀噺涓殑褰撳墠娲诲姩tab
- //甯哥敤鍏紡
- commonFormulaTableData: [{
- "formula": 'if(compare,trueResult,falseResult)',
- "desc": '濡傛灉compare鐨勮〃杈惧紡涓簍rue锛屽垯鎵цtrueResult鐨勮〃杈惧紡锛屽惁鍒欐墽琛宖laseResult.渚嬪if(3>2,2*(3+2),3/(2-4)),鍊肩瓑浜�10',
- },
- {
- "formula": 'sum(douber1,douber2)',
- "desc": '涓や釜鏍煎紡涓篸ouber鐨勫弬鏁版眰鍜�',
- },
- {
- "formula": 'sub(douber1,douber2)',
- "desc": '鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1鍑忓幓鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2',
- },
- {
- "formula": 'mul(douber1,douber2)',
- "desc": '涓や釜鏍煎紡涓篸ouber鐨勫弬鏁扮浉涔�',
- },
- {
- "formula": 'div(douber1,douber2)',
- "desc": '鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1闄や互鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2.褰揹ouber2绛変簬0鐨勬椂鍊欙紝杩斿洖0;濡傛灉闄や笉灏界殑鏃跺�欎繚鐣�10浣嶅皬鏁�',
- },
- {
- "formula": 'mod(int,int)',
- "desc": '姹備綑鏁�',
- },
- {
- "formula": 'toInt(string)',
- "desc": '杞崲涓篿nt鏍煎紡',
- },
- {
- "formula": 'doubleRound(string,count)',
- "desc": '澶勭悊douber鐨勫皬鏁颁綅鏁帮紝count琛ㄧず灏忔暟浣嶆暟',
- },
- {
- "formula": 'zeroIfNull(value)',
- "desc": '濡傛灉鍙傛暟鐨勫�间负null鎴栬��"",灏嗚繑鍥�0',
- },
- {
- "formula": 'endsWith(string,str1)',
- "desc": '瀛楃涓瞫tring鏄笉鏄互str1缁撳熬',
- },
- {
- "formula": 'startsWith(string,str1)',
- "desc": '瀛楃涓瞫tring鏄惁浠tr1寮�澶�',
- },
- {
- "formula": 'charAt(string,index)',
- "desc": '鑾峰彇瀛楃涓瞫tring涓index浣嶇疆鐨勫瓧绗︼紝濡傛灉闀垮害灏忎簬index锛屽垯杩斿洖',
- },
- {
- "formula": 'equalsIgnoreCase(str1,str2)',
- "desc": '瀛楃涓瞫tr1鍜屽瓧绗︿覆str2鏄惁鐩哥瓑',
- },
- {
- "formula": 'indexOf(str1,str2)',
- "desc": '瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓娆″嚭鐜扮殑浣嶇疆',
- },
- {
- "formula": 'isEmpty(str1)',
- "desc": '鍙傛暟str1鏄惁涓虹┖锛屽叾涓璶ull杩欎釜瀛楃涓蹭篃琛ㄧず涓虹┖',
- },
- {
- "formula": 'lastIndexOf(str1,str2)',
- "desc": '瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓渶鍚庡嚭鐜扮殑浣嶇疆',
- },
- {
- "formula": 'leftStr(str1,index)',
- "desc": '鑾峰彇index浣嶇疆宸︿晶鐨勬墍鏈夊瓧绗�',
- },
- {
- "formula": 'rightStr(str1,str2)',
- "desc": '鑾峰彇index浣嶇疆鍙充晶鐨勬墍鏈夊瓧绗�',
- },
- {
- "formula": 'length(str1)',
- "desc": '鍙傛暟str1鐨勯暱搴�',
- },
- {
- "formula": 'mid(str1,start,end)',
- "desc": '鑾峰彇str1鐨勪粠start鍒癳nd鐩存帴鐨勫瓧绗︿覆锛屽嚭鐜板紓甯告椂杩斿洖',
- },
- {
- "formula": 'tolowercase(str1)',
- "desc": '灏嗗瓧绗︿覆str1杞负灏忓啓',
- },
- {
- "formula": 'touppercase(str1)',
- "desc": '灏嗗瓧绗︿覆str1杞负澶у啓',
- },
- {
- "formula": 'trimzero(str1)',
- "desc": '鍘婚櫎瀛楃涓瞫tr1涓殑0',
- },
- {
- "formula": 'MD5(str1)',
- "desc": '灏嗗瓧绗︿覆杩涜MD5鍔犲瘑',
- },
- ],
- //璐㈠姟鍏紡
- financialFormulaTableData: [{
- "formula": 'toChinese(value)',
- "desc": '灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楀ぇ鍐欐柟寮�'
- },
- {
- "formula": 'getChineseCurrency(value)',
- "desc": '灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楅噾棰濆ぇ鍐欐柟寮忥紝涓巘ochiness鐨勫尯鍒槸杩欎釜浼氭樉绀哄厓銆佽銆佸垎'
- },
- {
- "formula": 'setThmark(value)',
- "desc": '涓哄弬鏁皏alue璁剧疆鍗冨垎浣�'
- }
- ],
- //鏃ユ湡鍏紡
- dateFormulaTableData: [{
- "formula": 'compareDate(d1,d2)',
- "desc": '瀵规瘮鍙傛暟d1,d2鐨勫ぇ灏忋�俤1,d2涓簓yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆'
- },
- {
- "formula": 'nowDate()',
- "desc": '鑾峰彇褰撳墠鏃ユ湡'
- },
- {
- "formula": 'chinaDate(d1)',
- "desc": '灏嗘椂闂磋浆鎹负鍐滃巻锛宒1鏄痽yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆'
- },
- {
- "formula": 'dateAdd(d1,count)',
- "desc": '鍦╠1鐨勫熀纭�涓婃坊鍔燾ount澶�,d1涓簓yyy-MM-dd HH:mm:ss鏍煎紡鐨勬椂闂村瓧绗︿覆'
- },
- {
- "formula": 'dateBalanceYear(sourceDate,targetDate,false)',
- "desc": '璁$畻鐩稿樊鐨勫勾浠斤紝姣斿璁$畻骞撮緞锛宼argetDate涓�""琛ㄧず褰撳墠鏃堕棿锛岀涓変釜鍙傛暟涓簍rue琛ㄧず鏈夊浣欑殑鏈堜唤鎴栬�呭ぉ鏁版椂锛屽氨鍔�1;'
- },
- {
- "formula": 'dateBalanceDay(sourceDate,targetDate)',
- "desc": '璁$畻鐩稿樊鐨勫ぉ鏁帮紝targetDate涓�""琛ㄧず褰撳墠鏃堕棿'
- },
- {
- "formula": 'dateformat(d1,format)<',
- "desc": '灏嗗綋鍓嶇殑鏃ユ湡锛堟椂闂达級瀛楃涓茶浆涓烘寚瀹氱殑瀛楃涓诧紝濡傛灉format鐨勫唴瀹规湁绌烘牸锛岃浣跨敤&浠f浛'
- },
- {
- "formula": 'nowDatetime()',
- "desc": '鑾峰彇褰撳墠鏃ユ湡鍜屾椂闂淬�傛牸寮忎负yyyy-MM-dd HH:mm:ss'
- },
- {
- "formula": 'dayOf(d1)',
- "desc": '鑾峰彇鏍煎紡涓簓yyy-MM-dd鐨勬棩鏈熺殑澶╂暟'
- },
- {
- "formula": 'nowMon()',
- "desc": '鑾峰彇褰撳墠鐨勬湀浠斤紝鏍煎紡涓篗M'
- },
- {
- "formula": 'monOf(d1)',
- "desc": '鑾峰彇鏃ユ湡d1鐨勬湀浠芥暟'
- },
- {
- "formula": 'nowTime()',
- "desc": '鑾峰彇褰撳墠鏃堕棿锛屾牸寮忎负HH:mm:ss'
- },
- {
- "formula": 'nowYear()',
- "desc": '鑾峰彇骞翠唤锛屾牸寮忎负yyyy'
- },
- {
- "formula": 'yearOf()',
- "desc": '鑾峰彇鏃堕棿d1鐨勫勾浠�'
- }
- ],
- //鏁板鍏紡
- mathFormulaTableData: [{
- "formula": 'abs(value)',
- "desc": '姹傚弬鏁皏alue鐨勭粷瀵瑰�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'acos(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弽浣欏鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'asin(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弽姝e鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'atan(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弽姝e垏锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'cbrt(value)',
- "desc": '姹傚弬鏁皏alue鐨勭珛鏂规牴锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'ceil(value)',
- "desc": '杩斿洖涓嶅ぇ浜庡弬鏁皏alue鐨勬渶灏忔暣鏁帮紝渚嬪ceil(1.7)灏辩瓑浜�2锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'cos(value)',
- "desc": '姹傚弬鏁皏alue鐨勪綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'cosh(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弻鏇蹭綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'exp(n)',
- "desc": '娆ф媺鏁� e 鐨刵娆″箓锛宯蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'floor(n)',
- "desc": '娆ф媺鏁� e 鐨刵娆″箓鍑�1锛宯蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'log(value)',
- "desc": '杩斿洖涓嶅皬浜庡弬鏁皏alue鐨勬渶澶ф暣鏁帮紝渚嬪floor(1.7)绛変簬1锛宯蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'log10(value)',
- "desc": '鑷劧瀵规暟,value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'log1p(value)',
- "desc": '璁$畻搴曟暟涓� 10 鐨勫鏁�,value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'random()',
- "desc": '杩斿洖鍙傛暟涓� 1 涔嬪拰鐨勮嚜鐒跺鏁帮紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'rint(value)',
- "desc": '杩斿洖涓�涓吉闅忔満鏁帮紝璇ュ�煎ぇ浜庣瓑浜� 0.0 涓斿皬浜� 1.0'
- },
- {
- "formula": 'round(value)',
- "desc": '杩斿洖鍏跺�兼渶鎺ヨ繎鍙傛暟骞朵笖鏄暣鏁扮殑 double 鍊笺�傚鏋滀袱涓暣鏁扮殑 double 鍊奸兘鍚屾牱鎺ヨ繎锛岄偅涔堢粨鏋滃彇鍋舵暟銆傜壒娈婃儏鍐垫槸锛氬鏋滃弬鏁板�兼槸鏁存暟锛岄偅涔堢粨鏋滃氨鏄鍙傛暟銆傚鏋滃弬鏁版槸 NaN 鎴栨棤绌峰ぇ鎴栨闆舵垨璐熼浂锛岄偅涔堢粨鏋滀笌鍙傛暟鐩稿悓'
- },
- {
- "formula": 'signum(value)',
- "desc": '绗﹀彿鍑芥暟锛涘鏋滃弬鏁颁负 0锛屽垯杩斿洖 0锛涘鏋滃弬鏁板ぇ浜� 0锛� 鍒欒繑鍥� 1.0锛涘鏋滃弬鏁板皬浜� 0锛屽垯杩斿洖 -1.0'
- },
- {
- "formula": 'sin(value)',
- "desc": '姹傚弬鏁皏alue鐨勬寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'sinh(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弻鏇叉寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'tan(value)',
- "desc": '姹傚弬鏁皏alue鐨勬鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'tanh(value)',
- "desc": '姹傚弬鏁皏alue鐨勫弻鏇叉鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
- },
- {
- "formula": 'max(v1,v2)',
- "desc": '姹備袱涓暟涓殑杈冨ぇ鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3.2'
- },
- {
- "formula": 'min(v1,v2)',
- "desc": '姹備袱涓暟涓殑杈冨皬鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3'
- },
- {
- "formula": 'sqrt(value)',
- "desc": '姹傚钩鏂规牴'
- },
- ],
- //鍏朵粬鍏紡
- otherFormulaTableData: [{
- "formula": 'getcolvalue(servername,tablename,fieldname,pkField,pkValue)',
- "desc": '鏌ヨservername涓璽ablename鏁版嵁搴撹〃涓璮ieldname瀛楁鐨勫�硷紝pkfield琛ㄧず涓婚敭鐨勫瓧娈靛悕绉帮紝pkValue琛ㄧず涓婚敭鐨勫�硷紝serverName鐜板湪榛樿涓簂ocalServer'
- },
- ],
- //鏈満鏅彉閲�
- thisSceneTableData: [{
- "formula": '${}',
- "desc": ' '
- },
- ],
- //绯荤粺鍙橀噺
- systemVariableTableData: [{
- "formula": '#CURRENTUSER.OID#',
- "desc": '褰撳墠鐢ㄦ埛鐨勪富閿�'
- },
- {
- "formula": '#CURRENTUSER.ID#',
- "desc": '褰撳墠鐢ㄦ埛鐨勮处鎴�'
- },
- {
- "formula": '#CURRENTTIME#',
- "desc": '褰撳墠鏃堕棿'
- },
- {
- "formula": '#CURRENTDATE#',
- "desc": '褰撳墠鏃ユ湡'
- },
- {
- "formula": '#CURRENTDATETIME#',
- "desc": '褰撳墠鏃ユ湡鏃堕棿'
- },
- {
- "formula": '#CURRENTUSER_NAME#',
- "desc": '褰撳墠鐢ㄦ埛鐨勫鍚�'
- },
- {
- "formula": '#CURRENTUSER.SECRETGRADE#',
- "desc": '褰撳墠鐢ㄦ埛瀵嗙骇'
- },
- {
- "formula": '#CURRENTUSER.IPSECRET#',
- "desc": '褰撳墠鐢ㄦ埛鐨処P瀵嗙骇'
- },
- {
- "formula": '#CURRENTUSER.BUSINESSUNIT#',
- "desc": '褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏�'
- },
- {
- "formula": '#CURRENTUSER.BUSINESSUNITNAME#',
- "desc": '褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏冨悕绉�'
- },
- {
- "formula": '#CURRENTUSER.GROUPOID#',
- "desc": '褰撳墠鐢ㄦ埛鐨勯儴闂ㄤ富閿�'
- },
- {
- "formula": '#CURRENTUSER.GROUPNAME#',
- "desc": '褰撳墠鐢ㄦ埛鎵�灞為儴闂ㄥ悕绉�'
- },
- {
- "formula": '#CURRENTUSER.EMAIL#',
- "desc": '褰撳墠鐢ㄦ埛閭欢鍦板潃'
- },
- {
- "formula": '#CURRENTUSER.ROLENAME#',
- "desc": '褰撳墠鐢ㄦ埛鎵�灞炶鑹插悕绉�'
- }
- ],
-
-
- /* 鐖跺垎绫荤爜娈靛璇濇 */
- isShowParentClassifyOption: false, //鐖跺垎绫荤爜娈靛璇濇鏄剧ず鎺у埗
- classifyDialogLoading: true, //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
- parentClassifyParentOption: parentClassifyParentOption, //琛ㄦ牸閰嶇疆
- parentClassifyData: [], //琛ㄦ牸鏁版嵁
- //鍒嗛〉鍙傛暟閰嶇疆
- parentClassifyDataPage: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- parentClassifyQuery: {}, //鏌ヨ鏉′欢
- parentClassifySelectionList: [], //褰撳墠閫変腑琛�
-
-
- /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
- isShowSelectReferBtmOption: false, //瀵硅瘽妗嗘樉绀烘帶鍒�
- referBtmDialogLoading: true, //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
- referBtmDataPage: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- referBtmOption: referBtmOption, //琛ㄦ牸閰嶇疆
- referBtmData: [], //琛ㄦ牸鏁版嵁
- referBtmQuery: {}, //鏌ヨ鏉′欢
- referBtmSelectionList: [], //褰撳墠閫変腑琛�
-
- /** 鍩虹鐮佹鏂板琛ㄥ崟 */
- form: {
- id: '', //缂栧彿
- name: '', //鍚嶇О
- secType: 'codefixedsec', //鐮佹绫诲瀷
- description: '', //鎻忚堪
- serialDependFlag: false, //鏄惁娴佹按渚濊禆
- serialDependOrder: '', //娴佹按渚濊禆椤哄簭
- nullableFlag: false, //鏄惁涓虹┖
- displayFlag: false, //
- componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
- pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
- },
- formRules: {
- id: [
- { required: true, message: '璇疯緭鍏ョ爜娈电紪鍙�', trigger: 'blur' },
- ],
- name: [
- { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
- ],
- secType: [
- { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
- ],
- codeSecLengthType: [
- { required: true, message: '璇烽�夋嫨鐮佹闀垮害绫诲瀷', trigger: 'change' },
- ],
- codeSecLength: [
- { required: true, message: '璇疯緭鍏ョ爜娈电殑闀垮害', trigger: 'blur' },
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- referAttributeName: [
- { required: true, message: '璇烽�夋嫨灞炴��', trigger: 'blur' },
- ],
- serialStart: [
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- serialStep: [
- { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
- ],
- codeFillType: [
- { required: true, message: '璇烽�夋嫨缂栫爜琛ヤ綅鏂瑰紡', trigger: 'blur' },
- ],
- // 璁剧疆琛ヤ綅鏃剁殑瀛楃锛岄渶瑕佽嚜瀹氫箟鏂规硶鏉ュ仛鍒ゆ柇
- codeFillSeparatorSelect: [
- { required: true, message: '璇疯緭鍏ヨˉ浣嶆椂鐨勫瓧绗�', trigger: 'blur' },
- ],
- codeFillLength: [
- { required: true, message: '璇疯緭鍏ュ~鍏呴暱搴�', trigger: 'blur' },
- { type: 'number', message: '濉厖闀垮害蹇呴』涓烘暟瀛楀��'}
- ],
- codeFillLimit: [
- { required: true, message: '璇疯緭鍏ユ祦姘翠笂闄�', trigger: 'blur' },
- { type: 'number', message: '娴佹按涓婇檺蹇呴』涓烘暟瀛楀��'}
- ],
- codeLevelType: [
- { required: true, message: '璇烽�夋嫨灞傜骇绫诲瀷', trigger: 'change' },
- ],
- codeLevelValue: [
- { type: 'number', message: '灞傜骇鐨勫�煎繀椤讳负鏁板瓧鍊�'}
- ],
- valueCutType: [
- { required: true, message: '璇烽�夋嫨瀛楃鎴彇绫诲瀷', trigger: 'change' },
- ],
- referBtmId: [
- { required: true, message: '璇烽�夊弬鐓у簲鐢ㄧ殑涓氬姟绫诲瀷', trigger: 'change' },
- ],
- referConfig: [
- { required: true, message: '璇烽�夋嫨鍙傜収閰嶇疆', trigger: 'change' },
- ],
- codeDateFormatStr: [
- { required: true, message: '璇疯緭鍏ユ棩鏈熸牸寮�', trigger: 'blur' },
+ formula: "#CURRENTUSER.ID#",
+ desc: "褰撳墠鐢ㄦ埛鐨勮处鎴�",
+ },
+ {
+ formula: "#CURRENTTIME#",
+ desc: "褰撳墠鏃堕棿",
+ },
+ {
+ formula: "#CURRENTDATE#",
+ desc: "褰撳墠鏃ユ湡",
+ },
+ {
+ formula: "#CURRENTDATETIME#",
+ desc: "褰撳墠鏃ユ湡鏃堕棿",
+ },
+ {
+ formula: "#CURRENTUSER_NAME#",
+ desc: "褰撳墠鐢ㄦ埛鐨勫鍚�",
+ },
+ {
+ formula: "#CURRENTUSER.SECRETGRADE#",
+ desc: "褰撳墠鐢ㄦ埛瀵嗙骇",
+ },
+ {
+ formula: "#CURRENTUSER.IPSECRET#",
+ desc: "褰撳墠鐢ㄦ埛鐨処P瀵嗙骇",
+ },
+ {
+ formula: "#CURRENTUSER.BUSINESSUNIT#",
+ desc: "褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏�",
+ },
+ {
+ formula: "#CURRENTUSER.BUSINESSUNITNAME#",
+ desc: "褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏冨悕绉�",
+ },
+ {
+ formula: "#CURRENTUSER.GROUPOID#",
+ desc: "褰撳墠鐢ㄦ埛鐨勯儴闂ㄤ富閿�",
+ },
+ {
+ formula: "#CURRENTUSER.GROUPNAME#",
+ desc: "褰撳墠鐢ㄦ埛鎵�灞為儴闂ㄥ悕绉�",
+ },
+ {
+ formula: "#CURRENTUSER.EMAIL#",
+ desc: "褰撳墠鐢ㄦ埛閭欢鍦板潃",
+ },
+ {
+ formula: "#CURRENTUSER.ROLENAME#",
+ desc: "褰撳墠鐢ㄦ埛鎵�灞炶鑹插悕绉�",
+ },
],
- },
- //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
- sectypeList:[], //鐮佹绫诲瀷
- codeSecLengthType:[], //鐮佹闀垮害绫诲瀷
- codeFillType:[], //缂栫爜琛ヤ綅鏂瑰紡
- codeFillSeparator:[], //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夊唴瀹�
- codeLevelType:[], //灞傜骇绫诲瀷
- codeCutType:[], //瀛楃鎴彇绫诲瀷
- codeGetValueType:[], //鍙栧�肩被鍨�
+ /* 鐖跺垎绫荤爜娈靛璇濇 */
+ isShowParentClassifyOption: false, //鐖跺垎绫荤爜娈靛璇濇鏄剧ず鎺у埗
+ classifyDialogLoading: true, //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
+ parentClassifyParentOption: parentClassifyParentOption, //琛ㄦ牸閰嶇疆
+ parentClassifyData: [], //琛ㄦ牸鏁版嵁
+ //鍒嗛〉鍙傛暟閰嶇疆
+ parentClassifyDataPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ parentClassifyQuery: {}, //鏌ヨ鏉′欢
+ parentClassifySelectionList: [], //褰撳墠閫変腑琛�
- //琛ㄥ崟鍏冪礌鏍囩瀹藉害
- leftFormLabelWidth: '110px',
- rightFormLabelWidth: '150px',
+
+ /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
+ isShowSelectReferBtmOption: false, //瀵硅瘽妗嗘樉绀烘帶鍒�
+ referBtmDialogLoading: true, //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
+ referBtmDataPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ referBtmOption: referBtmOption, //琛ㄦ牸閰嶇疆
+ referBtmData: [], //琛ㄦ牸鏁版嵁
+ referBtmQuery: {}, //鏌ヨ鏉′欢
+ referBtmSelectionList: [], //褰撳墠閫変腑琛�
- };
- },
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.codeRule_add, true),
- viewBtn: this.vaildData(this.permission.codeRule_view, false),
- delBtn: this.vaildData(this.permission.plCodeRule_delete, false),
- editBtn: this.vaildData(this.permission.codeRule_edit, true)
+ /** 鍩虹鐮佹鏂板琛ㄥ崟 */
+ form: {
+ id: '', //缂栧彿
+ name: '', //鍚嶇О
+ secType: 'codefixedsec', //鐮佹绫诲瀷
+ description: '', //鎻忚堪
+ serialDependFlag: false, //鏄惁娴佹按渚濊禆
+ serialDependOrder: '', //娴佹按渚濊禆椤哄簭
+ nullableFlag: false, //鏄惁涓虹┖
+ displayFlag: false, //
+ componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
+ pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
+ },
+ // formRules: {
+ // id: [
+ // { required: true, message: '璇疯緭鍏ョ爜娈电紪鍙�', trigger: 'blur' },
+ // ],
+ // name: [
+ // { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
+ // ],
+ // secType: [
+ // { required: true, message: '璇烽�変腑鐮佹绫诲瀷', trigger: 'change' },
+ // ],
+ // codeSecLengthType: [
+ // { required: true, message: '璇烽�夋嫨鐮佹闀垮害绫诲瀷', trigger: 'change' },
+ // ],
+ // codeSecLength: [
+ // { required: true, message: '璇疯緭鍏ョ爜娈电殑闀垮害', trigger: ['blur', 'change']},
+ // { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�',trigger: ['blur', 'change']}
+ // ],
+ // referAttributeName: [
+ // { required: true, message: '璇烽�夋嫨灞炴��', trigger: 'change' },
+ // ],
+ // serialStart: [
+ // { type: 'number', message: '娴佹按鍙风殑璧峰鍊煎繀椤讳负鏁板瓧鍊�',trigger: ['blur', 'change']}
+ // ],
+ // serialStep: [
+ // { type: 'number', message: '娴佹按鐨勬闀垮繀椤讳负鏁板瓧鍊�',trigger: ['blur', 'change']}
+ // ],
+ // codeFillType: [
+ // { required: true, message: '璇烽�夋嫨缂栫爜琛ヤ綅鏂瑰紡', trigger: ['blur', 'change']},
+ // ],
+ // // 璁剧疆琛ヤ綅鏃剁殑瀛楃锛岄渶瑕佽嚜瀹氫箟鏉ュ仛鍒ゆ柇
+ // codeFillSeparatorSelect: [
+ // { validator: validateCodeFill, trigger: ['blur', 'change'] },
+ // ],
+ // codeFillLength: [
+ // { required: true, message: '璇疯緭鍏ュ~鍏呴暱搴�', trigger: ['blur', 'change'] },
+ // { type: 'number', message: '濉厖闀垮害蹇呴』涓烘暟瀛楀��',trigger: ['blur', 'change']}
+ // ],
+ // codeFillLimit: [
+ // { required: true, message: '璇疯緭鍏ユ祦姘翠笂闄�', trigger: ['blur', 'change'] },
+ // { type: 'number', message: '娴佹按涓婇檺蹇呴』涓烘暟瀛楀��',trigger: ['blur', 'change']}
+ // ],
+ // codeLevelType: [
+ // { required: true, message: '璇烽�夋嫨灞傜骇绫诲瀷', trigger: 'change' },
+ // ],
+ // codeLevelValue: [
+ // { required: false, type: 'number', message: '灞傜骇鐨勫�煎繀椤讳负鏁板瓧鍊�', trigger: 'change'}
+ // ],
+ // valueCutType: [
+ // { required: true, message: '璇烽�夋嫨瀛楃鎴彇绫诲瀷', trigger: 'change' },
+ // ],
+ // referBtmId: [
+ // { required: true, message: '璇烽�夋嫨鍙傜収搴旂敤鐨勪笟鍔$被鍨�', trigger: 'change' },
+ // ],
+ // referConfig: [
+ // { required: true, message: '璇烽�夋嫨鍙傜収閰嶇疆', trigger: 'change' },
+ // ],
+ // codeDateFormatStr: [
+ // { required: true, message: '璇疯緭鍏ユ棩鏈熸牸寮�', trigger: ['blur', 'change'] },
+ // ],
+
+ // },
+ //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
+ sectypeList:[], //鐮佹绫诲瀷
+ codeSecLengthType:[], //鐮佹闀垮害绫诲瀷
+ codeFillType:[], //缂栫爜琛ヤ綅鏂瑰紡
+ codeFillSeparator:[], //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夊唴瀹�
+ codeLevelType:[], //灞傜骇绫诲瀷
+ codeCutType:[], //瀛楃鎴彇绫诲瀷
+ codeGetValueType:[], //鍙栧�肩被鍨�
+
+ //琛ㄥ崟鍏冪礌鏍囩瀹藉害
+ leftFormLabelWidth: '110px',
+ rightFormLabelWidth: '150px',
+
};
},
- },
- methods: {
-
- /** 閫変腑鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
- saveSelectedreferBtm(){
- if(this.referBtmSelectionList.length != 1){
- this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
- return false;
- }
- //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
- this.form.referBtmId = this.referBtmSelectionList[0].id;
- this.form.referBtmName = this.referBtmSelectionList[0].name;
- //娓呯┖褰撳墠閫変腑鐨勮
- this.referBtmSelectionClear();
- this.isShowSelectReferBtmOption = false;
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.codeRule_add, true),
+ viewBtn: this.vaildData(this.permission.codeRule_view, false),
+ delBtn: this.vaildData(this.permission.plCodeRule_delete, false),
+ editBtn: this.vaildData(this.permission.codeRule_edit, true)
+ };
+ },
},
- referBtmSearchReset() {
- this.referBtmQuery = {};
- this.referBtmOnLoad(this.referBtmDataPage);
- },
- referBtmSearchChange(params, done) {
- this.referBtmQuery = params;
- this.referBtmDataPage.currentPage = 1;
- this.referBtmOnLoad(this.page, params);
- done();
- },
- referBtmSelectionChange(list) {
- //console.log(list);
- this.referBtmSelectionList = list;
- },
- referBtmSelectionClear() {
- this.referBtmSelectionList = [];
- this.$refs.crudReferBtm.toggleSelection();
- },
- referBtmCurrentChange(currentPage){
- this.referBtmDataPage.currentPage = currentPage;
- },
- referBtmSizeChange(pageSize){
- this.referBtmDataPage.pageSize = pageSize;
- },
- refreshReferBtmDataChange() {
- this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery);
- },
- //鍔犺浇涓弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷鐨勬暟鎹�
- referBtmOnLoad(page, params = {}) {
- this.referBtmDialogLoading = true;
- let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
- Object.assign(params,{pkCodeRule:oid})
- //鎺ュ彛杩樻湭鎻愪緵锛屽緟鏇存敼
- refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => {
- //console.log(res.data);
- const data = res.data.data;
- this.referBtmDataPage.total = data.total;
- this.referBtmData = data.records;
- this.referBtmDialogLoading = false;
+ methods: {
+
+ /* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */
+ updateFormulaContent(content){
+ this.form.getValueClass = content;
+ },
+
+ /** 閫変腑鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+ saveSelectedreferBtm(){
+ if(this.referBtmSelectionList.length != 1){
+ this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ return false;
+ }
+ //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+ this.form.referBtmId = this.referBtmSelectionList[0].id;
+ this.form.referBtmName = this.referBtmSelectionList[0].name;
+ //娓呯┖褰撳墠閫変腑鐨勮
this.referBtmSelectionClear();
- });
- },
-
-
- /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
- // 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽瓙缁勪欢鍥炴樉
- saveSelectedParentClassify(){
- //console.log(this.parentClassifySelectionList.length);
- if(this.parentClassifySelectionList.length != 1){
- this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
- return false;
- }
- //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
- this.form.parentClassifySecOid = this.parentClassifySelectionList[0].id;
- this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
- //娓呯┖褰撳墠閫変腑鐨勮
- this.parentClassifySelectionClear();
- this.isShowParentClassifyOption = false;
- },
- parentClassifySearchReset() {
- this.parentClassifyQuery = {};
- this.parentClassifyOnLoad(this.parentClassifyDataPage);
- },
- parentClassifySearchChange(params, done) {
- this.parentClassifyQuery = params;
- this.parentClassifyDataPage.currentPage = 1;
- this.parentClassifyOnLoad(this.page, params);
- done();
- },
- parentClassifySelectionChange(list) {
- //console.log(this.parentClassifyCurrentChange);
- this.parentClassifySelectionList = list;
- },
- parentClassifySelectionClear() {
- this.parentClassifySelectionList = [];
- this.$refs.crudParentClassify.toggleSelection();
- },
- parentClassifyCurrentChange(currentPage){
- this.parentClassifyDataPage.currentPage = currentPage;
- },
- parentClassifySizeChange(pageSize){
- this.parentClassifyDataPage.pageSize = pageSize;
- },
- refreshParentClassifyDataChange() {
- this.parentClassifyOnLoad(this.parentClassifyDataPage, this.parentClassifyQuery);
- },
- parentClassifyOnLoad(page, params = {}) {
- this.classifyDialogLoading = true;
- let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
- Object.assign(params,{pkCodeRule:oid})
- refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => {
- //console.log(res.data);
- const data = res.data.data;
- this.parentClassifyDataPage.total = data.total;
- this.parentClassifyData = data.records;
- this.classifyDialogLoading = false;
- this.parentClassifySelectionClear();
- });
- },
-
-
- /** 鎵撳紑鍏紡缂栬緫妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
- openformulaEdit(){
- this.isShowformulaEdit = true;
- },
- //鍙屽嚮娣诲姞鍏紡鍐呭
- dbClickAddContent(row){
- //console.log(row.formula);
- this.formulaContent = this.formulaContent + row.formula;
- },
- //娓呯┖鍏紡鍐呭
- resetFormulaContent(){
- this.formulaContent = '';
- },
- //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
- closeFormulaEdit(){
- this.resetFormulaContent();
- },
- //缂栬緫瀹屾垚鍏紡鍐呭骞跺洖鏄�
- saveFormulaContent(){
- //console.log(this.formulaContent);
- if(this.formulaContent.trim == null || this.formulaContent.trim == ''){
- this.$message.warning("鍏紡鍐呭涓嶈兘涓虹┖锛�");
- return;
- }
- //鍏紡鍐呭鍥炴樉
- this.form.getValueClass = this.formulaContent;
- this.isShowformulaEdit = false;
- },
-
- /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
- // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
- nodeClick(data) {
- this.currentSelectTreeData = data;
- this.loadlistClassifyLinkAttr()
- },
- // 鍔犺浇鍒嗙被杩炴帴灞炴�ц〃鏍兼暟鎹�
- loadlistClassifyLinkAttr(){
- this.selectAttrOptionLoading = true;
- listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
- //console.log(res.data.data);
- //閫犲亣鏁版嵁
- let dataInfo =[
- {"id":"address","name":"浼氳瀹ゅ湴鍧�","oid":"058D840D-1010-A7DE-7C52-B39C03CE89C1","attrLength":"150","description":"","attributeDataTypeText":"瀛楃涓�"},
- {"id":"businesslicensetype","name":"钀ヤ笟鎵х収绫诲瀷","oid":"BDAC6D3E-1827-35A0-F3CA-0E58A43F6A07","attrLength":"255","description":"钀ヤ笟鎵х収绫诲瀷","attributeDataTypeText":"瀛楃涓�"},
- {"id":"certificatenumber","name":"淇濆瘑璇佺紪鍙�","oid":"E2BC8332-A721-3713-26C3-C9F6340C2C1D","attrLength":"255","description":"淇濆瘑璇佺紪鍙�","attributeDataTypeText":"瀛楃涓�"},
- ]
- this.selectattrData = dataInfo;
- this.selectAttrOptionLoading = false;
- })
- },
- // 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
- selectAttrOptionSearchChange(params, done) {
- this.query = params;
- console.log(params); //杩欏効闇�瑕佹敼
- this.loadlistClassifyLinkAttr({"page":1,"limit":-1 ,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid});
- done();
- },
- // 灞炴�у彇鍊煎綋鍓嶉�変腑琛屽彂鐢熷彉鍖栨椂瑙﹀彂
- selectionChangeAttr(list){
- this.selectionChangeAttrList = list;
- },
- // 閲嶇疆浣嶅睘鎬ч�夊彇鍊艰〃鏍肩殑鎼滅储妗嗕箣鍚庣殑鍥炶皟
- searchAttrReset() {
- this.loadlistClassifyLinkAttr()
- },
- // 涓哄睘鎬ч�夊彇鍊间箣鍚庣殑鍥炴樉
- selectedListClassifyLinkAttr(){
- if(this.selectionChangeAttrList.length != 1){
- this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
- return false;
- }
- //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
- this.form = Object.assign({}, this.form, {
- referAttributeId:this.selectionChangeAttrList[0].id,
- referAttributeName:this.selectionChangeAttrList[0].name,
- referCodeClassifyOid: this.currentSelectTreeData.key,
- referCodeClassifyOidName: this.currentSelectTreeData.title,
- })
- this.isShowSelectAttrOption = false;
- },
-
-
- /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
- // 鐮佸�肩鐞嗗脊绐楁帶鍒�
- openBasicSecCodeValueMgr(row){
- //褰撳墠涓哄浐瀹氱爜娈电爜鍊肩鐞嗙爜鍊肩鐞�
- if(row.secType === "codefixedsec"){
- this.isShowFixedForm = true;
- this.loadFixedValueTableData(row);
- }else{
- //鍒嗙被鐮佹
- this.isShowFixedForm = false;
- }
- this.codefixedsecOrCodeclassifysecOid = row.oid;
- this.isShowBasicSecCodeValueMgr = true;
- },
- //鍔犺浇鍥哄畾鐮佹鐮佸�艰〃鏁版嵁
- loadFixedValueTableData(row){
- this.fixedValueOptionLoading = true;
- gridCodeFixedValue(1, -1, {"codeFixedSecOid":row.oid}).then(res=>{
- this.fixedValueData = res.data.data.records;
- //console.log(this.fixedValueData);
- this.fixedValueOptionLoading = false;
- })
- },
- //鍔犺浇鍒嗙被鐮佹鐮佸�肩鐞嗛〉闈ree鏁版嵁
-
- //鍗曞嚮鍥哄畾鐮佹鐨勭爜鍊艰〃涓鏃惰Е鍙戠殑浜嬩欢
- selectedCodeValueRow(row){
- //console.log(row);
- this.selectedFixedOrCodeclassifyValue = row;
- this.codeFixdForm.id = row.id;
- this.codeFixdForm.description = row.description;
- this.codeFixdForm.codeFixedSecOid = row.codefixedsecoid;
- },
- //鏂板鐮佸��
- addCodeSecValue(condition){
- if(condition === "codefixedsec"){
- if(this.codeFixdForm.id.trim() == ''){
- this.$message.warning("鐮佸�间笉鑳戒负绌猴紒");
- return;
- }
- this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysecOid;
- addSaveCodeFixedValue(this.codeFixdForm).then(() => {
- this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid});
- this.clearFixedOrClassifyForm('codefixedsec');
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- }, error => {
- window.console.log(error);
+ this.isShowSelectReferBtmOption = false;
+ },
+ referBtmSearchReset() {
+ this.referBtmQuery = {};
+ this.referBtmOnLoad(this.referBtmDataPage);
+ },
+ referBtmSearchChange(params, done) {
+ this.referBtmQuery = params;
+ this.referBtmDataPage.currentPage = 1;
+ this.referBtmOnLoad(this.page, params);
+ done();
+ },
+ referBtmSelectionChange(list) {
+ //console.log(list);
+ this.referBtmSelectionList = list;
+ },
+ referBtmSelectionClear() {
+ this.referBtmSelectionList = [];
+ this.$refs.crudReferBtm.toggleSelection();
+ },
+ referBtmCurrentChange(currentPage){
+ this.referBtmDataPage.currentPage = currentPage;
+ },
+ referBtmSizeChange(pageSize){
+ this.referBtmDataPage.pageSize = pageSize;
+ },
+ refreshReferBtmDataChange() {
+ this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery);
+ },
+ //鍔犺浇涓弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷鐨勬暟鎹�
+ referBtmOnLoad(page, params = {}) {
+ this.referBtmDialogLoading = true;
+ let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
+ Object.assign(params,{pkCodeRule:oid})
+ //鎺ュ彛杩樻湭鎻愪緵锛屽緟鏇存敼
+ refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => {
+ //console.log(res.data);
+ const data = res.data.data;
+ this.referBtmDataPage.total = data.total;
+ this.referBtmData = data.records;
+ this.referBtmDialogLoading = false;
+ this.referBtmSelectionClear();
});
- }else {
-
- }
- },
- // 娓呯┖鐮佸�艰〃鍗�
- clearFixedOrClassifyForm(condition){
- //鐐瑰嚮鍙栨秷鏃舵竻绌鸿〃鍗曚笌褰撳墠閫変腑鐨勭爜鍊硷紝骞剁鐢ㄦ寜閽�
- this.selectedFixedOrCodeclassifyValue = '';
- if(condition === "close"){
- this.codeFixdForm.id = '';
- }
- if(condition === "codefixedsec" || condition === "close"){
- this.codeFixdForm.description = '';
- this.codeFixdForm.codeFixedSecOid = '';
- }else {
- this.codeClassifyForm = '';
- }
- },
- //淇敼鐮佸��
- editCodeSecValue(condition){
- if(condition=='codefixedsec'){
- //浠ュ墠鏄洿鎺ユ妸褰撳墠閫変腑琛岀殑鎵�鏈夋暟鎹兘杩涜鎻愪氦锛屼絾鍏跺疄鍙渶瑕佷紶杈撲竴浜涙瘮瑕佸弬鏁板嵆鍙紝杩欏効鍋氫簡淇敼锛岄渶瑕佺┛鍏朵粬鍙傛暟鐨勮鑷娣诲姞
- let editData = {
- "oid": this.selectedFixedOrCodeclassifyValue.oid,
- "ts": new Date().getTime(),
- "description": this.codeFixdForm.description,
- "id": this.codeFixdForm.id,
- "codeFixedSecOid": this.selectedFixedOrCodeclassifyValue.codefixedsecoid
+ },
+
+
+ /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+ // 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽洖鏄�
+ saveSelectedParentClassify(){
+ //console.log(this.parentClassifySelectionList.length);
+ if(this.parentClassifySelectionList.length != 1){
+ this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ return false;
}
- editCodeFixedValue(editData).then(() => {
- this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
+ //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+ this.form.parentClassifySecOid = this.parentClassifySelectionList[0].oid;
+ this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
+ //娓呯┖褰撳墠閫変腑鐨勮
+ this.parentClassifySelectionClear();
+ this.isShowParentClassifyOption = false;
+ },
+ parentClassifySearchReset() {
+ this.parentClassifyQuery = {};
+ this.parentClassifyOnLoad(this.parentClassifyDataPage);
+ },
+ parentClassifySearchChange(params, done) {
+ this.parentClassifyQuery = params;
+ this.parentClassifyDataPage.currentPage = 1;
+ this.parentClassifyOnLoad(this.page, params);
+ done();
+ },
+ parentClassifySelectionChange(list) {
+ //console.log(this.parentClassifyCurrentChange);
+ this.parentClassifySelectionList = list;
+ },
+ parentClassifySelectionClear() {
+ this.parentClassifySelectionList = [];
+ this.$refs.crudParentClassify.toggleSelection();
+ },
+ parentClassifyCurrentChange(currentPage){
+ this.parentClassifyDataPage.currentPage = currentPage;
+ },
+ parentClassifySizeChange(pageSize){
+ this.parentClassifyDataPage.pageSize = pageSize;
+ },
+ refreshParentClassifyDataChange() {
+ this.parentClassifyOnLoad(this.parentClassifyDataPage, this.parentClassifyQuery);
+ },
+ parentClassifyOnLoad(page, params = {}) {
+ this.classifyDialogLoading = true;
+ let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
+ Object.assign(params,{pkCodeRule:oid})
+ refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, this.parentClassifyQuery)).then(res => {
+ //console.log(res.data);
+ const data = res.data.data;
+ this.parentClassifyDataPage.total = data.total;
+ this.parentClassifyData = data.records;
+ this.classifyDialogLoading = false;
+ this.parentClassifySelectionClear();
+ });
+ },
+
+
+ /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+ // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
+ nodeClick(data) {
+ this.currentSelectTreeData = data;
+ this.loadlistClassifyLinkAttr()
+ },
+ // 鍔犺浇鍒嗙被杩炴帴灞炴�ц〃鏍兼暟鎹�
+ loadlistClassifyLinkAttr(){
+ this.selectAttrOptionLoading = true;
+ listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
+ //console.log(res.data.data);
+ //閫犲亣鏁版嵁
+ let dataInfo =[
+ {"id":"address","name":"浼氳瀹ゅ湴鍧�","oid":"058D840D-1010-A7DE-7C52-B39C03CE89C1","attrLength":"150","description":"","attributeDataTypeText":"瀛楃涓�"},
+ {"id":"businesslicensetype","name":"钀ヤ笟鎵х収绫诲瀷","oid":"BDAC6D3E-1827-35A0-F3CA-0E58A43F6A07","attrLength":"255","description":"钀ヤ笟鎵х収绫诲瀷","attributeDataTypeText":"瀛楃涓�"},
+ {"id":"certificatenumber","name":"淇濆瘑璇佺紪鍙�","oid":"E2BC8332-A721-3713-26C3-C9F6340C2C1D","attrLength":"255","description":"淇濆瘑璇佺紪鍙�","attributeDataTypeText":"瀛楃涓�"},
+ ]
+ this.selectattrData = dataInfo;
+ this.selectAttrOptionLoading = false;
+ })
+ },
+ // 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
+ selectAttrOptionSearchChange(params, done) {
+ this.query = params;
+ console.log(params); //杩欏効闇�瑕佹敼
+ this.loadlistClassifyLinkAttr({"page":1,"limit":-1 ,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid});
+ done();
+ },
+ // 灞炴�у彇鍊煎綋鍓嶉�変腑琛屽彂鐢熷彉鍖栨椂瑙﹀彂
+ selectionChangeAttr(list){
+ this.selectionChangeAttrList = list;
+ },
+ // 閲嶇疆浣嶅睘鎬ч�夊彇鍊艰〃鏍肩殑鎼滅储妗嗕箣鍚庣殑鍥炶皟
+ searchAttrReset() {
+ this.loadlistClassifyLinkAttr()
+ },
+ // 涓哄睘鎬ч�夊彇鍊间箣鍚庣殑鍥炴樉
+ selectedListClassifyLinkAttr(){
+ if(this.selectionChangeAttrList.length != 1){
+ this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ return false;
+ }
+ //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+ this.form = Object.assign({}, this.form, {
+ referAttributeId:this.selectionChangeAttrList[0].id,
+ referAttributeName:this.selectionChangeAttrList[0].name,
+ referCodeClassifyOid: this.currentSelectTreeData.key,
+ referCodeClassifyOidName: this.currentSelectTreeData.title,
+ })
+ this.isShowSelectAttrOption = false;
+ },
+
+
+ /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
+ // 鐮佸�肩鐞嗗脊绐楁帶鍒�
+ openBasicSecCodeValueMgr(row){
+ //褰撳墠涓哄浐瀹氱爜娈电爜鍊肩鐞嗙爜鍊肩鐞�
+ if(row.secType === "codefixedsec"){
+ this.isShowFixedForm = true;
+ this.loadFixedValueTableData(row);
+ }else{
+ //鍒嗙被鐮佹
+ this.isShowFixedForm = false;
+ this.loadClassifyValueData(row);
+ }
+ this.codefixedsecOrCodeclassifysecOid = row.oid;
+ this.isShowBasicSecCodeValueMgr = true;
+ },
+ //鍔犺浇鍥哄畾鐮佹鐮佸�艰〃鏁版嵁
+ loadFixedValueTableData(row){
+ this.fixedValueOptionLoading = true;
+ gridCodeFixedValue(1, -1, {"codeFixedSecOid":row.oid}).then(res=>{
+ this.fixedValueData = res.data.data.records;
+ //console.log(this.fixedValueData);
+ this.fixedValueOptionLoading = false;
+ })
+ },
+ //鍗曞嚮鍥哄畾鐮佹鐨勭爜鍊艰〃涓鏃惰Е鍙戠殑浜嬩欢
+ selectedCodeValueRow(row){
+ //console.log(row);
+ this.selectedFixedOrCodeclassifyValue = row;
+ this.codeFixdForm.id = row.id;
+ this.codeFixdForm.description = row.description;
+ this.codeFixdForm.codeFixedSecOid = row.codefixedsecoid;
+ },
+ //鏂板鐮佸��
+ addCodeSecValue(condition){
+ if(condition === "codefixedsec"){
+ if(this.codeFixdForm.id.trim() == ''){
+ this.$message.warning("鐮佸�间笉鑳戒负绌猴紒");
+ return;
+ }
+ if(this.codeFixdForm.id.trim().length >= 12 ){
+ this.$message.warning("鐮佸�奸暱搴︿笉鑳藉ぇ浜�12锛�");
+ return;
+ }
+ this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysecOid;
+ addSaveCodeFixedValue(this.codeFixdForm).then(() => {
+ this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid});
+ this.clearFixedOrClassifyForm('codefixedsec');
this.$message({
type: "success",
message: "鎿嶄綔鎴愬姛!"
});
}, error => {
window.console.log(error);
- });
- }else {
-
- }
-
- },
- //鍒犻櫎鐮佸��
- delCodeSecValue(condition){
- //鍥哄畾鐮佹鐮佸�煎垹闄�
- if(condition == 'codefixedsec'){
- console.log(this.selectedFixedOrCodeclassifyValue.oid);
- this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- let ts = new Date(this.selectedFixedOrCodeclassifyValue.ts).getTime();
- return deleteCodeFixedValue({"oid": this.selectedFixedOrCodeclassifyValue.oid,"ts": ts});
- })
- .then(() => {
- this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
- this.clearFixedOrClassifyForm('codefixedsec');
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
});
- });
- }else{
- //鍒嗙被鐮佹鐮佸�煎垹闄�
-
+ }else {
+ this.codeClassifyForm.codeClassifySecOid = this.codefixedsecOrCodeclassifysecOid;
+ console.log(this.codeClassifyForm);
+ addSaveCodeClassifyValue(this.codeClassifyForm).then(() => {
+ this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
+ this.clearFixedOrClassifyForm('codeclassifyvaluesec');
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ this.$confirm(error, {
+ confirmButtonText: "纭畾",
+ type: "error",
+ })
+ });
+ }
+ },
+ //娓呯┖鐮佸�艰〃鍗�
+ clearFixedOrClassifyForm(condition){
+ //鐐瑰嚮鍙栨秷鏃舵竻绌鸿〃鍗曚笌褰撳墠閫変腑鐨勭爜鍊硷紝骞剁鐢ㄦ寜閽�
this.selectedFixedOrCodeclassifyValue = '';
- }
-
- },
- //瀵圭爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
- codeFixedValueOpetion(condition,row){
- //console.log(this.fixedValueData[row.$index].orderNum);
- const index = row.$index;
- if(condition == 'up'){
- //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
- this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum-1
- this.fixedValueData[index-1].orderNum = this.fixedValueData[index].orderNum+1
- //褰撲笅鏍囧噺鍘�1灏忎簬0鎴栬�卭rderNum瀛楁鍑忓幓1灏忎簬0鐨勬椂鍊欎笉鎵ц涓婄Щ鎿嶄綔
- if(index-1<0 || this.fixedValueData[row.$index].orderNum-1<0){
- return;
+ //console.log(condition);
+ if(condition === "close"){
+ this.codeFixdForm = this.$options.data().codeFixdForm;
+ this.codeClassifyForm = this.$options.data().codeClassifyForm;
}
- //璋冩暣鏁扮粍鍊奸『搴�
- let tempOption = this.fixedValueData[index-1];
- this.$set(this.fixedValueData, index - 1, this.fixedValueData[index])
- this.$set(this.fixedValueData, index , tempOption)
+ if(condition === "codefixedsec"){
+ this.codeFixdForm.description = '';
+ this.codeFixdForm.codeFixedSecOid = '';
+ }else {
+ this.codeClassifyForm = this.$options.data().codeClassifyForm;
+ }
+ },
+ //淇敼鐮佸��
+ editCodeSecValue(condition){
+ if(condition=='codefixedsec'){
+ //浠ュ墠鏄洿鎺ユ妸褰撳墠閫変腑琛岀殑鎵�鏈夋暟鎹兘杩涜鎻愪氦锛屼絾鍏跺疄鍙渶瑕佷紶杈撲竴浜涙瘮瑕佸弬鏁板嵆鍙紝杩欏効鍋氫簡淇敼锛岄渶瑕佺┛鍏朵粬鍙傛暟鐨勮鑷娣诲姞
+ let editData = {
+ "oid": this.selectedFixedOrCodeclassifyValue.oid,
+ "ts": new Date().getTime(),
+ "description": this.codeFixdForm.description,
+ "id": this.codeFixdForm.id,
+ "codeFixedSecOid": this.selectedFixedOrCodeclassifyValue.codefixedsecoid
+ }
+ editCodeFixedValue(editData).then(() => {
+ this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ }else {
+ this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid;
+ editCodeClassifyValue(this.codeClassifyForm).then(() => {
+ this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid})
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ }
+
+ },
+ //鍒犻櫎鐮佸��
+ delCodeSecValue(condition){
+ //鍥哄畾鐮佹鐮佸�煎垹闄�
+ if(condition == 'codefixedsec'){
+ //console.log(this.selectedFixedOrCodeclassifyValue.oid);
+ this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ let ts = new Date(this.selectedFixedOrCodeclassifyValue.ts).getTime();
+ return deleteCodeFixedValue({"oid": this.selectedFixedOrCodeclassifyValue.oid,"ts": ts});
+ })
+ .then(() => {
+ this.selectedFixedOrCodeclassifyValue = '';
+ this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
+ this.clearFixedOrClassifyForm('codefixedsec');
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ });
+ }else{
+ //鍒嗙被鐮佹鐮佸�煎垹闄�
+ this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ let ts = new Date(this.selectedFixedOrCodeclassifyValue.ts).getTime();
+ return deleteCodeClassifyValue({"oid": this.selectedFixedOrCodeclassifyValue.oid,"ts": ts});
+ })
+ .then(() => {
+ this.selectedFixedOrCodeclassifyValue = '';
+ this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid})
+ this.clearFixedOrClassifyForm('codeclassifyvalue');
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ });
+ }
+
+ },
+ //瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
+ codeFixedValueOpetion(condition,row){
+ //console.log(this.fixedValueData[row.$index].orderNum);
+ const index = row.$index;
+ if(condition == 'up'){
+ //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
+ this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum-1
+ this.fixedValueData[index-1].orderNum = this.fixedValueData[index].orderNum+1
+ //褰撲笅鏍囧噺鍘�1灏忎簬0鎴栬�卭rderNum瀛楁鍑忓幓1灏忎簬0鐨勬椂鍊欎笉鎵ц涓婄Щ鎿嶄綔
+ if(index-1<0 || this.fixedValueData[row.$index].orderNum-1<0){
+ return;
+ }
+ //璋冩暣鏁扮粍鍊奸『搴�
+ let tempOption = this.fixedValueData[index-1];
+ this.$set(this.fixedValueData, index - 1, this.fixedValueData[index])
+ this.$set(this.fixedValueData, index , tempOption)
+ //console.log(this.fixedValueData);
+ }else if(condition == 'down'){
+ //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
+ this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum+1
+ this.fixedValueData[index+1].orderNum = this.fixedValueData[index].orderNum-1
+ //璋冩暣鏁扮粍鍊奸『搴�
+ let tempOption = this.fixedValueData[index+1];
+ this.$set(this.fixedValueData, index + 1, this.fixedValueData[index]);
+ this.$set(this.fixedValueData, index, tempOption)
+ }else {
+ for(let i=index+1; i<this.fixedValueData.length-1; i++){
+ //console.log(this.fixedValueData[i].orderNum);
+ this.fixedValueData[i].orderNum = this.fixedValueData[i].orderNum-1;
+ //console.log(this.fixedValueData[i].orderNum);
+ }
+ this.$delete(this.fixedValueData, index);
+ }
//console.log(this.fixedValueData);
- }else if(condition == 'down'){
- //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
- this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum+1
- this.fixedValueData[index+1].orderNum = this.fixedValueData[index].orderNum-1
- //璋冩暣鏁扮粍鍊奸『搴�
- let tempOption = this.fixedValueData[index+1];
- this.$set(this.fixedValueData, index + 1, this.fixedValueData[index]);
- this.$set(this.fixedValueData, index, tempOption)
- }else {
- for(let i=index+1; i<this.fixedValueData.length-1; i++){
- //console.log(this.fixedValueData[i].orderNum);
- this.fixedValueData[i].orderNum = this.fixedValueData[i].orderNum-1;
- //console.log(this.fixedValueData[i].orderNum);
+ },
+ //瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
+ codeClassifyValueOpetion(condition){
+ //姝ゅ娑夊強鍒版繁娴呮嫹璐濋棶棰橈紝浣嗘槸鎵ц涓婁笅绉讳繚瀛樻搷浣滀箣鍚庝細閲嶆柊鍔犺浇treedata锛屾墍浠ュ奖鍝嶄笉澶�
+ let currentTreeList = this.getCodeClassifyValueTreeData();
+ let saveData = [];
+ console.log(currentTreeList.treeList);
+ if(condition == 'up'){
+ if(currentTreeList.index-1>=0){
+ // 璋冩暣椤哄簭
+ saveData[0] = currentTreeList.treeList[currentTreeList.index].attributes;
+ saveData[1] = currentTreeList.treeList[currentTreeList.index-1].attributes;
+ saveData[0].orderNum = parseInt(saveData[0].orderNum)-1;
+ saveData[1].orderNum = parseInt(saveData[1].orderNum)+1;
+ this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
+ }
+ }else{
+ if(currentTreeList.index+1<currentTreeList.treeList.length){
+ // 璋冩暣椤哄簭
+ saveData[0] = currentTreeList.treeList[currentTreeList.index].attributes;
+ saveData[1] = currentTreeList.treeList[currentTreeList.index+1].attributes;
+ saveData[0].orderNum = parseInt(saveData[0].orderNum)+1;
+ saveData[1].orderNum = parseInt(saveData[1].orderNum)-1;
+ this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
+ }
}
- this.$delete(this.fixedValueData, index);
- }
- //console.log(this.fixedValueData);
- },
- //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑鎿嶄綔
- saveCodeFixedValueOption(){
- let data = {
- "codeFixedSecOid": this.codefixedsecOrCodeclassifysecOid,
- "dtoList": JSON.stringify(this.fixedValueData),
- }
- saveOrder(data).then(() => {
- this.$message({
- type: "success",
- message: "淇濆瓨鎴愬姛!"
+ console.log(saveData);
+ console.log(this.classifyValueTreeData);
+ },
+ //閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣
+ getCodeClassifyValueTreeData(){
+ const currentNodeTreeData = this.selectedFixedOrCodeclassifyValue;
+ /**鑰冭檻鍑犵鎯呭喌锛岀涓�绉嶅綋鍓嶄笂绉粅涓嬬Щ鎿嶄綔宸茬粡鏄竟鐣岋紝
+ 涓嶉渶瑕佽鍋氬鐞嗭紝绗簩绉嶅綋鍓嶄负鏍戞牴鑺傜偣锛岀涓夌褰撳墠涓哄彾瀛愯妭鐐�
+ */
+ //璇存槑鏄牴鑺傜偣锛岀洿鎺ユ壘鍐嶅垽鏂槸鍚︽槸杈圭晫鍊�
+ if(currentNodeTreeData.parentId.trim() == ''){
+ return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true);
+ }else{
+ //璇存槑涓嶆槸鏍硅妭鐐�,鍏堟壘鍒扮埗鑺傜偣鍐嶆壘鍒板瓙鑺傜偣,鍒ゆ柇鏄惁鏄竟鐣屽��
+ return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false);
+ }
+ },
+ /**
+ * 鎵惧墠涓�涓拰鍚庝竴涓厓绱�
+ * @treeList 鏌ユ壘鐨勬暟缁�
+ * @conditionOid 鐢ㄦ潵鏌ユ壘鍒ゆ柇鐨勬潯浠�
+ * @isTreeRoot 鏄惁鐖惰妭鐐�
+ * @rreturn 杩斿洖鐩搁偦鐨勮妭鐐�
+ */
+ findTreeIndex(treeList,conditionOid,isTreeRoot){
+ for(let index=0;index<treeList.length;index++){
+ if(treeList[index].oid==conditionOid){
+ if(isTreeRoot){
+ let resData = {
+ "index":index,
+ "treeList":treeList,
+ }
+ return resData;
+ }else{
+ return this.findTreeIndex(this.classifyValueTreeData[index].children,this.selectedFixedOrCodeclassifyValue.oid,true);
+ }
+ }
+ }
+ },
+ //涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨
+ saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
+ //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
+ if(condition == "fixedValue"){
+ let data = {
+ "codeFixedSecOid": this.codefixedsecOrCodeclassifysecOid,
+ "dtoList": JSON.stringify(this.fixedValueData),
+ }
+ saveOrder(data).then(() => {
+ //鎵ц瀹屼繚瀛樹箣鍚庡皢褰撳墠閫変腑鐨勫璞℃竻绌�
+ this.selectedFixedOrCodeclassifyValue = '';
+ this.$message({
+ type: "success",
+ message: "淇濆瓨鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ }else {
+ //淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
+ saveCodeClassifyValueOrder({
+ "codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid,
+ "dtoList": JSON.stringify(editOrderNumdata),
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "淇濆瓨鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
+ }
+
+ },
+ //鍒嗙被鐮佸�兼爲data鍔犺浇
+ loadClassifyValueData(row){
+ //console.log(row);
+ let condtionData = {
+ "queryAllLevel": true,
+ "loadType": "all",
+ "multipleSelect": false,
+ "isMuti": false,
+ "isQueryAllColumn": true,
+ 'conditionMap[codeclassifysecoid]':row.oid,
+ };
+ treeCodeClassifyValue(condtionData).then( res=> {
+ this.classifyValueTreeData = res.data;
+ //console.log(res.data);
});
- }, error => {
- window.console.log(error);
- });
- },
+ },
+ //鍒嗙被鐮佸�兼爲鍗曞嚮鏃惰Е鍙戠殑浜嬩欢
+ classisyValueTreeOnodeClick(node){
+ //console.log(node);
+ this.selectedFixedOrCodeclassifyValue = node;
+ this.codeClassifyForm.codeClassifySecOid = node.attributes.codeClassifySecOid;
+ this.codeClassifyForm.id = node.attributes.id;
+ this.codeClassifyForm.name = node.attributes.name;
+ this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid;
+ //console.log(this.codeClassifyForm);
+ },
- /** 鍩虹鐮佹鐩稿叧鏂规硶 */
- //闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌轰箣鍚庡垵濮嬪寲form琛ㄥ崟
- clearBasicAddForm(){
- this.form = '';
- this.form = {
- secType:'codefixedsec'
- };
- this.changeSectypeFormItems(null);
- },
- // 鎵撳紑鏂板绐楀彛
- addBasicCodeSec(){
- if(!this.tipsMessage(this.selectionList)){
- return;
- }
- if(this.selectionList[0].lcStatus != 'Editing'){
- this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽缂栬緫鐮佹!');
- return;
- }
- this.openBasicDialog('add',null);
- this.loadCodeSecType();
- },
- //鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
- openBasicDialog(condition,row){
- //console.log(row);
- if(condition == 'add') {
- this.basicSecDialogTitle = '娣诲姞鐮佹淇℃伅';
- this.showbtn = true;
- this.basicSecOnlyRead = false;
- }else if(condition == 'edit'){
- if(this.selectionList.length!=1){
- this.$message.warning('璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!');
+ /** 鍩虹鐮佹鐩稿叧鏂规硶 */
+ //闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��
+ clearBasicAddForm(){
+ this.form = this.$options.data().form;;
+ // this.changeSectypeFormItems(null);
+ },
+ // 鎵撳紑鏂板绐楀彛
+ addBasicCodeSec(){
+ if(!this.tipsMessage(this.selectionList)){
return;
}
- this.basicSecDialogTitle = '淇敼鐮佹淇℃伅';
- this.showbtn = true;
- this.basicSecOnlyRead = false;
- //涓篺orm缁戝畾鍊�
- this.changeSectypeFormItems(row);
- }else{
- this.basicSecDialogTitle = '鏌ョ湅鐮佹淇℃伅';
- this.showbtn = false;
- this.basicSecOnlyRead = true;
- this.changeSectypeFormItems(row);
- }
- //console.log(this.form);
- this.addBasicCodeSettingBox = true;
- },
- // 鏂板鍩虹鐮佹
- saveOrEditBasicCode(){
- if(this.selectionList[0].oid == null || this.selectionList[0].oid == ''){
- this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庨噸璇�!');
- return;
- }
- this.form.pkCodeRule = this.selectionList[0].oid;
- //console.log(this.form);
- if(this.form.oid == '' || this.form.oid == null){
- addSave(this.form).then(() => {
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
+ if(this.selectionList[0].lcStatus != 'Editing'){
+ this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽缂栬緫鐮佹!');
+ return;
+ }
+ this.openBasicDialog('add',null);
+ this.loadCodeSecType();
+ },
+ //鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
+ openBasicDialog(condition,row){
+ //console.log(row);
+ if(condition == 'add') {
+ this.basicSecDialogTitle = '娣诲姞鐮佹淇℃伅';
+ this.showbtn = true;
+ this.basicSecOnlyRead = false;
+ }else if(condition == 'edit'){
+ if(this.selectionList.length!=1){
+ this.$message.warning('璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!');
+ return;
+ }
+ this.basicSecDialogTitle = '淇敼鐮佹淇℃伅';
+ this.showbtn = true;
+ this.basicSecOnlyRead = false;
+ //涓篺orm缁戝畾鍊�
+ }else{
+ this.basicSecDialogTitle = '鏌ョ湅鐮佹淇℃伅';
+ this.showbtn = false;
+ this.basicSecOnlyRead = true;
+ }
+ //console.log(this.form);
+ this.changeSectypeFormItems(condition == 'add' ? null:row);
+ this.addBasicCodeSettingBox = true;
+ },
+ // 鏂板鍩虹鐮佹
+ saveOrEditBasicCode(){
+ if(this.selectionList[0].oid == null || this.selectionList[0].oid == ''){
+ this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庡啀璇�!');
+ return;
+ }
+ this.form.pkCodeRule = this.selectionList[0].oid;
+ if(this.form.oid == '' || this.form.oid == null){
+ if(this.checkForm()){
+ addSave(this.form).then(() => {
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ // 鍏抽棴瀵硅瘽妗�
+ this.addBasicCodeSettingBox = false
+ }
+
+ }else{
+ editSave(this.form).then(() => {
+ // 鍏抽棴瀵硅瘽妗�
+ this.addBasicCodeSettingBox = false
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
});
- }, error => {
- window.console.log(error);
- });
- }else{
- editSave(this.form).then(() => {
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- }, error => {
- window.console.log(error);
- });
- }
-
- // 鍏抽棴绐楀彛
- this.addBasicCodeSettingBox = false
- // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
- this.loadBasic(this.selectionList[0]);
- },
- // 鍒ゆ柇鏁版嵁鏄惁閫夋嫨浠ュ強鍙兘閫夋嫨鍗曟潯鏁版嵁
- tipsMessage(list){
- if(list.length != 1){
- this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!");
- return false;
- }
- return true;
- },
- // 鍩虹鐮佹鍒犻櫎
- deleteBasicCode(){
- if(!this.tipsMessage(this.selectionBasicList)){
- return;
- }
- let oid = this.selectionBasicList[0].oid;
- this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- let ts = new Date(this.selectionBasicList[0].ts).getTime();
- return deleteData({"oid": oid,"ts": ts});
- })
- .then(() => {
- this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- this.$refs.crudBasic.toggleSelection();
- });
- },
- // 鐐瑰嚮瑙﹀彂鍔犺浇鍩虹鐮佹淇℃伅
- loadBasic(row){
- this.loadingBasic = true;
- //console.log(row.oid);
- //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
- this.currentCodeRuleOid = row.oid;
- this.currentRuleLcStatus = row.lcStatus;
- gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
- const data = res.data.data;
- this.basicData = data.records;
- //console.log(this.basicData);
- this.loadingBasic = false;
- });
- },
- // 鍩虹鐮佹閫変腑鏃惰Е鍙�
- selectionBasicChange(list) {
- this.selectionBasicList = list;
- //console.log(this.selectionBasicList);
- },
- // 涓婄Щ涓嬬Щ鍩虹鐮佹
- upOrderNum(row){
- //console.log(row.oid);
- if(!this.tipsMessage(this.selectionList)){
- return;
- }
- let codeRuleOid = this.selectionList[0].oid;
- if (this.selectionList[0].lcStatus != 'Editing') {
- this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
- return;
- }
- if(row.oid==null || row.oid==''){
- this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
- return;
- }
- upOrderNum(row.oid).then(() => {
- this.loadBasic({"oid":codeRuleOid});
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- })
- },
- downOrderNum(row){
- //console.log(row.oid);
- if(!this.tipsMessage(this.selectionList)){
- return;
- }
- let codeRuleOid = this.selectionList[0].oid;
- //console.log(this.selectionList);
- if (this.selectionList[0].lcStatus != 'Editing') {
- this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
- return;
- }
- if(row.oid==null || row.oid==''){
- this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
- return;
- }
- downOrderNum(row.oid).then(() => {
- this.loadBasic({"oid":codeRuleOid});
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- })
- },
- //鍩虹鐮佹鏌ヨ
- refreshChangeBasicSec(){
- this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
- },
-
-
- /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
- // 鏌ヨ浣跨敤鑼冨洿
- handleRange(){
- if(!this.tipsMessage(this.selectionList)){
- return;
- }
- this.codeRangeSettingBox = true;
- this.getRangeCodeList()
- },
- //鍔犺浇浣跨敤鑼冨洿鍒楄〃
- getRangeCodeList(){
- this.dialogLoading = true;
- if(this.selectionList[0].oid==null){
- this.$message.error("鏈幏鍙栧埌鍙傛暟!");
- }
-
- listUseRange(this.selectionList[0].oid).then(res => {
- this.useRangeData = res.data.data;
- //console.log(this.useRangeData);
- this.dialogLoading = false;
- });
- },
- //鍒锋柊浣跨敤鑼冨洿鍒楄〃
- refreshUseRangeChange(){
- this.getRangeCodeList();
- },
- //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
- codeRuleRowClick (row) {
- //console.log(row);
- this.$refs.crud.toggleRowSelection(row);
- this.loadBasic(row);
- },
- // 鍚敤涓庡仠鐢�
- enableOrDeactivatse(oId,update){
- updateStatus({"oid":oId,"ts":new Date().getTime,"update":update}).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- }, error => {
- window.console.log(error);
- });
- },
- // 鍏嬮殕
- cloneCodeSetting() {
- if (this.selectionList.length === 0) {
- this.$message.warning("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�!");
- return;
- }
- if (this.selectionList.length > 1) {
- this.$message.warning("姣忔鍙兘閫夋嫨涓�鏉℃暟鎹�!");
- return;
- }
- localStorage.setItem("cloneOid",this.selectionList[0].oid)
- this.cloneSettingBox = true;
- },
- // 娣诲姞
- rowSave(row, done, loading) {
- add(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- done();
- }, error => {
- loading();
- window.console.log(error);
- });
- },
- openEdit(row){
- this.$refs.crud.rowEdit(row,row.$index);
- },
- // 淇敼
- rowUpdate(row, index, done, loading) {
- row.ts = new Date().getTime;
- update(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
- done();
- }, error => {
- loading();
- console.log(error);
- });
- },
- // 鍒犻櫎
- handleDelete() {
- if(!this.tipsMessage(this.selectionList)){
- return;
- }
- this.$confirm("纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- // 鍙敮鎸佹瘡娆″崟鏉¤褰曞垹闄�
- let oid = this.selectionList[0].oid;
- let ts = new Date(this.selectionList[0].ts).getTime();
- return remove({oid: oid,ts: ts});
+ }
+ // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
+ this.loadBasic(this.selectionList[0]);
+ },
+ // 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�
+ checkForm(){
+ let form = this.form;
+ //console.log(form);
+ const regNumber = /^[0-9]+\.{0,1}[0-9]*$/; //鏁板瓧鎴栧皬鏁版鍒欐牎楠�
+ const tipsMsg = "蹇呭~椤逛笉鑳戒负绌�";
+ if(form.id == ''){
+ this.$message.warning("(鐮佹缂栧彿)"+tipsMsg);
+ this.$refs.id.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.name == ''){
+ this.$message.warning("(鐮佹鍚嶇О)"+tipsMsg);
+ this.$refs.name.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.secType == ''){
+ this.$message.warning("(鐮佹绫诲瀷)"+tipsMsg);
+ this.$refs.secType.$el.querySelector('select').focus();
+ return false;
+ }
+ if(form.secType==='codefixedsec'){
+ //鍥哄畾鐮佹
+ if(form.codeSecLengthType == ''){
+ this.$message.warning("(鐮佹闀垮害绫诲瀷)"+tipsMsg);
+ this.$refs.codeSecLengthType.$el.querySelector('select').focus();
+ return false;
+ }
+ if(form.codeSecLength == ''){
+ this.$message.warning("(鐮佹闀垮害)"+tipsMsg);
+ this.$refs.codeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeSecLength)){
+ this.$message.warning("鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�");
+ this.$refs.codeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codeattrsec'){
+ //灞炴�х爜娈�
+ if(form.referAttributeId == ''){
+ this.$message.warning('(灞炴��)'+tipsMsg);
+ this.$refs.referAttributeId.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codeserialsec'){
+ console.log(form.codeFillType);
+ //娴佹按鐮佹
+ if(form.codeSecLength == ''){
+ this.$message.warning('(鐮佹鐨勯暱搴�)'+tipsMsg);
+ this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeSecLength)){
+ this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+ this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.serialStart)){
+ this.$message.warning('娴佹按鍙风殑璧峰鍊煎繀椤讳负鏁板瓧鍊�');
+ this.$refs.serialStart.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.serialStep)){
+ this.$message.warning('娴佹按鐨勬闀垮繀椤讳负鏁板瓧鍊�');
+ this.$refs.serialStep.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.codeFillType == ''){
+ this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
+ return false;
+ }
+ if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){
+ this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
+ return false;
+ }
+ if(form.codeFillLength == ''){
+ this.$message.warning('濉厖闀垮害涓嶈兘涓虹┖');
+ this.$refs.codeFillLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeFillLength)){
+ this.$message.warning('濉厖闀垮害蹇呴』涓烘暟瀛楀��');
+ this.$refs.codeFillLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.codeFillLimit == ''){
+ this.$message.warning('(娴佹按涓婇檺)'+tipsMsg);
+ this.$refs.codeFillLimit.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeFillLimit)){
+ this.$message.warning('娴佹按涓婇檺蹇呴』涓烘暟瀛楀��');
+ this.$refs.codeFillLimit.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.codeFillFlag == ''){
+ this.$message.warning('(娴佹按鏄惁琛ョ爜)'+tipsMsg);
+ this.$refs.switch.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codelevelsec'){
+ //灞傜骇鐮佹
+ if(form.codeLevelType == ''){
+ this.$message.warning('(灞傜骇绫诲瀷)'+tipsMsg);
+ return false;
+ }
+ if(!regNumber.test(form.codeLevelValue)){
+ this.$message.warning('灞傜骇鐨勫��)鍙兘濉啓鏁板瓧');
+ this.$refs.codeLevelValue.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.valueCutType == ''){
+ this.$message.warning('(瀛楃鎴彇绫诲瀷)'+tipsMsg);
+ this.$refs.valueCutType.$el.querySelector('select').focus();
+ return false;
+ }
+ }else if(this.form.secType==='coderefersec'){
+ //寮曠敤鐮佹
+ if(form.referBtmId == ''){
+ this.$message.warning('(鍙傜収寮曠敤鐨勪笟鍔$被鍨�)'+tipsMsg);
+ this.$refs.referBtmId.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.referConfig == ''){
+ this.$message.warning('(鍙傜収閰嶇疆)'+tipsMsg);
+ this.$refs.referConfig.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codedatesec'){
+ //鏃ユ湡鐮佹
+ if(form.codeDateFormatStr == ''){
+ this.$message.warning('(鏃ユ湡鏍煎紡)'+tipsMsg);
+ this.$refs.codeDateFormatStr.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codeclassifysec'){
+ //鍒嗙被鐮佹
+ if(form.codeSecLengthType == ''){
+ this.$message.warning('(鐮佹闀垮害绫诲瀷)'+tipsMsg);
+ return false;
+ }
+ if(form.codeSecLength == ''){
+ this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
+ this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeSecLength)){
+ this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+ this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ }else if(this.form.secType==='codevariablesec'){
+ //鍙彉鐮佹
+ if(form.codeSecLength == ''){
+ this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
+ this.$refs.varCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(!regNumber.test(form.codeSecLength)){
+ this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+ this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+ return false;
+ }
+ if(form.codeFillType == ''){
+ this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
+ return false;
+ }
+ if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){
+ this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
+ return false;
+ }
+ }
+ return true;
+ },
+ // 鍒ゆ柇鏁版嵁鏄惁閫夋嫨浠ュ強鍙兘閫夋嫨鍗曟潯鏁版嵁
+ tipsMessage(list){
+ if(list.length != 1){
+ this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!");
+ return false;
+ }
+ return true;
+ },
+ // 鍩虹鐮佹鍒犻櫎
+ deleteBasicCode(){
+ if(!this.tipsMessage(this.selectionBasicList)){
+ return;
+ }
+ let oid = this.selectionBasicList[0].oid;
+ this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
})
.then(() => {
+ let ts = new Date(this.selectionBasicList[0].ts).getTime();
+ return deleteData({"oid": oid,"ts": ts});
+ })
+ .then(() => {
+ this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ this.$refs.crudBasic.toggleSelection();
+ });
+ },
+ // 鐐瑰嚮瑙﹀彂鍔犺浇鍩虹鐮佹淇℃伅
+ loadBasic(row){
+ if(this.cloneSettingBox){
+ this.cloneTableLoading = true;
+ }else{
+ this.loadingBasic = true;
+ }
+ // console.log(row.oid);
+ //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
+ this.currentCodeRuleOid = row.oid;
+ this.currentRuleLcStatus = row.lcStatus;
+ gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
+ const data = res.data.data;
+ // console.log(data);
+ if(this.cloneSettingBox){
+ this.cloneData = data.records;
+ // console.log(tihs.cloneData);
+ this.cloneTableLoading = false;
+ }else {
+ this.basicData = data.records;
+ // console.log(this.basicData);
+ this.loadingBasic = false;
+ }
+ });
+ },
+ // 鍩虹鐮佹閫変腑鏃惰Е鍙�
+ selectionBasicChange(list) {
+ this.selectionBasicList = list;
+ //console.log(this.selectionBasicList);
+ },
+ // 涓婄Щ涓嬬Щ鍩虹鐮佹
+ upOrderNum(row){
+ //console.log(row.oid);
+ if(!this.tipsMessage(this.selectionList)){
+ return;
+ }
+ let codeRuleOid = this.selectionList[0].oid;
+ if (this.selectionList[0].lcStatus != 'Editing') {
+ this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
+ return;
+ }
+ if(row.oid==null || row.oid==''){
+ this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
+ return;
+ }
+ upOrderNum(row.oid).then(() => {
+ this.loadBasic({"oid":codeRuleOid});
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ })
+ },
+ downOrderNum(row){
+ //console.log(row.oid);
+ if(!this.tipsMessage(this.selectionList)){
+ return;
+ }
+ let codeRuleOid = this.selectionList[0].oid;
+ //console.log(this.selectionList);
+ if (this.selectionList[0].lcStatus != 'Editing') {
+ this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
+ return;
+ }
+ if(row.oid==null || row.oid==''){
+ this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
+ return;
+ }
+ downOrderNum(row.oid).then(() => {
+ this.loadBasic({"oid":codeRuleOid});
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ })
+ },
+ //鍩虹鐮佹鏌ヨ
+ refreshChangeBasicSec(){
+ this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
+ },
+
+
+ /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
+ // 鏌ヨ浣跨敤鑼冨洿
+ handleRange(){
+ if(!this.tipsMessage(this.selectionList)){
+ return;
+ }
+ this.codeRangeSettingBox = true;
+ this.getRangeCodeList()
+ },
+ //鍔犺浇浣跨敤鑼冨洿鍒楄〃
+ getRangeCodeList(){
+ this.dialogLoading = true;
+ if(this.selectionList[0].oid==null){
+ this.$message.error("鏈幏鍙栧埌鍙傛暟!");
+ }
+
+ listUseRange(this.selectionList[0].oid).then(res => {
+ this.useRangeData = res.data.data;
+ //console.log(this.useRangeData);
+ this.dialogLoading = false;
+ });
+ },
+ //鍒锋柊浣跨敤鑼冨洿鍒楄〃
+ refreshUseRangeChange(){
+ this.getRangeCodeList();
+ },
+ //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+ codeRuleRowClick (row) {
+ this.$refs.crud.toggleSelection();
+ this.selectionList = row;
+ this.$refs.crud.setCurrentRow(row);
+ //this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ this.loadBasic(row);
+ },
+ // 鍚敤涓庡仠鐢�
+ enableOrDeactivatse(oId,update){
+ updateStatus({"oid":oId,"ts":new Date().getTime,"update":update}).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "鎿嶄綔鎴愬姛!"
});
- this.$refs.crud.toggleSelection();
+ }, error => {
+ window.console.log(error);
});
- },
- // 鎵撳紑淇敼
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.ruleForm.oid).then(res => {
- this.ruleForm = res.data.data;
+ },
+ // 鎵撳紑缂栫爜瑙勫垯鍏嬮殕瀵硅瘽妗�
+ openCodeRuleDialog() {
+ if (!this.tipsMessage(this.selectionList)) {
+ return;
+ }
+ this.cloneSettingBox = true;
+ this.cloneCodeRuleForm.id = this.selectionList[0].id;
+ this.cloneCodeRuleForm.name = this.selectionList[0].name;
+ this.cloneCodeRuleForm.description = this.selectionList[0].description;
+ this.loadBasic({"oid": this.selectionList[0].oid});
+ },
+ // 鍏嬮殕缂栫爜瑙勫垯淇濆瓨鍔熻兘
+ saveCloneCodeRule(){
+ let form = this.cloneCodeRuleForm;
+ if(form.id.trim()==''){
+ this.$message.warning("缂栧彿涓嶈兘涓虹┖!");
+ return;
+ }
+ if(form.name.trim()==''){
+ this.$message.warning("鐮佸�间笉鑳戒负绌�!");
+ return;
+ }
+ this.selectionList[0].oid = '';
+ this.selectionList[0].id = form.id;
+ this.selectionList[0].name = form.name;
+ this.selectionList[0].description = form.description;
+ this.selectionList[0].createTime = new Date().getTime();
+ this.selectionList[0].ts = new Date(this.selectionList[0].ts).getTime();
+ this.selectionList[0].lcStatus = 'Editing';
+ let data = Object.assign({}, this.selectionList[0],{elements:this.cloneData});
+ clone(data).then(() => {
+ this.cloneSettingBox = false;
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
});
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
- selectionChange(list) {
- this.selectionList = list;
- this.$refs.crud.setCurrentRow(this.selectionList [list.length-1]);
- if(this.selectionList.length > 0){
- this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
- this.currentRuleLcStatus = this.selectionList [list.length-1].lcStatus;
- //console.log(this.currentRuleLcStatus);
- this.loadBasic(this.selectionList[list.length-1]);
- }
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- //console.log(res.data);
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.loadBasic(this.data[0])
- this.$nextTick(() => {
- this.$refs.crud.toggleRowSelection(this.data[0]);
- this.$refs.crud.setCurrentRow(this.data[0]);
+ //console.log(data);
+ },
+ // 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�
+ openOtherCodeRuleDialog(){
+ if (!this.tipsMessage(this.selectionList)) {
+ return;
+ }
+ if(this.selectionList[0].lcStatus != 'Editing'){
+ this.$message.warning("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�!");
+ return;
+ }
+ this.cloneOtherCodeRuleSettingBox = true;
+ },
+ //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+ codeOtherCloneRuleRowClick (row) {
+ this.loadBasic(row);
+ },
+ // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
+ selectionOtherCloneCodeRuleChange(list) {
+ //console.log(list);
+ this.selectionOtherCloneCodeRuleList = list;
+ if(this.selectionOtherCloneCodeRuleList.length > 0){
+ this.loadBasic(this.selectionOtherCloneCodeRuleList[list.length-1]);
+ }
+ },
+ selectionOtherCloneCodeBasicChange(list){
+ this.selectionOtherCloneCodeBasicList = list;
+ },
+ // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅
+ saveOtherCodeBasic(){
+ let oid = this.selectionList[0].oid;
+ let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
+ if(fromDialogPkCodebasic.length < 0){
+ this.$message.warning("璇烽�夋嫨鐮佹鏁版嵁!");
+ return;
+ }
+ let res = fromDialogPkCodebasic.filter((item) => {
+ return item.pkCodeRule == oid;
+ });
+ if(res != ''){
+ this.$message.warning("闇�瑕佸厠闅嗙殑缂栫爜瑙勫垯涓庤鍏嬮殕鐨勭紪鐮佽鍒欑浉鍚�!");
+ return;
+ }
+ //console.log(res);
+ let oidArr = '';
+ fromDialogPkCodebasic.forEach((item) =>{
+ oidArr = oidArr+","+item.oid;
})
- this.selectionList = data.records[0];
- //this.selectionClear();
- });
- },
+ let data = {
+ "pkCodeRule": oid,
+ "oidArr": oidArr,
+ }
+ //console.log(data);
+ cloneCodeBasic(data).then(() => {
+ this.cloneOtherCodeRuleSettingBox = false;
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ }, error => {
+ window.console.log(error);
+ });
+ },
+ // 娓呯┖鐮佸��
+ clearAllCodeSec(){
+ if(this.selectionList.length == 0){
+ this.$message.warning("娌℃湁閫夋嫨鏁版嵁!");
+ return;
+ }
+ if(this.selectionList.length != 1){
+ this.$message.warning("姣忔鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ return;
+ }
+ let currentData = this.selectionList[0];
+ this.$confirm("纭畾瑕佹竻绌虹爜鍊硷紵濡傛灉娓呯┖灏嗕笉鑳借鎭㈠锛岃璋ㄦ厧锛�", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ let ts = new Date(currentData.ts).getTime();
+ return clearAllCode({"oid": currentData.oid,"ts": ts});
+ })
+ .then(() => {
+ this. this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ });
+ },
+
+ // 娣诲姞
+ rowSave(row, done, loading) {
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ done();
+ }, error => {
+ loading();
+ window.console.log(error);
+ });
+ },
+ openEdit(row){
+ this.$refs.crud.rowEdit(row,row.$index);
+ },
+ // 淇敼
+ rowUpdate(row, index, done, loading) {
+ row.ts = new Date().getTime;
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ done();
+ }, error => {
+ loading();
+ console.log(error);
+ });
+ },
+ // 鍒犻櫎
+ handleDelete() {
+ if(!this.tipsMessage(this.selectionList)){
+ return;
+ }
+ this.$confirm("纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ // 鍙敮鎸佹瘡娆″崟鏉¤褰曞垹闄�
+ let oid = this.selectionList[0].oid;
+ let ts = new Date(this.selectionList[0].ts).getTime();
+ return remove({oid: oid,ts: ts});
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ // 鎵撳紑淇敼
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.ruleForm.oid).then(res => {
+ this.ruleForm = res.data.data;
+ });
+ }
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
+ selectionChange(list) {
+ this.selectionList = list;
+ //console.log("selectionChange====="+list);
+ this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
+ if(this.selectionList.length > 0){
+ this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
+ this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
+ //console.log(this.currentRuleLcStatus);
+ this.loadBasic(this.selectionList[list.length-1]);
+ }
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage){
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize){
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ //console.log(res.data);
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.loadBasic(this.data[0])
+ this.$nextTick(() => {
+ //this.$refs.crud.toggleRowSelection(this.data[0]);
+ this.$refs.crud.setCurrentRow(this.data[0]);
+ })
+ this.selectionList = data.records[0];
+ //this.selectionClear();
+ });
+ },
- /** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
- // 鎵撳紑浜屽眰寮圭獥鏂规硶
- openAttrSelectOrGetValue(condition){
- if(condition === 'attr'){
- this.isShowSelectAttrOption = true;
- }else if(condition === 'value'){
- this.isShowformulaEdit = true;
- }else if(condition === 'parentClassifySecOid'){
- this.isShowParentClassifyOption = true;
- }else if(condition === 'referBtmId'){
- this.isShowSelectReferBtmOption = true;
- }else if(condition === 'referConfig'){
- //this.$emit('openSelectreferConfig')
- }
- },
+ /** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
+ // 鎵撳紑浜屽眰寮圭獥鏂规硶
+ openAttrSelectOrGetValue(condition){
+ if(condition === 'attr'){
+ this.isShowSelectAttrOption = true;
+ }else if(condition === 'value'){
+ //鎵撳紑鍏紡缂栬緫妗嗭紝绗簩灞傚祵濂楀璇濇
+ this.$refs.formulaEditor.isShowformulaEdit = true;
+ }else if(condition === 'parentClassifySecOid'){
+ this.isShowParentClassifyOption = true;
+ }else if(condition === 'referBtmId'){
+ this.isShowSelectReferBtmOption = true;
+ }else if(condition === 'referConfig'){
+ //this.$emit('openSelectreferConfig')
+ }
+ },
- // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
- clearAttrDataByIcon(condition){
- if(condition === 'attr'){
- this.form.referAttributeName = '';
- this.form.referAttributeId = '';
- this.form.referCodeClassifyOid = '';
- this.form.referCodeClassifyOidName = '';
- }else if(condition === 'value'){
- this.form.getValueClass = '';
- }else if(condition === 'parentClassifySecOid'){
- this.form.parentClassifySecOid = '';
- }else if(condition === 'referBtmId'){
- this.form.referBtmId = '';
- }else if(condition === 'referConfig'){
- this.form.referBtmId = '';
- }
- },
-
- // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
- changeSectypeFormItems(row){
- console.log(row);
- if(this.sectypeList.length==0){
- this.loadCodeSecType();
- }
- if(row != null){
- this.form = {};
- this.form = Object.assign({},this.form,{
+ // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
+ clearAttrDataByIcon(condition){
+ if(condition === 'attr'){
+ this.form.referAttributeName = '';
+ this.form.referAttributeId = '';
+ this.form.referCodeClassifyOid = '';
+ this.form.referCodeClassifyOidName = '';
+ }else if(condition === 'value'){
+ this.form.getValueClass = '';
+ }else if(condition === 'parentClassifySecOid'){
+ this.form.parentClassifySecOid = '';
+ }else if(condition === 'referBtmId'){
+ this.form.referBtmId = '';
+ }else if(condition === 'referConfig'){
+ this.form.referBtmId = '';
+ }
+ },
+ // 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
+ inputSelectBlur(e){
+ if (e.target.value) {
+ this.form.codeFillSeparatorSelect = e.target.value;
+ }
+ },
+ // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
+ changeSectypeFormItems(row){
+ //console.log(row);
+ if(this.sectypeList.length==0){
+ this.loadCodeSecType();
+ }
+ if(row != null){
+ this.form = {
oid: row.oid,
id: row.id, //缂栧彿,
name: row.name,//鍚嶇О
@@ -2275,156 +2333,199 @@
componentCodeFlag: row.componentCodeFlag=='true' ? true:false,//鏄惁鍙備笌缂栫爜
pkCodeRule: row.pkCodeRule, //鎵�灞炵紪鐮佽鍒�
}
- );
- }else {
- this.form = {
- oid: this.form.oid,
- id: this.form.id, //缂栧彿
- name: this.form.name, //鍚嶇О
- secType: this.form.secType, //鐮佹绫诲瀷
- description: this.form.description, //鎻忚堪
- serialDependFlag: this.form.serialDependFlag, //鏄惁娴佹按渚濊禆
- serialDependOrder: this.form.serialDependOrder, //娴佹按渚濊禆椤哄簭
- nullableFlag: this.form.nullableFlag, //鏄惁涓虹┖
- displayFlag: this.form.displayFlag, //
- componentCodeFlag: this.form.componentCodeFlag, //鏄惁鍙備笌缂栫爜
- pkCodeRule: this.form.pkCodeRule, //鎵�灞炵紪鐮佽鍒�
- };
- //console.log(this.form);
- }
- if(this.form.secType==='codefixedsec'){
- //鍥哄畾鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',
- codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable'
- });
+ }else {
+ this.form = {
+ id: this.form.id, //缂栧彿
+ name: this.form.name, //鍚嶇О
+ secType: this.form.secType, //鐮佹绫诲瀷
+ description: this.form.description, //鎻忚堪
+ serialDependFlag: this.form.serialDependFlag, //鏄惁娴佹按渚濊禆
+ serialDependOrder: this.form.serialDependOrder, //娴佹按渚濊禆椤哄簭
+ nullableFlag: this.form.nullableFlag, //鏄惁涓虹┖
+ displayFlag: this.form.displayFlag, //
+ componentCodeFlag: this.form.componentCodeFlag, //鏄惁鍙備笌缂栫爜
+ pkCodeRule: this.form.pkCodeRule, //鎵�灞炵紪鐮佽鍒�
+ };
+ //console.log(this.form);
+ }
+ if(this.form.secType==='codefixedsec'){
+ //鍥哄畾鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',
+ codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable'
+ });
+ this.loadCodeSecLength();
+ }else if(this.form.secType==='codeattrsec'){
+ //灞炴�х爜娈�
+ this.form = Object.assign({}, this.form, {
+ referCodeClassifyOid: row!=null&&row.referCodeClassifyOid != '' ? row.referCodeClassifyOid:'', //灞炴�d
+ referCodeClassifyOidName: row!=null&&row.referCodeClassifyOidName != '' ? row.referCodeClassifyOidName:'', //灞炴�ф墍鍦ㄥ垎绫�
+ referAttributeId: row!=null&&row.referAttributeId != '' ? row.referAttributeId:'', //灞炴�х紪鍙�
+ referAttributeName: row!=null&&row.referAttributeName != '' ? row.referAttributeName:'', //灞炴��
+ getValueClass: row!=null&&row.getValueClass != '' ? row.getValueClass:'' //鍙栧�艰鍒�
+ });
+ }else if(this.form.secType==='codeserialsec'){
+ //娴佹按鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
+ serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1, //娴佹按鍙疯捣濮嬪��
+ serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1, //娴佹按鐨勬闀�
+ codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜琛ヤ綅鏂瑰紡
+ codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
+ codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0, //琛ヤ綅鏃剁殑瀛楃
+ codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'', //濉厖闀垮害
+ codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'', //娴佹按涓婇檺
+ codeFillFlag: row!=null&&row.codeFillFlag != '' ? row.codeFillFlag=='true' ? true:false :false, //娴佹按鏄惁琛ョ爜
+ customCodeSerialClass: row!=null&&row.customCodeSerialClass != '' ? row.customCodeSerialClass:'', //鑷畾涔夋祦姘寸畻娉�
+ });
+ this.loadCodeFillType();
+ this.loadCodeFillSeparator();
+ }else if(this.form.secType==='codelevelsec'){
+ //灞傜骇鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeLevelType: row!=null&&row.codeLevelType != '' ? row.codeLevelType:'code_level_min', //灞傜骇绫诲瀷 鏋氫妇鏌ヨ
+ codeLevelValue: row!=null&&row.codeLevelValue != '' ? row.codeLevelValue:'', //灞傜骇鐨勫��
+ valueCutType: row!=null&&row.valueCutType != '' ? row.valueCutType:'code_cut_none', //瀛楃鎴彇绫诲瀷 鏋氫妇鏌ヨ
+ valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'', //
+ codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up', //鍙栧�肩被鍨� 鏋氫妇鏌ヨ
+ });
+ this.loadCodeLevelType();
+ this.loadCodeCutType();
+ this.loadCodeGetValueType();
+ }else if(this.form.secType==='coderefersec'){
+ //寮曠敤鐮佹
+ this.form = Object.assign({}, this.form,{
+ referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
+ referBtmName: row!=null&&row.referBtmName != '' ? row.referBtmName:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨�
+ referConfig: row!=null&&row.referConfig != '' ? row.referConfig:'', //鍙傜収閰嶇疆
+ });
+ }else if(this.form.secType==='codedatesec'){
+ //鏃ユ湡鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeDateFormatStr: row!=null&&row.codeDateFormatStr != '' ? row.codeDateFormatStr:'', //鏃ユ湡鏍煎紡
+ });
+ }else if(this.form.secType==='codeclassifysec'){
+ //console.log(this.form);
+ //鍒嗙被鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable', //鐮佹闀垮害绫诲瀷
+ codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
+ matchClassifyValueFlag: row!=null&&row.matchClassifyValueFlag != '' ? row.matchClassifyValueFlag=='true' ? true:false :false, //鏄惁鑷姩鍖归厤鍊�
+ parentClassifySecOid: row!=null&&row.parentClassifySecOid != '' ? row.parentClassifySecOid:'', //鐖跺垎绫荤爜娈甸�変腑鐨刬d
+ parentClassifySecText: row!=null&&row.parentClassifySecText != '' ? row.parentClassifySecText:'', //鐖跺垎绫荤爜娈�
+ });
+ this.loadCodeSecLength();
+ }else if(this.form.secType==='codevariablesec'){
+ //鍙彉鐮佹
+ this.form = Object.assign({}, this.form,{
+ codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
+ codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇�
+ codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣
+ codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
+ });
+ this.loadCodeFillType();
+ this.loadCodeFillSeparator();
+ }
+ // console.log(this.form);
+ },
+ //鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
+ loadCodeSecType(){
+ getDictionary({code: "codeBasicSecType"}).then(res=>{
+ this.sectypeList = res.data.data;
+ })
this.loadCodeSecLength();
- }else if(this.form.secType==='codeattrsec'){
- //灞炴�х爜娈�
- this.form = Object.assign({}, this.form, {
- referCodeClassifyOid: row!=null&&row.referCodeClassifyOid != '' ? row.referCodeClassifyOid:'', //灞炴�d
- referCodeClassifyOidName: row!=null&&row.referCodeClassifyOidName != '' ? row.referCodeClassifyOidName:'', //灞炴�ф墍鍦ㄥ垎绫�
- referAttributeId: row!=null&&row.referAttributeId != '' ? row.referAttributeId:'', //灞炴�х紪鍙�
- referAttributeName: row!=null&&row.referAttributeName != '' ? row.referAttributeName:'', //灞炴��
- getValueClass: row!=null&&row.getValueClass != '' ? row.getValueClass:'' //鍙栧�艰鍒�
- });
- }else if(this.form.secType==='codeserialsec'){
- //娴佹按鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
- serialStart: row!=null&&row.serialStart != '' ? row.serialStart:'1', //娴佹按鍙疯捣濮嬪��
- serialStep: row!=null&&row.serialStep != '' ? row.serialStep:'1', //娴佹按鐨勬闀�
- codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜琛ヤ綅鏂瑰紡
- codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:'0', //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
- codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0', //琛ヤ綅鏃剁殑瀛楃
- codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'', //濉厖闀垮害
- codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'', //娴佹按涓婇檺
- codeFillFlag: row!=null&&row.codeFillFlag != '' ? row.codeFillFlag=='true' ? true:false :false, //娴佹按鏄惁琛ョ爜
- customCodeSerialClass: row!=null&&row.customCodeSerialClass != '' ? row.customCodeSerialClass:'', //鑷畾涔夋祦姘寸畻娉�
- });
- this.loadCodeFillType();
- this.loadCodeFillSeparator();
- }else if(this.form.secType==='codelevelsec'){
- //灞傜骇鐮佹
- this.form = Object.assign({}, this.form,{
- codeLevelType: row!=null&&row.codeLevelType != '' ? row.codeLevelType:'code_level_min', //灞傜骇绫诲瀷 鏋氫妇鏌ヨ
- codeLevelValue: row!=null&&row.codeLevelValue != '' ? row.codeLevelValue:'', //灞傜骇鐨勫��
- valueCutType: row!=null&&row.valueCutType != '' ? row.valueCutType:'code_cut_none', //瀛楃鎴彇绫诲瀷 鏋氫妇鏌ヨ
- valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'', //
- codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up', //鍙栧�肩被鍨� 鏋氫妇鏌ヨ
- });
- this.loadCodeLevelType();
- this.loadCodeCutType();
- this.loadCodeGetValueType();
- }else if(this.form.secType==='coderefersec'){
- //寮曠敤鐮佹
- this.form = Object.assign({}, this.form,{
- referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
- referBtmName: row!=null&&row.referBtmName != '' ? row.referBtmName:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨�
- referConfig: row!=null&&row.referConfig != '' ? row.referConfig:'', //鍙傜収閰嶇疆
- });
- }else if(this.form.secType==='codedatesec'){
- //鏃ユ湡鐮佹
- this.form = Object.assign({}, this.form,{
- codeDateFormatStr: row!=null&&row.codeDateFormatStr != '' ? row.codeDateFormatStr:'', //鏃ユ湡鏍煎紡
- });
- }else if(this.form.secType==='codeclassifysec'){
- //鍒嗙被鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable', //鐮佹闀垮害绫诲瀷
- codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
- matchClassifyValueFlag: row!=null&&row.matchClassifyValueFlag != '' ? row.matchClassifyValueFlag=='true' ? true:false :false, //鏄惁鑷姩鍖归厤鍊�
- parentClassifySecOid: row!=null&&row.parentClassifySecOid != '' ? row.parentClassifySecOid:'', //鐖跺垎绫荤爜娈甸�変腑鐨刬d
- parentClassifySecText: row!=null&&row.parentClassifySecText != '' ? row.parentClassifySecText:'', //鐖跺垎绫荤爜娈�
- });
- this.loadCodeSecLength();
- }else if(this.form.secType==='codevariablesec'){
- //鍙彉鐮佹
- this.form = Object.assign({}, this.form,{
- codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
- codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇�
- codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:'0', //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣
- codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
- });
- this.loadCodeFillType();
- this.loadCodeFillSeparator();
- }
- //console.log(this.form);
- },
- //鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
- loadCodeSecType(){
- getDictionary({code: "codeBasicSecType"}).then(res=>{
- this.sectypeList = res.data.data;
- })
- this.loadCodeSecLength();
- //console.log(this.sectypeList);
- },
- loadCodeSecLength(){
- getDictionary({code: "codeSecLength"}).then(res=>{
- this.codeSecLengthType = res.data.data;
- })
- },
- loadCodeFillType(){
- getDictionary({code: "codeFillType"}).then(res=>{
- this.codeFillType = res.data.data;
- })
- },
- loadCodeFillSeparator(){
- getDictionary({code: "codeFillSeparator"}).then(res=>{
- this.codeFillSeparator = res.data.data;
- })
- },
- loadCodeLevelType(){
- getDictionary({code: "codeLevelType"}).then(res=>{
- this.codeLevelType = res.data.data;
- })
- },
- loadCodeCutType(){
- getDictionary({code: "codeCutType"}).then(res=>{
- this.codeCutType = res.data.data;
- })
- },
- loadCodeGetValueType(){
- getDictionary({code: "codeGetValueType"}).then(res=>{
- this.codeGetValueType = res.data.data;
- //console.log(this.codeGetValueType);
- })
- },
-
-
- }
-};
+ //console.log(this.sectypeList);
+ },
+ loadCodeSecLength(){
+ getDictionary({code: "codeSecLength"}).then(res=>{
+ this.codeSecLengthType = res.data.data;
+ })
+ },
+ loadCodeFillType(){
+ getDictionary({code: "codeFillType"}).then(res=>{
+ this.codeFillType = res.data.data;
+ })
+ },
+ loadCodeFillSeparator(){
+ getDictionary({code: "codeFillSeparator"}).then(res=>{
+ this.codeFillSeparator = res.data.data;
+ })
+ },
+ loadCodeLevelType(){
+ getDictionary({code: "codeLevelType"}).then(res=>{
+ this.codeLevelType = res.data.data;
+ })
+ },
+ loadCodeCutType(){
+ getDictionary({code: "codeCutType"}).then(res=>{
+ this.codeCutType = res.data.data;
+ })
+ },
+ loadCodeGetValueType(){
+ getDictionary({code: "codeGetValueType"}).then(res=>{
+ this.codeGetValueType = res.data.data;
+ //console.log(this.codeGetValueType);
+ })
+ },
+
+ }
+ };
+
</script>
-<style>
+<style scope>
+
+ .code-rule-crud > .avue-crud__search ,.code-basic-crud > .avue-crud__search {
+ margin-bottom: -15px;
+ }
+
+ .code-rule-crud > .avue-crud__pagination {
+ padding: 14px 0 2px 20px;
+ }
+
+
+ .clone-input-textarea > .el-form-item__content {
+ width: 495px;
+ }
+
+ .clone-avue-crud > .el-card> .el-card__body > .avue-crud__menu {
+ display: none!important;
+ }
+
+ .fixed-avue-crud > .el-card> .el-card__body > .avue-crud__menu {
+ display: none!important;
+ }
+
+ .other-clone-codebasic-crud > .el-card> .el-card__body > .avue-crud__menu {
+ display: none!important;
+ }
+
+ .other-clone-coderule-crud > .el-card> .el-card__body > .avue-crud__menu {
+ display: none!important;
+ }
+
+ .el-table--small .el-table__cell {
+ padding: 3px 0;
+ }
+
+ .classify_value_box > .el-scrollbar {
+ height: 95%;
+ }
+
+ .basic-container > .el-card > .el-card__body {
+ margin: -10px 0;
+ }
+ .code-basicsec-container{
+ padding: 1px 6px;
+ }
.el-divider--horizontal {
- margin-top: 19px !important;
- margin-bottom: -20px !important;
- height: 2px;
- margin: 0;
- position: fixed;
- width: 57.5vw;
+ margin-top: 19px !important;
+ margin-bottom: -20px !important;
+ height: 2px;
+ margin: 0;
+ position: fixed;
+ width: 57.5vw;
}
.el-card__body > .abox {
@@ -2446,38 +2547,6 @@
.el-input-number >.el-input > .el-input__inner {
width:120px;
}
-
- .formula-editor{
- margin-top: -15px;
- margin-left: 2vw;
- /*璁剧疆寮规�х洅瀛�*/
- display: flex;
- /*瀛愬厓绱犱互绔栧垪鎺掑垪锛屼竴鍏辨湁6鍒�*/
- flex-direction:column;
- width: 360px;
- height: 285px;
- /*宸﹀彸鍧囧寑鎺掑垪*/
- justify-content: space-around;
- /*涓婁笅鍧囧寑鎺掑垪*/
- align-items: center;
- }
-
- .one{
- display: flex;
- /*浠ヨ鎺掑垪*/
- flex-direction: row;
- width: 296px;
- height: 60px;
- justify-content: space-between;
- align-items: center;
- }
-
- .formula-editor-btn-sm {
- width: 72px;
- height: 45px;
- background: rgb(153, 214, 240);
- border-radius: 10%;
- }
.el-col>.el-card > .el-card__header {
background: rgb(213 231 239);
@@ -2514,4 +2583,5 @@
margin-bottom: 8px;
}
+
</style>
\ No newline at end of file
diff --git a/Source/UBCS/ubcs-common/src/main/java/com/vci/ubcs/common/constant/LauncherConstant.java b/Source/UBCS/ubcs-common/src/main/java/com/vci/ubcs/common/constant/LauncherConstant.java
index 45cdb5a..fa92a46 100644
--- a/Source/UBCS/ubcs-common/src/main/java/com/vci/ubcs/common/constant/LauncherConstant.java
+++ b/Source/UBCS/ubcs-common/src/main/java/com/vci/ubcs/common/constant/LauncherConstant.java
@@ -41,7 +41,7 @@
* nacos dev 鍦板潃
*/
//String NACOS_DEV_ADDR = "dev.vci-tech.com:38848";
- String NACOS_DEV_ADDR = "192.168.93.167:38848";
+ String NACOS_DEV_ADDR = "192.168.93.183:38848";
/**
* nacos prod 鍦板潃
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeClassifyValueDTO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeClassifyValueDTO.java
index 9d106fd..a766e26 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeClassifyValueDTO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeClassifyValueDTO.java
@@ -19,7 +19,7 @@
/**
* 鍒嗙被鐮佹涓婚敭
*/
- private String codeclassifysecoid;
+ private String codeClassifySecOid;
/**
* 鍒嗙被鐮佹涓婚敭鏄剧ず鏂囨湰
@@ -28,26 +28,26 @@
/**
* 鐮佸�煎簭鍙�
*/
- private Integer ordernum;
+ private Integer orderNum;
/**
* 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- private String parentclassifyvalueoid;
+ private String parentClassifyValueOid;
/**
* 鑾峰彇 鍒嗙被鐮佹涓婚敭
*/
- public String getCodeclassifysecoid (){
- return codeclassifysecoid;
+ public String getCodeClassifySecOid (){
+ return codeClassifySecOid;
}
/**
* 璁剧疆 鍒嗙被鐮佹涓婚敭
*/
- public void setCodeclassifysecoid (String codeclassifysecoid){
- this.codeclassifysecoid = codeclassifysecoid;
+ public void setCodeClassifySecOid (String codeClassifySecOid){
+ this.codeClassifySecOid = codeClassifySecOid;
}
/**
@@ -66,39 +66,39 @@
/**
* 鑾峰彇 鐮佸�煎簭鍙�
*/
- public Integer getOrdernum (){
- return ordernum;
+ public Integer getOrderNum (){
+ return orderNum;
}
/**
* 璁剧疆 鐮佸�煎簭鍙�
*/
- public void setOrdernum (Integer ordernum){
- this.ordernum = ordernum;
+ public void setOrderNum (Integer orderNum){
+ this.orderNum = orderNum;
}
/**
* 鑾峰彇 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- public String getParentclassifyvalueoid (){
- return parentclassifyvalueoid;
+ public String getParentClassifyValueOid (){
+ return parentClassifyValueOid;
}
/**
* 璁剧疆 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- public void setParentclassifyvalueoid (String parentclassifyvalueoid){
- this.parentclassifyvalueoid = parentclassifyvalueoid;
+ public void setParentClassifyValueOid (String parentClassifyValueOid){
+ this.parentClassifyValueOid = parentClassifyValueOid;
}
@Override
public String toString() {
return "CodeClassifyValueDTO{" +
- "codeclassifysecoid='" + codeclassifysecoid +"',"+
+ "codeClassifySecOid='" + codeClassifySecOid +"',"+
"codeclassifysecoidName='" + codeclassifysecoidName +"'," +
- "ordernum='" + ordernum +"',"+
- "parentclassifyvalueoid='" + parentclassifyvalueoid +"',"+
+ "orderNum='" + orderNum +"',"+
+ "parentClassifyValueOid='" + parentClassifyValueOid +"',"+
"}" + super.toString();
}
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeClassifyValueVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeClassifyValueVO.java
index 0af56ff..3e1dc8f 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeClassifyValueVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeClassifyValueVO.java
@@ -18,7 +18,7 @@
/**
* 鍒嗙被鐮佹涓婚敭
*/
- private String codeclassifysecoid;
+ private String codeClassifySecOid;
/**
* 鍒嗙被鐮佹涓婚敭鏄剧ず鏂囨湰
@@ -28,12 +28,12 @@
/**
* 鐮佸�煎簭鍙�
*/
- private Integer ordernum;
+ private Integer orderNum;
/**
* 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- private String parentclassifyvalueoid;
+ private String parentClassifyValueOid;
/**
* 鍒嗙被鐮佸�间腑鐨勭紪鍙�
@@ -48,15 +48,15 @@
/**
* 鑾峰彇 鍒嗙被鐮佹涓婚敭
*/
- public String getCodeclassifysecoid (){
- return codeclassifysecoid;
+ public String getCodeClassifySecOid (){
+ return codeClassifySecOid;
}
/**
* 璁剧疆 鍒嗙被鐮佹涓婚敭
*/
- public void setCodeclassifysecoid (String codeclassifysecoid){
- this.codeclassifysecoid = codeclassifysecoid;
+ public void setCodeClassifySecOid (String codeclassifysecoid){
+ this.codeClassifySecOid = codeclassifysecoid;
}
/**
* 鑾峰彇鍒嗙被鐮佹涓婚敭鏄剧ず鏂囨湰
@@ -74,28 +74,28 @@
/**
* 鑾峰彇 鐮佸�煎簭鍙�
*/
- public Integer getOrdernum (){
- return ordernum;
+ public Integer getOrderNum (){
+ return orderNum;
}
/**
* 璁剧疆 鐮佸�煎簭鍙�
*/
- public void setOrdernum (Integer ordernum){
- this.ordernum = ordernum;
+ public void setOrderNum (Integer ordernum){
+ this.orderNum = ordernum;
}
/**
* 鑾峰彇 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- public String getParentclassifyvalueoid (){
- return parentclassifyvalueoid;
+ public String getParentClassifyValueOid (){
+ return parentClassifyValueOid;
}
/**
* 璁剧疆 涓婄骇鍒嗙被鐮佸�间富閿�
*/
- public void setParentclassifyvalueoid (String parentclassifyvalueoid){
- this.parentclassifyvalueoid = parentclassifyvalueoid;
+ public void setParentClassifyValueOid (String parentClassifyValueOid){
+ this.parentClassifyValueOid = parentClassifyValueOid;
}
@Override
@@ -122,10 +122,10 @@
@Override
public String toString() {
return "CodeClassifyValueVO{" +
- "codeclassifysecoid='" + codeclassifysecoid + '\'' +
+ "codeClassifySecOid='" + codeClassifySecOid + '\'' +
", codeclassifysecoidName='" + codeclassifysecoidName + '\'' +
- ", ordernum=" + ordernum +
- ", parentclassifyvalueoid='" + parentclassifyvalueoid + '\'' +
+ ", orderNum=" + orderNum +
+ ", parentClassifyValueOid='" + parentClassifyValueOid + '\'' +
", id='" + id + '\'' +
", name='" + name + '\'' +
"} " + super.toString();
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyValueController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyValueController.java
index 2d3afc3..b443a2b 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyValueController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyValueController.java
@@ -42,7 +42,7 @@
*/
@GetMapping("/treeCodeClassifyValue")
public List<Tree> treeCodeClassifyValue(TreeQueryObject treeQueryObject) {
- return codeClassifyValueService.treeCodeClassifyValue(treeQueryObject);
+ return codeClassifyValueService.treeCodeClassifyValue(treeQueryObject);
}
/**
@@ -81,7 +81,7 @@
* @return 鍒犻櫎缁撴灉鍙嶉锛氾細success锛氭垚鍔燂紝fail锛氬け璐�
*/
@DeleteMapping( "/deleteData")
- public R delCodeClassifyValue( CodeClassifyValueDTO codeClassifyValueDTO) {
+ public R delCodeClassifyValue(@RequestBody CodeClassifyValueDTO codeClassifyValueDTO) {
return codeClassifyValueService.deleteCodeClassifyValue(codeClassifyValueDTO);
}
@@ -130,7 +130,7 @@
CodeClassifyValueDTO codeFixedValueDTO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(json.get(i))), CodeClassifyValueDTO.class);
dtoList.add(codeFixedValueDTO);
}
- String codeclassifysecoid = (String) param.get("codeclassifysecoid");
+ String codeclassifysecoid = (String) param.get("codeClassifySecOid");
VciBaseUtil.alertNotNull(dtoList,"鐮佸�奸泦鍚�");
if (CollectionUtils.isEmpty(dtoList)){
return R.success("");
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
index 6237099..cab8c88 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -124,8 +124,12 @@
if (CollectionUtils.isEmpty(deleteList)){
return true;
}
+ boolean deletFlag = false;
// 2銆佸啀鍒犻櫎鍩虹鐮佹
- boolean deletFlag = codeBasicSecMapper.deleteBatchIds(deleteList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet())) > 0;
+ Set<String> basicOids = deleteList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet());
+ if(basicOids.size()>0 || !Func.isEmpty(basicOids)){
+ deletFlag = codeBasicSecMapper.deleteBatchIds(basicOids) > 0;
+ }
// 3銆佸啀鏍规嵁鍒犻櫎鍥哄畾鐮佹锛屼笡鏌ヨ鍑烘潵鐨勫熀纭�鐮佹涓繃婊ゅ嚭鍖呭惈鍥哄畾鐮佹鐨勮褰�
List<CodeBasicSec> fixedSecList = deleteList.stream().filter(sec -> {
return CodeSecTypeEnum.CODE_FIXED_SEC.getValue().equals(sec.getSecType());
@@ -135,8 +139,11 @@
Set<String> fixedSecOidSet = fixedSecList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet());
// 閫氳繃澶栭敭杩涜鏌ヨ
List<CodeFixedValue> fixedValueS = fixedValueMapper.selectList(Wrappers.<CodeFixedValue>query().lambda().in(CodeFixedValue::getCodeFixedSecOid,fixedSecOidSet));
- // 鏍规嵁鏌ヨ鍑烘潵鐨刬d鎵ц鍥哄畾鐮佹鎵ц鍒犻櫎
- deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeFixedValue::getOid).collect(Collectors.toSet()))>0;
+ Set<String> collectOid = fixedValueS.stream().map(CodeFixedValue::getOid).collect(Collectors.toSet());
+ if(collectOid.size()>0 || !Func.isEmpty(collectOid)){
+ // 鏍规嵁鏌ヨ鍑烘潵鐨刬d鎵ц鍥哄畾鐮佹鎵ц鍒犻櫎
+ fixedValueMapper.deleteBatchIds(collectOid);
+ }
}
// 4銆佸啀鍒犻櫎鍒嗙被鐮佹
List<CodeBasicSec> classifySecList = deleteList.stream().filter(sec -> {
@@ -146,9 +153,12 @@
// 灏嗚浣滀负鍒犻櫎鏉′欢鐨勫�兼斁鍦ㄤ竴涓泦鍚堥噷闈�
Set<String> classifySecOidSet = classifySecList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet());
// 閫氳繃澶栭敭杩涜鏌ヨ
- List<CodeClassifyValue> fixedValueS = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query().lambda().in(CodeClassifyValue::getCodeClassifySecOid,classifySecOidSet));
+ List<CodeClassifyValue> classifyValues = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query().lambda().in(CodeClassifyValue::getCodeClassifySecOid,classifySecOidSet));
// 鏍规嵁鏌ヨ鍑烘潵鐨勪富閿甶d鎵ц鍥哄畾鐮佹鎵ц鍒犻櫎
- deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeClassifyValue::getOid).collect(Collectors.toSet()))>0;
+ Set<String> codeclassifyOids = classifyValues.stream().map(CodeClassifyValue::getOid).collect(Collectors.toSet());
+ if(codeclassifyOids.size()>0 || !Func.isEmpty(codeclassifyOids)){
+ fixedValueMapper.deleteBatchIds(codeclassifyOids);
+ }
}
return deletFlag;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
index e9749c9..b9b5fdd 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyValueServiceImpl.java
@@ -4,9 +4,11 @@
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.code.constant.MdmBtmTypeConstant;
import com.vci.ubcs.code.dto.CodeClassifyValueDTO;
+import com.vci.ubcs.code.entity.CodeBasicSec;
import com.vci.ubcs.code.entity.CodeClassifyValue;
-import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus;
+import com.vci.ubcs.code.enumpack.*;
import com.vci.ubcs.code.mapper.CodeClassifyValueMapper;
import com.vci.ubcs.code.service.ICodeBasicSecService;
import com.vci.ubcs.code.service.ICodeClassifyValueService;
@@ -19,6 +21,7 @@
import com.vci.ubcs.starter.web.pagemodel.Tree;
import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@@ -49,7 +52,7 @@
/**
* 涓婄骇鑺傜偣鐨勫睘鎬у悕绉�
*/
- private static final String PARENT_FIELD_NAME = "parentClassifyValueOid";
+ private static final String PARENT_FIELD_NAME = "parentClassifyValueOid";
/**
* 鏌ヨ鍒嗙被鐮佹鐨勭爜鍊� 鏍�
@@ -60,7 +63,7 @@
@Override
public List<Tree> treeCodeClassifyValue(TreeQueryObject treeQueryObject) throws VciBaseException {
// List<CodeClassifyValueDO> doList =selectCodeClassifyValueDOByTree(treeQueryObject);
- List<CodeClassifyValue> doList =selectCodeClassifyValueDO4Tree(treeQueryObject);
+ List<CodeClassifyValue> doList = selectCodeClassifyValueDO4Tree(treeQueryObject);
List<CodeClassifyValueVO> voList = CodeClassifyValueWrapper.build().listVO(doList);
TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME);
treeWrapperOptions.copyFromTreeQuery(treeQueryObject);
@@ -78,12 +81,13 @@
* @throws VciBaseException 鍙傛暟涓虹┖锛屽敮涓�椤癸紝蹇呰緭椤逛笉閫氳繃鏃朵細鎶涘嚭寮傚父
*/
@Override
+ @Transactional(rollbackFor = Exception.class)
public boolean addSave(CodeClassifyValueDTO codeClassifyValueDTO) throws VciBaseException{
VciBaseUtil.alertNotNull(codeClassifyValueDTO,"闇�瑕佹坊鍔犵殑鏁版嵁瀵硅薄");
//娣诲姞瀵圭爜鍊煎瓙鐖剁骇鐨勫垽鏂�
- if(StringUtils.isNotBlank(codeClassifyValueDTO.getParentclassifyvalueoid())){
- String parentclassifyvalueoid = codeClassifyValueDTO.getParentclassifyvalueoid();
- String codeclassifysecoid = codeClassifyValueDTO.getCodeclassifysecoid();
+ if(StringUtils.isNotBlank(codeClassifyValueDTO.getParentClassifyValueOid())){
+ String parentclassifyvalueoid = codeClassifyValueDTO.getParentClassifyValueOid();
+ String codeclassifysecoid = codeClassifyValueDTO.getCodeClassifySecOid();
CodeClassifyValue parentDO = codeClassifyValueMapper.selectById(parentclassifyvalueoid);
if (parentDO.getCodeClassifySecOid().equalsIgnoreCase(codeclassifysecoid)){
throw new VciBaseException("涓嶅厑璁稿湪鐖剁爜鍊间腑鐩存帴娣诲姞瀛愮爜鍊�");
@@ -92,6 +96,16 @@
//灏咲TO杞崲涓篋O
CodeClassifyValue codeClassifyValueDO = new CodeClassifyValue();
BeanUtilForVCI.copyPropertiesIgnoreCase(codeClassifyValueDTO,codeClassifyValueDO);
+ //濉厖涓�浜涢粯璁ゅ��
+ codeClassifyValueDO.setOid(VciBaseUtil.getPk());
+ codeClassifyValueDO.setRevisionOid(VciBaseUtil.getPk());
+ codeClassifyValueDO.setNameOid(VciBaseUtil.getPk());
+ codeClassifyValueDO.setBtmname(MdmBtmTypeConstant.CODE_CLASSIFY_VALUE);
+ codeClassifyValueDO.setTs(new Date());
+ codeClassifyValueDO.setCreateTime(new Date());
+ codeClassifyValueDO.setCreator(AuthUtil.getUserId().toString());
+ codeClassifyValueDO.setLastModifier(AuthUtil.getUserId().toString());
+ codeClassifyValueDO.setLastModifyTime(new Date());
//鏌ヨ
List<CodeClassifyValue> existList = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query()
.lambda().eq(CodeClassifyValue::getCodeClassifySecOid, codeClassifyValueDO.getCodeClassifySecOid())
@@ -114,6 +128,10 @@
//灏咲TO杞崲涓篋O
CodeClassifyValue codeClassifyValueDO = selectByOid(codeClassifyValueDTO.getOid());
revisionModelUtil.copyFromDTOIgnore(codeClassifyValueDTO,codeClassifyValueDO);
+ //濉厖涓�浜涢粯璁ゅ��
+ codeClassifyValueDO.setTs(new Date());
+ codeClassifyValueDO.setLastModifier(AuthUtil.getUserId().toString());
+ codeClassifyValueDO.setLastModifyTime(new Date());
boolean resBoolean = codeClassifyValueMapper.updateById(codeClassifyValueDO) > 0;
return resBoolean;
}
@@ -203,7 +221,7 @@
VciBaseUtil.alertNotNull(codeClassifyValueDTO,"鍒嗙被鐮佹鐨勭爜鍊兼暟鎹璞�",codeClassifyValueDTO.getOid(),"鍒嗙被鐮佹鐨勭爜鍊肩殑涓婚敭");
CodeClassifyValue codeClassifyValueDO = selectByOid(codeClassifyValueDTO.getOid());
R baseResult = checkIsCanDeleteForDO(codeClassifyValueDTO,codeClassifyValueDO);
- if(baseResult.isSuccess()) {
+ if(!baseResult.isSuccess()) {
//鎵句笅绾х殑锛岃繖涓槸鍙互鍒犻櫎鐨勬椂鍊橰
List<String> childrenOids = codeClassifyValueMapper.selectAllLevelChildOid(codeClassifyValueDO.getOid().trim());
if (!CollectionUtils.isEmpty(childrenOids)) {
@@ -280,12 +298,12 @@
List<CodeClassifyValue> updateList = new ArrayList<>();
dtoList.forEach(dto -> {
- if( StringUtils.isNotBlank( dto.getOid() )){
+ if(StringUtils.isNotBlank(dto.getOid())){
List<CodeClassifyValue> collect = valueDOList.stream().filter(value -> {
return dto.getOid().equals(value.getOid());
}).collect(Collectors.toList());
collect.forEach(ccv -> {
- ccv.setOrderNum(dto.getOrdernum());
+ ccv.setOrderNum(dto.getOrderNum());
ccv.setId(dto.getId());
ccv.setName(dto.getName());
updateList.add(ccv);
@@ -335,9 +353,8 @@
List<String> oids = codeBasicSecService.getOidByCodeclassifysecOid(conditionMap.get("codeclassifysecoid"));
LambdaQueryWrapper<CodeClassifyValue> wrapper = Wrappers.<CodeClassifyValue>query()
.lambda().in(CodeClassifyValue::getCodeClassifySecOid,oids)
- .orderByDesc(CodeClassifyValue::getOrderNum);
+ .orderByAsc(CodeClassifyValue::getOrderNum);
return codeClassifyValueMapper.selectList(wrapper);
}
-
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeBasicSecMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeBasicSecMapper.xml
index 9ee8a57..6fd8fa8 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeBasicSecMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeBasicSecMapper.xml
@@ -204,7 +204,7 @@
<select id="getOidByCodeclassifysecOid" resultType="java.lang.String">
SELECT OID
- FROM PLATFORMBTM_CODEBASICSEC START WITH OID = #{codeClassifySecOid}
+ FROM PL_CODE_BASICSEC START WITH OID = #{codeClassifySecOid}
CONNECT BY PRIOR PARENTCLASSIFYSECOID = OID
</select>
--
Gitblit v1.9.3