From c5badac7106d4ec7f419283b39b435a92f275fbd Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 30 十月 2023 09:10:18 +0800
Subject: [PATCH] 前端增加码段类型枚举类,实现修改码段类型时提供是否清空码值对话框功能

---
 Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue | 1037 ++++-----------------------------------------------------
 1 files changed, 80 insertions(+), 957 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
index 120dca7..2896334 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
@@ -1,970 +1,93 @@
 <template>
-    <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐� -->
-    <el-dialog
-      title="鍙傜収閰嶇疆"
-      append-to-body
-      :visible.sync="isShowReferConfig"
-      width="90%"
-      @close="recoveryDataAndForm('initData')"
-      style="height: 115vh; margin-top: -14vh; overflow-y: hidden">
-        <el-tabs v-model="activeName" @tab-click="handleClick">
-            <el-tab-pane label="鑷畾涔夊弬鐓ч厤缃�" name="first">
-                <div style="width: 100%; overflow-y: auto; height: 65vh">
-                    <el-row>
-                        <avue-form ref="form" :option="formOption" v-model="form" class="referTypeForm">
-                            <template>
-                                <el-input
-                                    ref="referType" 
-                                    placeholder="璇烽�夋嫨 鍙傜収鐨勪笟鍔$被鍨�"
-                                    prefix-icon="el-icon-search"
-                                    readonly="true"
-                                    v-model="form.referType"
-                                    @focus="openAttrSelectOrGetValue('referType')">
-                                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referType')" style="margin-right: 5px;cursor: pointer;"></i>
-                                </el-input>
-                            </template>
-                        </avue-form>
-                    </el-row>
-                    <el-row v-show="form.type=='default' || form.type=='grid'">
-                        <avue-crud
-                            ref="crudAttr"
-                            :option="attrOption"
-                            @cell-click="clicktest"
-                            :data="attrData">
-                            <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
-                            <template slot="menu" slot-scope="scope">
-                                <el-button type="text"
-                                    size="small"
-                                    icon="el-icon-search"
-                                    plain
-                                    @click="scope.row.isquery=!scope.row.isquery">
-                                    {{scope.row.isquery ? "鍙栨秷蹇�熸煡璇�":"蹇�熸煡璇�"}}
-                                </el-button>
-                                <el-button type="text"
-                                    size="small"
-                                    icon="el-icon-minus"
-                                    plain
-                                    @click="removeCurrentRow(scope.row,'removeAttr')">绉婚櫎
-                                </el-button>
-                            </template>
-                            <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
-                            <template slot="menuLeft" slot-scope="scope">
-                                <el-button type="primary"
-                                    size="small"
-                                    icon="el-icon-plus"
-                                    @click="openAddSearchOrAttrDialog('selectAttr')">閫夋嫨灞炴��
-                                </el-button>
-                            </template>
-                        </avue-crud>
-                    </el-row>
-                    <el-row>
-                        <avue-crud
-                            ref="crudAddCondition"
-                            :option="addSearchCondtionOption" 
-                            :data="addSearchCondtionData">
-                            <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
-                            <template slot="menu" slot-scope="scope">
-                                <el-button type="text"
-                                    size="small"
-                                    icon="el-icon-minus"
-                                    plain
-                                    @click="removeCurrentRow(scope.row,'removeaddSearchCondtion')">绉婚櫎
-                                </el-button>
-                            </template>
-                            <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
-                            <template slot="menuLeft" slot-scope="scope">
-                                <el-button type="primary"
-                                    size="small"
-                                    icon="el-icon-plus"
-                                    @click="openAddSearchOrAttrDialog('addSearchCondition')">
-                                    娣诲姞鏌ヨ鏉′欢
-                                </el-button>
-                            </template>
-                        </avue-crud>
-                    </el-row>
-                </div>
-            </el-tab-pane>
-            <el-tab-pane label="鐩存帴閫夊彇鍙傜収閰嶇疆" name="second">
-                <div style="width: 100%; overflow-y: auto; height: 65vh">
-                    <avue-crud
-                        :option="optionSelectReferConfig"
-                        :table-loading="selectReferConfigLoading"
-                        :data="selectReferConfigData"
-                        :page.sync="selectReferConfigPage"
-                        ref="selectReferConfigCrud"
-                        @row-click="codeRuleRowClick"
-                        @search-change="searchChange"
-                        @search-reset="searchReset"
-                        @selection-change="selectionChange"
-                        @current-change="currentChange"
-                        @size-change="sizeChange"
-                        @refresh-change="refreshChange"
-                        @on-load="onLoad">
-                    </avue-crud>
-                </div>
-            </el-tab-pane>
-        </el-tabs>
-        <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="selectedListReferConfig">纭� 瀹�</el-button>
-            <el-button @click="recoveryDataAndForm('initForm')">娓呯┖鍐呭</el-button>
-            <el-button @click="isShowReferConfig = false">鍙� 娑�</el-button>
-        </div>
-    </el-dialog>
-
+    <div v-if="display">
+        <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
+        <refer-config-form-dialog
+            ref="referConfigFormDialog"
+            @echoReferConfig="echoReferConfig">
+        </refer-config-form-dialog>
+        <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
+        <refer-config-crud-dialog
+            ref="referConfigCrudDialog"
+            @openReconfigInterFace="openReconfigInterFace"
+            @echoReferConfig="echoReferConfig">
+        </refer-config-crud-dialog>
+    </div>
 </template>
-    
+
 <script>
-    export default {
-        name: "referConfigDialog",
-        props: {
-            //鏈満鏅彉閲�
-            thisSceneTableData: {
-                type: Array,
-            },
-        },
-        data() {
-            return {
-                activeName: 'first', //褰撳墠娲诲姩鐨則abs
-                labelWidth: '150',   // 鏍囬瀹藉害
-                isShowReferConfig: false,  // 瀵硅瘽妗嗘樉绀洪殣钘忔帶鍒�
-                // 琛ㄥ崟瀵硅薄
-                form: {
-                    referType: '',
-                    textField: 'name',
-                    valueField: 'oid',
-                    type: 'default', //鍙傜収绐楀彛绫诲瀷
-                    url: '',
-                    backPath: '',
-                    method: 'GET',
-                    height: '',
-                    useFormKey: '',
-                    paramForFormKey: '',
-                    isMuti: false,
-                    mapFields: '', 
-                    // limit: '15',
-                    // sortField: '',
-                    // sortType: 'asc',
-                    // referContent: '',
-                    // displayTable: '',
-                    // parentFieldName: '',
-                    // parentUsedField: 'oid',
-                    // parentValue: '',
-                    // loadType: 'all',
-                    // onlyLeaf: false,
-                },
-                attrData: [
-                    {
-                        field: 'id',
-                        title: '缂栧彿',
-                        fieldType: 'text',
-                        fieldTypeText: '鏂囨湰妗�',
-                        sort: "true",
-                        sortField: 'id',
-                        width: '150',
-                        isquery: true,
-                    },{
-                        field: 'name',
-                        title: '鍚嶇О',
-                        fieldType: 'text',
-                        fieldTypeText: '鏂囨湰妗�',
-                        sort: "true",
-                        sortField: 'name',
-                        width: '180',
-                        isquery: true,
-                    }
-                ],
-                attrOption: {
-                    height:'150',
-                    tip: false,
-                    addBtn: false,
-                    editBtn: false,
-                    searchShow: false,
-                    searchMenuSpan: 6,
-                    border: false,
-                    index: true,
-                    viewBtn: false,
-                    delBtn: false,
-                    selection: false,
-                    disablePage: false,
-                    refreshBtn: false,
-                    columnBtn: false,
-                    dialogClickModal: false,
-                    highlightCurrentRow: true,
-                    column: [
-                        {
-                            label: "鍒楀瓧娈�(*)",
-                            prop: "field",
-                        },{
-                            label: "鍒楀悕(*)",
-                            prop: "title",
-                        },{
-                            label: "瀛楁绫诲瀷(*)",
-                            prop: "fieldTypeText",
-                        },{
-                            label: "鍒楄〃鍙帓搴�",
-                            prop: "sort",
-                        },{
-                            label: "鎺掑簭瀛楁",
-                            prop: "sortField",
-                        },{
-                            label: "瀛楁瀹藉害",
-                            prop: "width",
-                        },{
-                            label: "鍒楀浐瀹氫綅缃�",
-                            prop: "fixedText",
-                        },{
-                            label: "js鏄剧ず浠g爜",
-                            prop: "templet",
-                        },
-                    ]
-                },
-                addSearchCondtionData: [
-                        {
-                            id: 'test',
-                            cate: 'test',
-                            value: 1
-                        },{
-                            id: 'test1',
-                            cate: 'test1',
-                            value: 2
-                        },{
-                            id: 'test2',
-                            cate: 'test2',
-                            value: 3
-                        },{
-                            id: 'test4',
-                            cate: 'test4',
-                            value: 4
-                        }
-                ],
-                addSearchCondtionOption: {
-                    height:'150',
-                    tip: false,
-                    addBtn: false,
-                    editBtn: false,
-                    searchShow: false,
-                    searchMenuSpan: 6,
-                    border: false,
-                    index: true,
-                    viewBtn: false,
-                    delBtn: false,
-                    selection: false,
-                    disablePage: false,
-                    refreshBtn: false,
-                    columnBtn: false,
-                    dialogClickModal: false,
-                    highlightCurrentRow: true,
-                    column: [
-                        {
-                            label: "绛涢�夊瓧娈�",
-                            prop: "id",
-                        },{
-                            label: "绛涢�夌被鍨�",
-                            prop: "cate",
-                        },{
-                            label: "绛涢�夊��",
-                            prop: "value",
-                        }
-                    ]
-                },
+import referConfigFormDialog from "./referConfigFormDialog.vue";
+import referConfigCrudDialog from "./referConfigCrudDialog.vue";
+import func from "@/util/func";
+export default {
+    name: "referConfigDialog",
+    props: ["referConfigOption","display"],
+    components: {referConfigFormDialog, referConfigCrudDialog},
+    data() {
+        return {
+        };
+    },
+    watch:{
+        referConfigOption (){
+            if(func.notEmpty(this.referConfigOption.referConfig) || func.notEmpty(this.referConfigOption.referBtmId)){
+                this.openReconfigInterFace(this.referConfigOption);
+            }else{
+                this.openTipsChooseOrCust();
+            }
 
-                optionSelectReferConfig: {
-                    height:'auto',
-                    tip: false,
-                    addBtn: false,
-                    editBtn: false,
-                    //searchShow: false,
-                    searchMenuSpan: 6,
-                    border: false,
-                    index: true,
-                    viewBtn: false,
-                    delBtn: false,
-                    //selection: false,
-                    //disablePage: false,
-                    //refreshBtn: false,
-                    //columnBtn: false,
-                    dialogClickModal: false,
-                    highlightCurrentRow: true,
-                    column: [
-                        {
-                            label: "鍒楀瓧娈�(*)",
-                            prop: "field",
-                        },{
-                            label: "鍒楀悕(*)",
-                            prop: "title",
-                        },{
-                            label: "瀛楁绫诲瀷(*)",
-                            prop: "fieldTypeText",
-                        },{
-                            label: "鍒楄〃鍙帓搴�",
-                            prop: "sort",
-                        },{
-                            label: "鎺掑簭瀛楁",
-                            prop: "sortField",
-                        },{
-                            label: "瀛楁瀹藉害",
-                            prop: "width",
-                        },{
-                            label: "鍒楀浐瀹氫綅缃�",
-                            prop: "fixedText",
-                        },{
-                            label: "js鏄剧ず浠g爜",
-                            prop: "templet",
-                        },
-                    ]
-                },
-                selectReferConfigLoading: false,
-                selectReferConfigData: [
-                    {
-                        field: 'id',
-                        title: '缂栧彿',
-                        fieldType: 'text',
-                        fieldTypeText: '鏂囨湰妗�',
-                        sort: "true",
-                        sortField: 'id',
-                        width: '150',
-                        isquery: true,
-                    },{
-                        field: 'name',
-                        title: '鍚嶇О',
-                        fieldType: 'text',
-                        fieldTypeText: '鏂囨湰妗�',
-                        sort: "true",
-                        sortField: 'name',
-                        width: '180',
-                        isquery: true,
-                    }
-                ],
-                selectReferConfigPage: {
-                    pageSize: 10,
-                    currentPage: 1,
-                    total: 0
-                },
-                selectReferConfigQuery: {},
-
-            };
         },
-        // 琛ㄥ崟鐣岄潰鏄剧ず鍐呭閰嶇疆
-        computed: {
-            formOption() {
-                /** 妫�楠屾槸鍚︿负鏁板瓧 */
-                let validateNumber = "";
-                validateNumber = (rule, value,callback) => {
-                    if(/[^\d]/g.test(value)){
-                        callback(new Error('绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�'));
-                    }else {
-                        callback();
-                    }
-                };
-                return {
-                    submitBtn: false,
-                    emptyBtn: false,
-                    labelWidth: '145', //榛樿鏍囩瀹藉害
-                    // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙
-                    column: [
-                        {
-                            label: '鍙傜収鐨勪笟鍔$被鍨�',
-                            prop: 'referType',
-                            span: 7,
-                            tip: '鍙傜収鏁版嵁鏌ヨ鐨勪笟鍔$被鍨嬨��',
-                            tipPlacement: 'right',
-                            type: 'input',
-                            rules: [{
-                                required: true,
-                                message: "(鍙傜収鐨勪笟鍔$被鍨�)蹇呭~椤逛笉鑳戒负绌�",
-                                trigger: "blur",
-                            }],
-                            children: {
-                                border: true,
-                                height: '200px',
-                                tip: false,
-                                //searchShow: false,
-                                index: true,
-                                selection: true,
-                                //refreshBtn: false,
-                                //columnBtn: false,
-                                dialogClickModal: false,
-                                highlightCurrentRow: true,
-                                column: [{
-                                    label: '涓氬姟绫诲瀷缂栧彿',
-                                    width: 120,
-                                    search: true,
-                                    searchSpan: 8,
-                                    searchLabelWidth: 100,
-                                    prop: 'id'
-                                },{
-                                    label: '涓氬姟绫诲瀷鍚嶇О',
-                                    search: true,
-                                    searchSpan: 8,
-                                    searchLabelWidth: 100,
-                                    prop: 'name'
-                                },{
-                                    label: '鎻忚堪',
-                                    search: false,
-                                    prop: 'description'
-                                }],
-                            },
-                            // formatter: (row) => {
-                            //     console.log(row.name);
-                            //     if (!row.name) 
-                            //         return ''
-                            //     return row.name;
-                            // },
-                            // onLoad: ({ page, value, data }, callback) => {
-                            //     console.log(page);
-                            //     console.log(value);
-                            //     console.log(data);
-                            //     //棣栨鍔犺浇鍘绘煡璇㈠搴旂殑鍊�
-                            //     if (value) {
-                            //         console.log(111+"======="+ value);
-                            //         this.$message.success('棣栨鏌ヨ' + value)
-                            //         callback({
-                            //             id: 't1',
-                            //             name: 'test1',
-                            //             description: 'test1',
-                            //         })
-                            //         return;
-                            //     }
-                            //     if (data) {
-                            //         console.log(111+"======="+ data);
-                            //         this.$message.success('鎼滅储鏌ヨ鍙傛暟' + JSON.stringify(data))
-                            //     }
-                            //     if (page) {
-                            //         console.log(111+"======="+ page);
-                            //         this.$message.success('鍒嗛〉鍙傛暟' + JSON.stringify(page))
-                            //     }
-                            //     //鍒嗛〉鏌ヨ淇℃伅
-                            //     callback({
-                            //         total: 2,
-                            //         data: [{
-                            //             id: 't2',
-                            //             name: 'test2',
-                            //             description: 'test2',
-                            //         }, {
-                            //             id: 't3',
-                            //             name: 'test3',
-                            //             description: 'test3',
-                            //         }]
-                            //     })
-                            // },
-                            // props: {
-                            //     label: 'name',
-                            //     value: 'id',
-                            // }
-                        },{
-                            label: '鏄剧ず鐨勫睘鎬�',
-                            prop: 'textField',
-                            tip: '閫夋嫨鏁版嵁鍚庯紝鏄剧ず鍒板瓧娈典笂鐨勪俊鎭墍灞炵殑灞炴�э紝涓�鑸兘鏄痭ame,濡傛灉鏄涓睘鎬т娇鐢ㄩ�楀彿鍒嗗壊锛屽id,name銆�',
-                            tipPlacement: 'right',
-                            span: 7,
-                            value: 'name',
-                            rules: [{
-                                required: true,
-                                message: "(鏄剧ず鐨勫睘鎬�)蹇呭~椤逛笉鑳戒负绌�",
-                                trigger: "blur",
-                            }],
-                        },{
-                            label: '瀛樺偍鍊肩殑灞炴��',
-                            prop: 'valueField',
-                            tip: '閫夋嫨鏁版嵁鍚庯紝淇濆瓨鍒版暟鎹簱閲岀殑灞炴�э紝涓�鑸兘鏄痮id鎴栬�卛d锛屽鏋滄槸澶氫釜灞炴�т娇鐢ㄩ�楀彿鍒嗗壊锛屽oid ,id',
-                            value: 'oid',
-                            tipPlacement: 'right',
-                            span: 7,
-                            rules: [{
-                                required: true,
-                                message: "(瀛樺偍鍊肩殑灞炴��)蹇呭~椤逛笉鑳戒负绌�",
-                                trigger: "blur",
-                            }],
-                        },{
-                            label: '鍙傜収绐楀彛绫诲瀷',
-                            prop: 'type',
-                            tip: 'default:榛樿鐨勫弬鐓х獥鍙f牱寮�; stand:UI涓婁笅鏂囬厤缃殑鏂瑰紡; classify:鍒嗙被+妗f鐨勬樉绀�; 鑷畾涔夌殑鍙傜収鐩存帴鍐檍s鐨勭粍浠惰矾寰勶紱tree:鏍戝舰灞曠ず;grid:鍒楄〃灞曠ず',
-                            tipPlacement: 'right',
-                            span: 7,
-                            value: 'default',
-                            type: 'select',
-                            dicData: [{
-                                label: '榛樿鏍峰紡',
-                                value: 'default'
-                            }, {
-                                label: '骞冲彴閰嶇疆',
-                                value: 'stand'
-                            }, {
-                                label: '鏍戝舰',
-                                value: 'tree'
-                            }, {
-                                label: '鍒楄〃',
-                                value: 'grid'
-                            }, {
-                                label: '閮ㄩ棬鏍�',
-                                value: 'refer/OrgDepartmentRefer'
-                            }, {
-                                label: '閮ㄩ棬鍒楄〃',
-                                value: 'refer/OrgDepartmentGridRefers'
-                            }, {
-                                label: '鐢ㄦ埛',
-                                value: 'refer/SmUserRefer'
-                            }, {
-                                label: '鐢ㄦ埛鍒楄〃',
-                                value: 'refer/SmUserGridRefer'
-                            }, {
-                                label: '瑙掕壊鍒楄〃',
-                                value: 'refer/SmRoleRefer'
-                            }, {
-                                label: '鑱屽姟',
-                                value: 'refer/OrgDutyRefer'
-                            }, {
-                                label: '宸ョ',
-                                value: 'refer/SmWorkTypeRefer'
-                            }, {
-                                label: '娴佺▼妯℃澘',
-                                value: 'refer/WfProcessTemplateRefer'
-                            }],
-                            rules: [{
-                                required: true,
-                                message: "(鍙傜収绐楀彛绫诲瀷)蹇呭~椤逛笉鑳戒负绌�",
-                                trigger: "blur",
-                            }],
-                            change: ({ value, column }) => {
-                                // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘�
-                                let oldForm = this.form;
-                                this.form = {};  // 琛ㄥ崟瀵硅薄璧嬬┖
-                                this.form.referType = oldForm.referType
-                                this.form.textField = oldForm.textField
-                                this.form.valueField = oldForm.valueField
-                                this.form.type = oldForm.type //鍙傜収绐楀彛绫诲瀷
-                                this.form.url =  oldForm.url
-                                this.form.backPath =  oldForm.backPath
-                                this.form.method =  oldForm.method
-                                this.form.height =  oldForm.height
-                                this.form.useFormKey =  oldForm.useFormKey
-                                this.form.paramForFormKey =  oldForm.paramForFormKey
-                                this.form.isMuti =  oldForm.isMuti
-                                this.form.mapFields =  oldForm.mapFields
-                                let addFrom = {};  //鏍规嵁绫诲瀷闇�瑕佹坊鍔犵殑涓嶅悓灞炴��
-                                if(value == 'stand'){
-                                    addFrom = {
-                                        referContent: '',
-                                        displayTable: '',
-                                    }
-                                } else if(value == 'default' || value == 'grid'){
-                                    addFrom = {
-                                        limit: '15',
-                                        sortField: '',
-                                        sortType: 'asc',
-                                    }
-                                } else if(value == 'tree'){
-                                    addFrom = {
-                                        parentFieldName: '',
-                                        parentUsedField: 'oid',
-                                        parentValue: '',
-                                        loadType: 'all',
-                                        onlyLeaf: false,
-                                        sortField: '',
-                                        sortType: 'asc',
-                                    }
-                                }
-                                // 鍚堝苟涓や釜琛ㄥ崟
-                                this.form = Object.assign(addFrom,this.form);
-                                //console.log(this.form);
-                            },
-                        },{
-                            label: '鑷畾涔夌殑鍚庡彴璺緞',
-                            prop: 'url',
-                            tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Tree>',
-                            tipPlacement: 'right',
-                            span: 7,
-                        },{
-                            label: '鏈嶅姟鐨勫湴鍧�',
-                            prop: 'backPath',
-                            tip: '閫氬父涓虹┖锛屽湪鏀寔寰湇鍔℃垨鑰呭垎甯冨紡閮ㄧ讲鐨勬椂鍊欐墠閰嶇疆',
-                            tipPlacement: 'right',
-                            span: 7,
-                        },{
-                            label: '璇锋眰鍚庡彴鐨勫崗璁柟寮�',
-                            prop: 'method',
-                            tip: 'HTTP鐨勫崗璁柟寮忥紝鏀寔POST,PUT,GET锛屼竴鑸兘鏄疓ET',
-                            tipPlacement: 'right',
-                            span: 7,
-                            value: 'GET',
-                            type: 'select',
-                            dicData: [{
-                                label:'GET',value: "GET"
-                            },{
-                                label:'PUT',value: "PUT"
-                            },
-                            {
-                                label:'POST',value: "POST"
-                            }],
-                        },{
-                            label: '绐楀彛鏄剧ず鐨勯珮搴�',
-                            prop: 'height',
-                            tip: '榛樿绌虹潃锛岃缃悗琛ㄧず寮哄埗鏄剧ず杩欐牱鐨勯珮搴�',
-                            tipPlacement: 'right',
-                            span: 7,
-                            rules:[{
-                                validator: validateNumber,
-                                message: "绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�",
-                                trigger: "blur",
-                            }]
-                        },{
-                            label: '杩囨护(绾ц仈)灞炴��',
-                            prop: 'useFormKey',
-                            tip: '鑾峰彇琛ㄥ崟涓婄殑鍏朵粬灞炴�х殑灞炴�х殑鍊兼潵杩囨护,鎴栬�呬娇鐢ㄦ煇涓睘鎬ф潵绾ц仈閫夋嫨',
-                            tipPlacement: 'right',
-                            span: 7,
-                        },{
-                            label: '杩囨护灞炴�ц姹傚弬鏁�',
-                            prop: 'paramForFormKey',
-                            tip: '浣跨敤杩囨护灞炴�ф椂锛屽彂閫佺粰鍚庡彴鐨勮姹傚弬鏁�',
-                            tipPlacement: 'right',
-                            span: 7,
-                        },{
-                            label: '鏄惁澶氶��',
-                            type: 'switch',
-                            prop: 'isMuti',
-                            value: false,
-                            span: 7,
-                            row: true,
-                        },{
-                            label: '鏄犲皠鍏朵粬灞炴��',
-                            prop: 'mapFields',
-                            tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}',
-                            tipPlacement: 'right',
-                            span: 18,
-                        }
-                    ],
-                    // 鍙樺姩鐨勮〃鍗曞尯鍩�
-                    group: [
-                        {   
-                            display: this.form.type=='default'||this.form.type=='grid',
-                            icon: 'el-icon-info',
-                            label: this.form.type=='default' ? '榛樿鍙傜収鐨勯厤缃�(涓嬫柟鍒楄〃)':'鍒楄〃鍙傜収鐨勯厤缃紙涓嬫柟鍒楄〃)',
-                            collapse: true,
-                            prop: 'groupDdefaultOrGrid',
-                            column: [
-                                {
-                                    label: '姣忛〉鏄剧ず鏉℃暟',
-                                    prop: 'limit',
-                                    span: 7,
-                                    tip: '鍒嗛〉鏃舵瘡椤垫樉绀虹殑鏁伴噺锛屼笉鍒嗛〉濉�-1',
-                                    //value: 15,
-                                    tipPlacement: 'right',
-                                },{
-                                    label: '鎺掑簭瀛楁',
-                                    prop: 'sortField',
-                                    span: 7,
-                                    type: 'table',
-                                    tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁',
-                                    tipPlacement: 'right',
-                                    children: {
-                                        border: true,
-                                        column: [{
-                                            label: '灞炴�ц嫳鏂囩紪鍙�',
-                                            width: 120,
-                                            search: true,
-                                            searchSpan: 8,
-                                            searchLabelWidth: 100,
-                                            prop: 'id'
-                                        },{
-                                            label: '灞炴�т腑鏂囧悕绉�',
-                                            search: true,
-                                            searchSpan: 8,
-                                            searchLabelWidth: 100,
-                                            prop: 'name'
-                                        },{
-                                            label: '灞炴�ч暱搴�',
-                                            search: false,
-                                            prop: 'attrLength'
-                                        },{
-                                            label: '灞炴�х被鍨�',
-                                            search: false,
-                                            prop: 'attrType'
-                                        }],
-                                    },
-                                    // 杩欏効闇�瑕佹坊鍔犱笟鍔$被鍨嬫帴鍙�
-                                    
-                                },{
-                                    label: '鎺掑簭绫诲瀷',
-                                    prop: 'sortType',
-                                    span: 7,
-                                    dicData: [{
-                                        label: '鍗囧簭', value: 'asc'
-                                    }, {
-                                        label: '闄嶅簭', value: 'desc'
-                                    }],
-                                    //value: 'asc',
-                                    type: 'select',
-                                    tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭绫诲瀷',
-                                    tipPlacement: 'right',
-                                }
-                            ]
-                        },
-                        {   
-                            display: this.form.type=='stand',
-                            icon: 'el-icon-info',
-                            label: 'stand(骞冲彴閰嶇疆)鍙傜収',
-                            collapse: true,
-                            prop: 'groupStand',
-                            column: [
-                                {
-                                    label: '鍙傝�冪殑UI涓婁笅鏂�',
-                                    prop: 'referContent',
-                                    span: 7,
-                                    tip: '鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆,涓斿湪stand绫诲瀷涓嬫墠鑳界敓鏁�',
-                                    tipPlacement: 'right',
-                                },
-                                {
-                                    label: '骞冲彴鐨勮〃鏍肩紪鍙�',
-                                    prop: 'displayTable',
-                                    span: 7,
-                                    tip: '涓庡弬鐓х殑UI涓婁笅鏂囦簰鏂ワ紝鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆锛屼笖鍦╯tand绫诲瀷涓嬫墠鑳界敓鏁�',
-                                    tipPlacement: 'right',
-                                },
-                            ]
-                        },
-                        {   
-                            display: this.form.type=='tree',
-                            icon: 'el-icon-info',
-                            label: '鏍戝舰鍙傜収淇℃伅',
-                            collapse: true,
-                            prop: 'groupTree',
-                            labelWidth: '158',
-                            column: [
-                                {
-                                    label: '鏍戝舰鐨勪笂绾у睘鎬�',
-                                    prop: 'parentFieldName',
-                                    span: 7,
-                                    tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婁笅绾у叧绯绘煡鎵剧殑灞炴�с��',
-                                    tipPlacement: 'right',
-                                    rules: [{
-                                        required: true,
-                                        message: "(鏍戝舰鐨勪笂绾у睘鎬�)蹇呭~椤逛笉鑳戒负绌�",
-                                        trigger: "blur",
-                                    }],
-                                },{
-                                    label: '涓婄骇灞炴�у�煎搴斿睘鎬�',
-                                    prop: 'parentUsedField',
-                                    span: 7,
-                                    tip: '涓婄骇灞炴�у瓨鍌ㄧ殑鍊�,鏄笂绾ф暟鎹殑浠�涔堝睘鎬с�備竴鑸兘鏄痮id銆�',
-                                    value: 'oid',
-                                    tipPlacement: 'right',
-                                },{
-                                    label: '鏍硅妭鐐圭殑鍊�',
-                                    prop: 'parentValue',
-                                    span: 7,
-                                    tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婄骇鐨勫�笺��',
-                                    tipPlacement: 'right',
-                                },{
-                                    label: '鏍戝姞杞芥柟寮�',
-                                    prop: 'loadType',
-                                    span: 7,
-                                    value: 'all',
-                                    dicData: [{
-                                        label: '鍏ㄩ儴', value: 'all'
-                                    }, {
-                                        label: '閫愮骇鍔犺浇', value: 'node'
-                                    }],
-                                    type: 'select',
-                                },{
-                                    label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣',
-                                    prop: 'onlyLeaf',
-                                    span: 7,
-                                    value: false,
-                                    type: 'switch',
-                                },{
-                                    label: '鎺掑簭瀛楁',
-                                    prop: 'sortField',
-                                    span: 7,
-                                    type: 'table',
-                                    children: {
-                                        border: true,
-                                        column: [{
-                                            label: '灞炴�ц嫳鏂囩紪鍙�',
-                                            width: 120,
-                                            search: true,
-                                            searchSpan: 8,
-                                            searchLabelWidth: 100,
-                                            prop: 'id'
-                                        },{
-                                            label: '灞炴�т腑鏂囧悕绉�',
-                                            search: true,
-                                            searchSpan: 8,
-                                            searchLabelWidth: 100,
-                                            prop: 'name'
-                                        },{
-                                            label: '灞炴�ч暱搴�',
-                                            search: false,
-                                            prop: 'attrLength'
-                                        },{
-                                            label: '灞炴�х被鍨�',
-                                            search: false,
-                                            prop: 'attrType'
-                                        }],
-                                    },
-                                    // 杩欏効闇�瑕佹坊鍔犱笟鍔$被鍨嬫帴鍙h姹傚疄鐜板脊绐楃晫闈㈣〃鏍兼覆鏌�
-                                },{
-                                    label: '鎺掑簭绫诲瀷',
-                                    prop: 'sortType',
-                                    span: 7,
-                                    type: 'select',
-                                    value: 'asc',
-                                    dicData: [{
-                                        label: '鍗囧簭', value: 'asc'
-                                    }, {
-                                        label: '闄嶅簭', value: 'desc'
-                                    }],
-                                },
-                            ]
-                        },
-                    ]
+    },
+    methods: {
+        // 褰撳墠宸插瓨鍦ㄧ紪杈戣繃鐨勫弬鐓ч厤缃紝鎵�浠ョ洿鎺ユ墦寮�鍙傜収閰嶇疆鐣岄潰
+        openReconfigInterFace(preReferConfigForm){
+            const form = preReferConfigForm;
+            let data = {
+                referTypeName: form.referBtmName || '',
+                referType: form.referBtmId || '',
+            }
+            if(this.referConfigOption.referConfig){
+                // 缂栬緫鐮佹鏃秗eferConfig鍙兘浼氬湪涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊间箣鍚庢敼鍙�
+                let referConfigValue =JSON.parse(form.referConfig);
+                if(referConfigValue.referType != form.referBtmId && data.referType){
+                    referConfigValue.referType = form.referBtmId || '';
+                    referConfigValue.referTypeName = form.referBtmName || form.referBtmId;
+                    this.referConfigOption.referConfig = JSON.stringify(referConfigValue);
                 }
-            },
+                this.$set(data,"referConfig",this.referConfigOption.referConfig)
+            }
+            // 棣栨鐐瑰嚮鎶ラ敊鏈畾涔�
+            this.$nextTick(()=>{
+                this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+                this.$refs.referConfigFormDialog.initPageData(data);
+            })
         },
-        methods: {
-            clicktest(cell){
-                
-                //cell.$cellEdit = true;
-            },
-            // 鍒囨崲褰撳墠娲诲姩鐨則abs
-            handleClick(tab, event) {
-                if(tab.index=='0'){
-                    this.onloadAttrData(); 
-                }else{
-                    this.onloadselectReferConfigData();
-                }
-            },
-            // 閫夋嫨瀹屽弬鐓ч厤缃箣鍚庣偣鍑讳繚瀛樻寜閽Е鍙�
-            selectedListReferConfig(){
-                //琛ㄥ崟楠岃瘉
-                this.$refs.form.validate((valid, done, msg) => {
-                    if (valid) {
-                        let submitForm = this.filterForm();
-                        //console.log(submitForm);
-                        //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉
-                        let submitFormJson = JSON.stringify(submitForm);
-                        //console.log(submitFormJson);
-                        this.$emit('echoReferConfig', submitFormJson) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
-                        //this.isShowReferConfig = false;
-                        done()
-                    } else {
-                        for(let attr in msg) {
-                            //console.log(msg[attr][0].message);
-                            this.$message.warning(msg[attr][0].message);
-                            break;
-                        }
-                        return false;
-                    }
-                })
-            },
-            /** 鍏跺疄閫夊彇灞炴�ц〃鏍肩殑榛樿鏁版嵁涓嶉渶瑕佸姞杞斤紝
-             浣嗘槸寮圭獥鎵撳紑浼氭湁琛ㄦ牸閿欒闂鎵�浠ラ渶瑕佸湪杩欒皟鐢╠oLayout鏂规硶*/
-            onloadAttrData(){
-                this.$nextTick(() => {
-                    this.$refs.crudAttr.doLayout()
-                })
-            },
-            // 灞炴�ч�夋嫨琛ㄦ牸涓殑绉婚櫎鎸夐挳鍔熻兘
-            removeCurrentRow(row,condition){
-                if(condition=='removeAttr'){
-                    this.$delete(this.attrData, row.$index);
-                    return;
-                }
-                this.$delete(this.addSearchCondtionData, row.$index);
-            },
-            // 璇ョ晫闈㈢殑鏁版嵁杩涜鍒濆鍖栧鍘�
-            recoveryDataAndForm(condition){
-                if(condition=='initForm'){
-                    let currentType = this.form.type;
-                    this.form = this.$options.data().form;
-                    this.form.type = currentType;
-                    console.log(this.form);
-                    // this.form.referContent = '';
-                    // this.form.displayTable = '';
-                    return;
-                }
-                Object.assign(this.$data,this.$options.data());         
-            },
-            // 鎵撳紑娣诲姞鏌ヨ鏉′欢瀵硅瘽妗�
-            openAddSearchOrAttrDialog(condition){
-                if(condition=='addSearchCondition'){
-                    console.log('this is open addSearchCondition');
-                }else {
-                    if(this.form.referType == '' || this.form.referType == null){
-                        this.$message.warning("璇疯緭鍏ュ弬鐓х殑涓氬姟绫诲瀷")
-                        return;
-                    }
+        // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐨勬彁绀烘
+        openTipsChooseOrCust(){
+            this.$confirm('璇烽�夋嫨鍙傜収閰嶇疆鐨勫畾涔夋柟寮忥紵','鍙傜収閰嶇疆鐨勬柟寮�', {
+                distinguishCancelAndClose: true,
+                closeOnClickModal: false,
+                confirmButtonText: '鑷畾涔夊弬鐓ч厤缃�',
+                cancelButtonText: '鐩存帴閫夋嫨鍙傜収閰嶇疆'
+            })
+            .then(() => {
+                // 鎵撳紑鑷畾鍙傜収閰嶇疆瀵硅瘽妗�
+                this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+            })
+            .catch(action => {
+                if (action === "cancel") {
+                    // 鎵撳紑鐩存帴閫夋嫨鍙傜収閰嶇疆瀵硅瘽妗�
+                    this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true;
 
-                    console.log('this is open selectAttr');
                 }
-            },
-            // 鎻愪氦琛ㄥ崟涔嬪墠杩囨护鎺夌┖鎴栦笉闇�瑕佺殑琛ㄥ崟鏁版嵁
-            filterForm(){
-                const oldForm = this.form;
-                let submittDefaultForm = [
-                    'referType',
-                    'textField',
-                    'valueField',
-                    'type', //鍙傜収绐楀彛绫诲瀷
-                    'url',
-                    'backPath',
-                    'method',
-                    'height',
-                    'useFormKey',
-                    'paramForFormKey',
-                    'isMuti',
-                    'mapFields', 
-                ];
-                let addArray = [];
-                let newForm ={};
-                // 鏍规嵁涓嶅悓绫诲瀷杩囨护鍑轰笉鍚岀殑鐨勮〃鍗曞睘鎬�
-                if(oldForm.type == 'stand'){
-                    addArray = ['referContent', 'displayTable'];
-                } else if(oldForm.type == 'default' || oldForm.type == 'grid'){
-                    addArray = ['limit', 'sortField', 'sortType'];
-                } else if(oldForm.type == 'tree'){
-                    addArray = [
-                        "parentFieldName", 
-                        'parentUsedField',
-                        'parentValue', 
-                        'loadType',
-                        'onlyLeaf',
-                        'sortField',
-                        'sortType'
-                    ];
-                }
-                submittDefaultForm = submittDefaultForm.concat(addArray);
-                submittDefaultForm.forEach(item=>{
-                    //console.log(item);
-                    if(item == 'isMuti' || item == 'onlyLeaf' || oldForm[item] != '' || oldForm[item] != ''){
-                      newForm = Object.assign(newForm,{[item]:oldForm[item]});  
-                    }
-                });
-                // console.log(newForm);
-                return newForm;
-            },
-            onloadselectReferConfigData(){
-                this.$nextTick(() => {
-                    this.$refs.selectReferConfigCrud.doLayout()
-                })
-            },
-            
-        }
-    };
+            });
+        },
+        /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
+        echoReferConfig(content){
+            this.$emit('setReferConfigValue', content) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
+        },
+    },
+}
 </script>
 
 <style>
 
-    /* 鎻愮ず鏂囨湰鍑虹幇鐨勯�熷害 */
-    .el-tooltip__popper{
-        width: 200px !important;
-        transition-duration: 0.2s !important;
-        transition-delay: 0.1s !important;
-    }
-    /* 鎻愮ず鏂囨湰娑堝け鏃剁殑閫熷害 */
-    .fel-fade-in-linear-leave-active,.el-fade-in-linear-leave-to{
-        -webkit-transition:opacity .0s !important;
-        transition:opacity .0s !important;
-    }
-    
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3