瀏覽代碼

Merge branch 'main' of https://git.sxidc.com/gov_cloud_unify_manager_system/jnpf_360_version_web

yueyazhui 9 月之前
父節點
當前提交
629f35176a

二進制
src/assets/images/processConfiguration/qywx.png


二進制
src/assets/images/processConfiguration/wxmp.png


+ 872 - 861
src/components/Generator/index/Home.vue

@@ -1,105 +1,116 @@
 
 <template>
-  <div class="container">
-    <div class="left-board">
-      <el-scrollbar class="left-scrollbar">
-        <div class="components-list">
-          <div v-for="(item, listIndex) in leftComponents" :key="listIndex" class="components-part">
-            <div class="components-title">{{ item.title }}</div>
-            <draggable class="components-draggable" :list="item.list"
-              :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
-              :clone="cloneComponent" draggable=".components-item" filter=".disabled" :sort="false"
-              @end="onEnd">
-              <div v-for="(element, index) in item.list" :key="index" class="components-item"
-                :class="{'disabled':element.__config__.dragDisabled}"
-                @click="addComponent(element)">
-                <div class="components-body">
-                  <i :class="element.__config__.tagIcon" />
-                  {{ element.__config__.label }}
+    <div class="container">
+        <div class="left-board">
+            <el-scrollbar class="left-scrollbar">
+                <div class="components-list">
+                    <div v-for="(item, listIndex) in leftComponents" :key="listIndex"
+                        class="components-part">
+                        <div class="components-title">{{ item.title }}</div>
+                        <draggable class="components-draggable" :list="item.list"
+                            :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
+                            :clone="cloneComponent" draggable=".components-item" filter=".disabled"
+                            :sort="false" @end="onEnd">
+                            <div v-for="(element, index) in item.list" :key="index"
+                                class="components-item"
+                                :class="{'disabled':element.__config__.dragDisabled}"
+                                @click="addComponent(element)">
+                                <div class="components-body">
+                                    <i :class="element.__config__.tagIcon" />
+                                    {{ element.__config__.label }}
+                                </div>
+                            </div>
+                        </draggable>
+                    </div>
                 </div>
-              </div>
-            </draggable>
-          </div>
+            </el-scrollbar>
         </div>
-      </el-scrollbar>
-    </div>
-    <div class="center-board">
-      <div class="action-bar">
-        <div class="action-bar-right">
-          <el-button icon="icon-ym icon-ym-pc" :class="{'unActive-btn':showType!='pc'}" type="text"
-            @click="showType='pc'" size="medium">桌面端</el-button>
-          <el-button icon="icon-ym icon-ym-mobile" :class="{'unActive-btn':showType!='app'}"
-            type="text" @click="showType='app'" size="medium">移动端</el-button>
-          <el-button class="unActive-btn" icon="el-icon-video-play" type="text" @click="preview"
-            size="medium">预览</el-button>
-          <!-- <el-button icon="el-icon-view" type="text" @click="showJson" size="medium">
+        <div class="center-board">
+            <div class="action-bar">
+                <div class="action-bar-right">
+                    <el-button icon="icon-ym icon-ym-pc" :class="{'unActive-btn':showType!='pc'}"
+                        type="text" @click="showType='pc'" size="medium">桌面端</el-button>
+                    <el-button icon="icon-ym icon-ym-mobile"
+                        :class="{'unActive-btn':showType!='app'}" type="text"
+                        @click="showType='app'" size="medium">移动端</el-button>
+                    <el-button class="unActive-btn" icon="el-icon-video-play" type="text"
+                        @click="preview" size="medium">预览</el-button>
+                    <!-- <el-button icon="el-icon-view" type="text" @click="showJson" size="medium">
             查看json</el-button> -->
-          <el-button class="delete-btn unActive-btn" icon="icon-ym icon-ym-clean" type="text"
-            @click="empty" size="medium">清空</el-button>
-        </div>
-      </div>
-      <el-scrollbar class="center-scrollbar" v-show="showType==='pc'">
-        <el-row class="center-board-row" :gutter="formConf.gutter">
-          <el-form :size="formConf.size" :label-position="formConf.labelPosition"
-            :disabled="formConf.disabled" :label-width="formConf.labelWidth + 'px'">
-            <draggable class="drawing-board" :list="drawingList" :animation="340"
-              group="componentsGroup" @end='onCenterEnd'>
-              <draggable-item v-for="(element, index) in drawingList" :key="element.renderKey"
-                :drawing-list="drawingList" :element="element" :index="index" :active-id="activeId"
-                :form-conf="formConf" :mergeLeftColDisabled="mergeLeftColDisabled"
-                :mergeRightColDisabled="mergeRightColDisabled"
-                :mergeWholeRowDisabled="mergeWholeRowDisabled"
-                :mergeAboveRowDisabled="mergeAboveRowDisabled"
-                :mergeBelowRowDisabled="mergeBelowRowDisabled"
-                :mergeWholeColDisabled="mergeWholeColDisabled"
-                :undoMergeRowDisabled="undoMergeRowDisabled"
-                :undoMergeColDisabled="undoMergeColDisabled"
-                :deleteWholeColDisabled="deleteWholeColDisabled"
-                :deleteWholeRowDisabled="deleteWholeRowDisabled" @activeItem="activeFormItem"
-                @copyItem="drawingItemCopy" @deleteItem="drawingItemDelete"
-                @addRow="handleTableAddRow" @addCol="handleTableAddCol"
-                @handleTableSetting="handleTableSetting" @handleShowMenu="handleShowMenu"
-                :put="shouldClone" :end='onTableEnd' />
-            </draggable>
-            <div v-show="!drawingList.length" class="empty-info">
-              <img src="@/assets/images/emptyElement.png" alt="" class="empty-img">
+                    <el-button class="delete-btn unActive-btn" icon="icon-ym icon-ym-clean"
+                        type="text" @click="empty" size="medium">清空</el-button>
+                </div>
             </div>
-          </el-form>
-        </el-row>
-      </el-scrollbar>
-      <div id="ipad" v-show="showType==='app'">
-        <div class="outeripad">
-          <div class="ipadbody">
-            <el-scrollbar class="center-scrollbar">
-              <el-row class="center-board-row" :gutter="formConf.gutter">
-                <el-form :size="formConf.size" :label-position="formConf.labelPosition"
-                  :disabled="formConf.disabled" :label-width="formConf.labelWidth + 'px'">
-                  <draggable class="drawing-board" :list="drawingList" :animation="340"
-                    group="componentsGroup" @end='onCenterEnd'>
-                    <draggable-item-app v-for="(element, index) in drawingList"
-                      :key="element.renderKey" :drawing-list="drawingList" :element="element"
-                      :index="index" :active-id="activeId" :form-conf="formConf"
-                      @activeItem="activeFormItem" @copyItem="drawingItemCopy"
-                      @deleteItem="drawingItemDelete" :put="shouldClone" :end='onTableEnd' />
-                  </draggable>
-                  <div v-show="!drawingList.length" class="empty-info app-empty-info">
-                    <img src="@/assets/images/emptyElement.png" alt="" class="empty-img">
-                  </div>
-                </el-form>
-              </el-row>
+            <el-scrollbar class="center-scrollbar" v-show="showType==='pc'">
+                <el-row class="center-board-row" :gutter="formConf.gutter">
+                    <el-form :size="formConf.size" :label-position="formConf.labelPosition"
+                        :disabled="formConf.disabled" :label-width="formConf.labelWidth + 'px'">
+                        <draggable class="drawing-board" :list="drawingList" :animation="340"
+                            group="componentsGroup" @end='onCenterEnd'>
+                            <draggable-item v-for="(element, index) in drawingList"
+                                :key="element.renderKey" :drawing-list="drawingList"
+                                :element="element" :index="index" :active-id="activeId"
+                                :form-conf="formConf" :mergeLeftColDisabled="mergeLeftColDisabled"
+                                :mergeRightColDisabled="mergeRightColDisabled"
+                                :mergeWholeRowDisabled="mergeWholeRowDisabled"
+                                :mergeAboveRowDisabled="mergeAboveRowDisabled"
+                                :mergeBelowRowDisabled="mergeBelowRowDisabled"
+                                :mergeWholeColDisabled="mergeWholeColDisabled"
+                                :undoMergeRowDisabled="undoMergeRowDisabled"
+                                :undoMergeColDisabled="undoMergeColDisabled"
+                                :deleteWholeColDisabled="deleteWholeColDisabled"
+                                :deleteWholeRowDisabled="deleteWholeRowDisabled"
+                                @activeItem="activeFormItem" @copyItem="drawingItemCopy"
+                                @deleteItem="drawingItemDelete" @addRow="handleTableAddRow"
+                                @addCol="handleTableAddCol" @handleTableSetting="handleTableSetting"
+                                @handleShowMenu="handleShowMenu" :put="shouldClone"
+                                :end='onTableEnd' />
+                        </draggable>
+                        <div v-show="!drawingList.length" class="empty-info">
+                            <img src="@/assets/images/emptyElement.png" alt="" class="empty-img">
+                        </div>
+                    </el-form>
+                </el-row>
             </el-scrollbar>
-          </div>
+            <div id="ipad" v-show="showType==='app'">
+                <div class="outeripad">
+                    <div class="ipadbody">
+                        <el-scrollbar class="center-scrollbar">
+                            <el-row class="center-board-row" :gutter="formConf.gutter">
+                                <el-form :size="formConf.size"
+                                    :label-position="formConf.labelPosition"
+                                    :disabled="formConf.disabled"
+                                    :label-width="formConf.labelWidth + 'px'">
+                                    <draggable class="drawing-board" :list="drawingList"
+                                        :animation="340" group="componentsGroup" @end='onCenterEnd'>
+                                        <draggable-item-app v-for="(element, index) in drawingList"
+                                            :key="element.renderKey" :drawing-list="drawingList"
+                                            :element="element" :index="index" :active-id="activeId"
+                                            :form-conf="formConf" @activeItem="activeFormItem"
+                                            @copyItem="drawingItemCopy"
+                                            @deleteItem="drawingItemDelete" :put="shouldClone"
+                                            :end='onTableEnd' />
+                                    </draggable>
+                                    <div v-show="!drawingList.length"
+                                        class="empty-info app-empty-info">
+                                        <img src="@/assets/images/emptyElement.png" alt=""
+                                            class="empty-img">
+                                    </div>
+                                </el-form>
+                            </el-row>
+                        </el-scrollbar>
+                    </div>
+                </div>
+            </div>
         </div>
-      </div>
+        <right-panel :active-data="activeData" :form-conf="formConf"
+            :show-field="!!drawingList.length" @tag-change="tagChange" :modelType="modelType"
+            :webType="webType" :formInfo='getFormInfo' @relationChange="relationChange"
+            :drawingList="drawingList" @setVModel="setVModel" @copyItem="drawingItemCopy" />
+        <json-drawer size="550px" :visible.sync="jsonDrawerVisible" :jsonData="formData"
+            @refresh="refreshJson" />
+        <Preview :visible.sync="previewVisible" :form-data="formData" />
     </div>
-    <right-panel :active-data="activeData" :form-conf="formConf" :show-field="!!drawingList.length"
-      @tag-change="tagChange" :modelType="modelType" :webType="webType" :formInfo='getFormInfo'
-      @relationChange="relationChange" :drawingList="drawingList" @setVModel="setVModel"
-      @copyItem="drawingItemCopy" />
-    <json-drawer size="550px" :visible.sync="jsonDrawerVisible" :jsonData="formData"
-      @refresh="refreshJson" />
-    <Preview :visible.sync="previewVisible" :form-data="formData" />
-  </div>
 </template>
 
 <script>
@@ -110,19 +121,19 @@ import JsonDrawer from './JsonDrawer'
 import RightPanel from './RightPanel'
 import Preview from '../preview'
 import {
-  inputComponents, selectComponents, systemComponents, layoutComponents, formConf
+    inputComponents, selectComponents, systemComponents, layoutComponents, formConf
 } from '@/components/Generator/generator/config'
 import { noVModelList, noTableAllowList, calculateItem, onlinePeculiarList } from '@/components/Generator/generator/comConfig'
 import {
-  exportDefault, beautifierConf, isNumberStr, titleCase, deepClone
+    exportDefault, beautifierConf, isNumberStr, titleCase, deepClone
 } from '@/components/Generator/utils'
 import drawingDefalut from '@/components/Generator/generator/drawingDefalut'
 import DraggableItem from './DraggableItem'
 import DraggableItemApp from './DraggableItemApp'
 import {
-  getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf
+    getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf
 } from '@/components/Generator/utils/db'
-import { validURL,isUrl } from '@/utils/validate'
+import { validURL, isUrl } from '@/utils/validate'
 
 const emptyActiveData = { style: {}, autosize: {} }
 let oldActiveId
@@ -130,799 +141,799 @@ let tempActiveData
 const idGlobal = getIdGlobal()
 
 export default {
-  components: {
-    draggable,
-    render,
-    JsonDrawer,
-    RightPanel,
-    DraggableItem,
-    DraggableItemApp,
-    Preview
-  },
-  props: ['conf', 'modelType', 'webType', 'dbType', 'formInfo'],
-  data() {
-    return {
-      idGlobal: 100,
-      formConf: deepClone(formConf),
-      inputComponents,
-      selectComponents,
-      systemComponents,
-      layoutComponents,
-      labelWidth: 100,
-      drawingList: [],
-      drawingData: {},
-      activeId: null,
-      drawerVisible: false,
-      previewVisible: false,
-      formData: {},
-      dialogVisible: false,
-      jsonDrawerVisible: false,
-      generateConf: null,
-      showFileName: false,
-      activeData: {},
-      saveDrawingListDebounce: debounce(340, saveDrawingList),
-      saveIdGlobalDebounce: debounce(340, saveIdGlobal),
-      isDrawingListChange: true,
-      showTip: true,
-      activeItem: {},
-      activeTableItem: {},
-      showType: 'pc',
-      leftComponents: [
-        {
-          title: '基础控件',
-          list: inputComponents
-        },
-        {
-          title: '高级控件',
-          list: selectComponents
-        },
-        {
-          title: '系统控件',
-          list: systemComponents
-        },
-        {
-          title: '布局控件',
-          list: layoutComponents
-        }
-      ],
-      rowIndex: 0,
-      colIndex: 0,
-      rowData: [],
-      colData: [],
-      selectCell: {
-        __config__: {
-          rowspan: 1,
-          colspan: 1
+    components: {
+        draggable,
+        render,
+        JsonDrawer,
+        RightPanel,
+        DraggableItem,
+        DraggableItemApp,
+        Preview
+    },
+    props: ['conf', 'modelType', 'webType', 'dbType', 'formInfo'],
+    data() {
+        return {
+            idGlobal: 100,
+            formConf: deepClone(formConf),
+            inputComponents,
+            selectComponents,
+            systemComponents,
+            layoutComponents,
+            labelWidth: 100,
+            drawingList: [],
+            drawingData: {},
+            activeId: null,
+            drawerVisible: false,
+            previewVisible: false,
+            formData: {},
+            dialogVisible: false,
+            jsonDrawerVisible: false,
+            generateConf: null,
+            showFileName: false,
+            activeData: {},
+            saveDrawingListDebounce: debounce(340, saveDrawingList),
+            saveIdGlobalDebounce: debounce(340, saveIdGlobal),
+            isDrawingListChange: true,
+            showTip: true,
+            activeItem: {},
+            activeTableItem: {},
+            showType: 'pc',
+            leftComponents: [
+                {
+                    title: '基础控件',
+                    list: inputComponents
+                },
+                {
+                    title: '高级控件',
+                    list: selectComponents
+                },
+                {
+                    title: '系统控件',
+                    list: systemComponents
+                },
+                {
+                    title: '布局控件',
+                    list: layoutComponents
+                }
+            ],
+            rowIndex: 0,
+            colIndex: 0,
+            rowData: [],
+            colData: [],
+            selectCell: {
+                __config__: {
+                    rowspan: 1,
+                    colspan: 1
+                }
+            }
         }
-      }
-    }
-  },
-  provide() {
-    return {
-      getShowType: () => this.showType
-    }
-  },
-  computed: {
-    mergeLeftColDisabled() {
-      if (!this.colData.length) return true
-      return (this.colIndex <= 0) || (this.colData[this.colIndex - 1].__config__.rowspan !== this.selectCell.__config__.rowspan)
-    },
-    mergeRightColDisabled() {
-      if (!this.colData.length) return true
-      let rightColIndex = this.colIndex + this.selectCell.__config__.colspan
-      return (this.colIndex >= this.colData.length - 1) || (rightColIndex > this.colData.length - 1)
-        || (this.colData[rightColIndex].__config__.rowspan !== this.selectCell.__config__.rowspan)
     },
-    mergeWholeRowDisabled() {
-      if (!this.selectCell.__config__ || !this.rowData.length) return true
-      let rowDataChildren = this.rowData[this.rowIndex].__config__.children
-      let startRowspan = rowDataChildren[0].__config__.rowspan
-      let unmatchedFlag = false
-      for (let i = 1; i < rowDataChildren.length; i++) {
-        if (rowDataChildren[i].__config__.rowspan !== startRowspan) {
-          unmatchedFlag = true
-          break;
+    provide() {
+        return {
+            getShowType: () => this.showType
         }
-      }
-      if (unmatchedFlag) return true
-      return (this.colData.length <= 1) || (this.colData.length === this.selectCell.__config__.colspan)
-    },
-    mergeAboveRowDisabled() {
-      if (!this.rowData.length || this.rowIndex <= 0) return true
-      return (this.rowData[this.rowIndex - 1].__config__.children[this.colIndex].__config__.colspan
-        !== this.selectCell.__config__.colspan) || this.rowData[this.rowIndex - 1].__config__.children[this.colIndex].__config__.merged
     },
-    mergeBelowRowDisabled() {
-      if (!this.rowData.length || (this.rowIndex == this.rowData.length)) return true
-      let belowRowIndex = this.rowIndex + this.selectCell.__config__.rowspan
-      return (this.rowIndex >= this.rowData.length - 1) || (belowRowIndex > this.rowData.length - 1)
-        || (this.rowData[belowRowIndex].__config__.children[this.colIndex].__config__.colspan !== this.selectCell.__config__.colspan)
-        || this.rowData[belowRowIndex].__config__.children[this.colIndex].__config__.merged
-    },
-    mergeWholeColDisabled() {
-      if (!this.rowData.length) return true
-      let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
-      let unmatchedFlag = false
-      for (let i = 1; i < this.rowData.length; i++) {
-        if (this.rowData[i].__config__.children[this.colIndex].__config__.colspan !== startColspan) {
-          unmatchedFlag = true
-          break;
+    computed: {
+        mergeLeftColDisabled() {
+            if (!this.colData.length) return true
+            return (this.colIndex <= 0) || (this.colData[this.colIndex - 1].__config__.rowspan !== this.selectCell.__config__.rowspan)
+        },
+        mergeRightColDisabled() {
+            if (!this.colData.length) return true
+            let rightColIndex = this.colIndex + this.selectCell.__config__.colspan
+            return (this.colIndex >= this.colData.length - 1) || (rightColIndex > this.colData.length - 1)
+                || (this.colData[rightColIndex].__config__.rowspan !== this.selectCell.__config__.rowspan)
+        },
+        mergeWholeRowDisabled() {
+            if (!this.selectCell.__config__ || !this.rowData.length) return true
+            let rowDataChildren = this.rowData[this.rowIndex].__config__.children
+            let startRowspan = rowDataChildren[0].__config__.rowspan
+            let unmatchedFlag = false
+            for (let i = 1; i < rowDataChildren.length; i++) {
+                if (rowDataChildren[i].__config__.rowspan !== startRowspan) {
+                    unmatchedFlag = true
+                    break;
+                }
+            }
+            if (unmatchedFlag) return true
+            return (this.colData.length <= 1) || (this.colData.length === this.selectCell.__config__.colspan)
+        },
+        mergeAboveRowDisabled() {
+            if (!this.rowData.length || this.rowIndex <= 0) return true
+            return (this.rowData[this.rowIndex - 1].__config__.children[this.colIndex].__config__.colspan
+                !== this.selectCell.__config__.colspan) || this.rowData[this.rowIndex - 1].__config__.children[this.colIndex].__config__.merged
+        },
+        mergeBelowRowDisabled() {
+            if (!this.rowData.length || (this.rowIndex == this.rowData.length)) return true
+            let belowRowIndex = this.rowIndex + this.selectCell.__config__.rowspan
+            return (this.rowIndex >= this.rowData.length - 1) || (belowRowIndex > this.rowData.length - 1)
+                || (this.rowData[belowRowIndex].__config__.children[this.colIndex].__config__.colspan !== this.selectCell.__config__.colspan)
+                || this.rowData[belowRowIndex].__config__.children[this.colIndex].__config__.merged
+        },
+        mergeWholeColDisabled() {
+            if (!this.rowData.length) return true
+            let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
+            let unmatchedFlag = false
+            for (let i = 1; i < this.rowData.length; i++) {
+                if (this.rowData[i].__config__.children[this.colIndex].__config__.colspan !== startColspan) {
+                    unmatchedFlag = true
+                    break;
+                }
+            }
+            if (unmatchedFlag) return true
+            return (this.rowData.length <= 1) || (this.rowData.length === this.selectCell.__config__.rowspan)
+        },
+        undoMergeRowDisabled() {
+            return this.selectCell.__config__.merged || (this.selectCell.__config__.colspan <= 1)
+        },
+        undoMergeColDisabled() {
+            return this.selectCell.__config__.merged || (this.selectCell.__config__.rowspan <= 1)
+        },
+        deleteWholeColDisabled() {
+            if (!this.rowData.length) return true
+            if (this.rowData[0].__config__.children[0].__config__.colspan === this.rowData[0].__config__.children.length) return true
+            let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
+            let unmatchedFlag = false
+            for (let i = 1; i < this.rowData.length; i++) {
+                if (this.rowData[i].__config__.children[this.colIndex].__config__.colspan !== startColspan) {
+                    unmatchedFlag = true
+                    break;
+                }
+            }
+            if (unmatchedFlag) return true
+            return (this.selectCell.__config__.colspan === this.colData.length)
+        },
+        deleteWholeRowDisabled() {
+            if (!this.rowData.length || this.rowData.length <= this.rowIndex) return true
+            if (this.rowData[0].__config__.children[0].__config__.rowspan === this.rowData.length) return true
+            //整行所有单元格行高不一致不可删除!!
+            let startRowspan = this.rowData[this.rowIndex].__config__.children[0].__config__.rowspan
+            let unmatchedFlag = false
+            for (let i = 1; i < this.rowData[this.rowIndex].__config__.children.length; i++) {
+                if (this.rowData[this.rowIndex].__config__.children[i].__config__.rowspan !== startRowspan) {
+                    unmatchedFlag = true
+                    break;
+                }
+            }
+            if (unmatchedFlag) return true
+            return (this.rowData.length === 1) || (this.selectCell.__config__.rowspan === this.rowData.length)
+        },
+        getFormInfo() {
+            return this.formInfo || {}
         }
-      }
-      if (unmatchedFlag) return true
-      return (this.rowData.length <= 1) || (this.rowData.length === this.selectCell.__config__.rowspan)
     },
-    undoMergeRowDisabled() {
-      return this.selectCell.__config__.merged || (this.selectCell.__config__.colspan <= 1)
-    },
-    undoMergeColDisabled() {
-      return this.selectCell.__config__.merged || (this.selectCell.__config__.rowspan <= 1)
-    },
-    deleteWholeColDisabled() {
-      if (!this.rowData.length) return true
-      if (this.rowData[0].__config__.children[0].__config__.colspan === this.rowData[0].__config__.children.length) return true
-      let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
-      let unmatchedFlag = false
-      for (let i = 1; i < this.rowData.length; i++) {
-        if (this.rowData[i].__config__.children[this.colIndex].__config__.colspan !== startColspan) {
-          unmatchedFlag = true
-          break;
+    watch: {
+        // eslint-disable-next-line func-names
+        'activeData.__config__.label': function (val, oldVal) {
+            // if (
+            //   this.activeData.placeholder === undefined
+            //   || !this.activeData.__config__.tag
+            //   || oldActiveId !== this.activeId
+            // ) {
+            //   return
+            // }
+            // this.activeData.placeholder = this.activeData.placeholder.replace(oldVal, '') + val
+        },
+        activeId: {
+            handler(val) {
+                oldActiveId = val
+            },
+            immediate: true
+        },
+        drawingList: {
+            handler(val) {
+                this.saveDrawingListDebounce(val)
+                if (val.length === 0) {
+                    this.idGlobal = 100
+                    this.activeData = {}
+                }
+                // if (!this.isDrawingListChange) {
+                //   this.isDrawingListChange = true
+                //   return
+                // }
+                this.$emit('drawingListChange')
+            },
+            deep: true
+        },
+        idGlobal: {
+            handler(val) {
+                this.formConf.idGlobal = val
+                // this.saveIdGlobalDebounce(val)
+            },
+            immediate: true
         }
-      }
-      if (unmatchedFlag) return true
-      return (this.selectCell.__config__.colspan === this.colData.length)
     },
-    deleteWholeRowDisabled() {
-      if (!this.rowData.length || this.rowData.length <= this.rowIndex) return true
-      if (this.rowData[0].__config__.children[0].__config__.rowspan === this.rowData.length) return true
-      //整行所有单元格行高不一致不可删除!!
-      let startRowspan = this.rowData[this.rowIndex].__config__.children[0].__config__.rowspan
-      let unmatchedFlag = false
-      for (let i = 1; i < this.rowData[this.rowIndex].__config__.children.length; i++) {
-        if (this.rowData[this.rowIndex].__config__.children[i].__config__.rowspan !== startRowspan) {
-          unmatchedFlag = true
-          break;
+    created() {
+        if (typeof this.conf === 'object' && this.conf !== null) {
+            this.isDrawingListChange = false
+            this.drawingList = deepClone(this.conf.fields)
+            Object.assign(this.formConf, this.conf)
+            this.idGlobal = this.formConf.idGlobal
+            if (this.drawingList.length) this.activeFormItem(this.drawingList[0])
+        } else {
+            this.drawingList = []
+            this.idGlobal = 100
         }
-      }
-      if (unmatchedFlag) return true
-      return (this.rowData.length === 1) || (this.selectCell.__config__.rowspan === this.rowData.length)
-    },
-    getFormInfo() {
-      return this.formInfo || {}
-    }
-  },
-  watch: {
-    // eslint-disable-next-line func-names
-    'activeData.__config__.label': function (val, oldVal) {
-      // if (
-      //   this.activeData.placeholder === undefined
-      //   || !this.activeData.__config__.tag
-      //   || oldActiveId !== this.activeId
-      // ) {
-      //   return
-      // }
-      // this.activeData.placeholder = this.activeData.placeholder.replace(oldVal, '') + val
-    },
-    activeId: {
-      handler(val) {
-        oldActiveId = val
-      },
-      immediate: true
-    },
-    drawingList: {
-      handler(val) {
-        this.saveDrawingListDebounce(val)
-        if (val.length === 0) {
-          this.idGlobal = 100
-          this.activeData = {}
+        if (this.modelType == 1 || this.modelType == 6) {
+            this.leftComponents[1].list = [...this.leftComponents[1].list, calculateItem]
+            this.leftComponents[0].list = [...this.leftComponents[0].list, ...onlinePeculiarList]
         }
-        // if (!this.isDrawingListChange) {
-        //   this.isDrawingListChange = true
-        //   return
-        // }
-        this.$emit('drawingListChange')
-      },
-      deep: true
-    },
-    idGlobal: {
-      handler(val) {
-        this.formConf.idGlobal = val
-        // this.saveIdGlobalDebounce(val)
-      },
-      immediate: true
-    }
-  },
-  created() {
-    if (typeof this.conf === 'object' && this.conf !== null) {
-      this.isDrawingListChange = false
-      this.drawingList = deepClone(this.conf.fields)
-      Object.assign(this.formConf, this.conf)
-      this.idGlobal = this.formConf.idGlobal
-      if (this.drawingList.length) this.activeFormItem(this.drawingList[0])
-    } else {
-      this.drawingList = []
-      this.idGlobal = 100
-    }
-    if (this.modelType == 1 || this.modelType == 6) {
-      this.leftComponents[1].list = [...this.leftComponents[1].list, calculateItem]
-      this.leftComponents[0].list = [...this.leftComponents[0].list, ...onlinePeculiarList]
-    }
-    if (this.webType != 2 || this.modelType == 3 || this.modelType == 6) this.formConf.popupType = 'fullScreen'
-  },
-  mounted() {
-    // fix: firefox 下 拖拽 会新打卡一个选项卡
-    // https://github.com/JakHuang/form-generator/issues/15
-    document.body.ondrop = event => {
-      event.preventDefault()
-      event.stopPropagation()
-    }
-  },
-  methods: {
-    // 供父组件使用 获取表单JSON
-    getData() {
-      return new Promise((resolve, reject) => {
-        if (!this.drawingList.length) {
-          reject({ msg: '表单不允许为空', target: 1 })
-          return
+        if (this.webType != 2 || this.modelType == 3 || this.modelType == 6) this.formConf.popupType = 'fullScreen'
+    },
+    mounted() {
+        // fix: firefox 下 拖拽 会新打卡一个选项卡
+        // https://github.com/JakHuang/form-generator/issues/15
+        document.body.ondrop = event => {
+            event.preventDefault()
+            event.stopPropagation()
         }
-        const loop = list => {
-          for (let i = 0; i < list.length; i++) {
-            const e = list[i]
-            const config = e.__config__
-            if (config.layout === "colFormItem" && !noVModelList.includes(config.jnpfKey) && !e.__vModel__) {
-              reject({ msg: `${config.label}的控件字段不能为空`, target: 1 })
-              break
+    },
+    methods: {
+        // 供父组件使用 获取表单JSON
+        getData() {
+            return new Promise((resolve, reject) => {
+                if (!this.drawingList.length) {
+                    reject({ msg: '表单不允许为空', target: 1 })
+                    return
+                }
+                const loop = list => {
+                    for (let i = 0; i < list.length; i++) {
+                        const e = list[i]
+                        const config = e.__config__
+                        if (config.layout === "colFormItem" && !noVModelList.includes(config.jnpfKey) && !e.__vModel__) {
+                            reject({ msg: `${config.label}的控件字段不能为空`, target: 1 })
+                            break
+                        }
+                        if (e.isStorage == 1 && !e.__vModel__) {
+                            reject({ msg: `${config.label}的控件字段不能为空`, target: 1 })
+                            break
+                        }
+                        if (config.jnpfKey === 'billRule') {
+                            if (!config.rule) {
+                                reject({ msg: '单据组件“单据模板”属性为必填项', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.jnpfKey === 'relationForm') {
+                            if (!e.modelId) {
+                                reject({ msg: '关联表单控件“关联功能”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.relationField) {
+                                reject({ msg: '关联表单控件“显示字段”属性为必填项', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.jnpfKey === 'popupSelect') {
+                            if (!e.interfaceId) {
+                                reject({ msg: '弹窗选择控件“远端数据”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.propsValue) {
+                                reject({ msg: '弹窗选择控件“储存字段”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.relationField) {
+                                reject({ msg: '弹窗选择控件“显示字段”属性为必填项', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.jnpfKey === 'popupTableSelect') {
+                            if (!e.interfaceId) {
+                                reject({ msg: '下拉表格控件“远端数据”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.propsValue) {
+                                reject({ msg: '下拉表格控件“储存字段”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.relationField) {
+                                reject({ msg: '下拉表格控件“显示字段”属性为必填项', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.jnpfKey === 'autoComplete') {
+                            if (!e.interfaceId) {
+                                reject({ msg: '下拉补全控件“远端数据”属性为必填项', target: 1 })
+                                break
+                            }
+                            if (!e.relationField) {
+                                reject({ msg: '下拉补全控件“显示字段”属性为必填项', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.layout === 'rowFormItem' && !config.children.length) {
+                            reject({ msg: `您的${config.label}控件中没有组件`, target: 1 })
+                            break
+                        }
+                        if (config && config.children && Array.isArray(config.children)) {
+                            loop(config.children)
+                        }
+                        if (config.jnpfKey === 'uploadFile') {
+                            if (e.pathType === 'selfPath') {
+                                if (e.isAccount === 0) {
+                                    if (!e.folder) {
+                                        reject({ msg: '请设置自定义路径', target: 1 })
+                                        break
+                                    }
+                                }
+                            }
+                        }
+                        if (config.jnpfKey === 'uploadImg') {
+                            if (e.pathType === 'selfPath') {
+                                if (e.isAccount === 0) {
+                                    if (!e.folder) {
+                                        reject({ msg: '请设置自定义路径', target: 1 })
+                                        break
+                                    }
+                                }
+                            }
+                        }
+                        if (config.jnpfKey === 'link') {
+                            if (e.href && !validURL(e.href)) {
+                                reject({ msg: '请输入正确的链接地址', target: 1 })
+                                break
+                            }
+                        }
+                        if (config.jnpfKey === 'iframe') {
+                            if (e.href && !isUrl(e.href)) {
+                                reject({ msg: '请输入正确的链接地址', target: 1 })
+                                break
+                            }
+                        }
+                    }
+                }
+                loop(this.drawingList)
+                this.AssembleFormData()
+                if (this.formData.hasPrintBtn && (!this.formData.printId || !this.formData.printId.length)) {
+                    reject({ msg: `请选择打印模板`, target: 1 })
+                }
+                resolve({ formData: this.formData, target: 1 })
+            })
+        },
+        //  阻止表格中嵌套行容器
+        shouldClone(to, from, target, event, conf) {
+            const targetConf = target._underlying_vm_
+            const isRowContainer = conf.__config__.cmpType === 'common' && conf.__config__.jnpfKey === 'row'
+            if (isRowContainer) return true
+            if (conf.cmpType === 'custom') return false
+            if (conf.__config__.jnpfKey === 'table') {
+                if (noTableAllowList.includes(targetConf.__config__.jnpfKey)) {
+                    // if (this.showTip) {
+                    //   this.$message.warning(`子表内暂不支持使用该组件`)
+                    //   this.showTip = false
+                    // }
+                    return false
+                }
+                if (targetConf.__config__.layout === 'rowFormItem') return false
+                if (this.$store.getters.hasTable) {
+                    if (!conf.__config__.tableName) {
+                        if (this.showTip) {
+                            this.$message.warning(`子表请先关联数据表`)
+                            this.showTip = false
+                        }
+                        return false
+                    }
+                }
+                this.activeItem = targetConf
+                this.activeTableItem = conf
+            }
+            if (conf.__config__.jnpfKey === 'tableGridTd' && targetConf.__config__.jnpfKey === 'tableGrid') return false
+            return true
+        },
+        activeFormItem(element) {
+            this.activeData = element
+            this.activeId = element.__config__.formId
+        },
+        onEnd(obj) {
+            this.showTip = true
+            if (obj.from !== obj.to) {
+                this.activeData = tempActiveData
+                this.activeId = tempActiveData.__config__.formId
             }
-            if (e.isStorage == 1 && !e.__vModel__) {
-              reject({ msg: `${config.label}的控件字段不能为空`, target: 1 })
-              break
+            if (obj.to.className.indexOf('table-wrapper') > -1) {
+                this.$set(this.activeItem.__config__, 'isSubTable', true)
+                this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
+                if (this.$store.getters.hasTable) {
+                    this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
+                    this.activeItem.__vModel__ = ''
+                }
             }
-            if (config.jnpfKey === 'billRule') {
-              if (!config.rule) {
-                reject({ msg: '单据组件“单据模板”属性为必填项', target: 1 })
-                break
-              }
+        },
+        onCenterEnd(obj) {
+            this.showTip = true
+            if (obj.from == obj.to) return
+            if (obj.to.className.indexOf('table-wrapper') > -1) {
+                this.$set(this.activeItem.__config__, 'isSubTable', true)
+                this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
+                if (this.$store.getters.hasTable) {
+                    this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
+                    this.activeItem.__vModel__ = ''
+                }
             }
-            if (config.jnpfKey === 'relationForm') {
-              if (!e.modelId) {
-                reject({ msg: '关联表单控件“关联功能”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.relationField) {
-                reject({ msg: '关联表单控件“显示字段”属性为必填项', target: 1 })
-                break
-              }
+        },
+        onTableEnd(obj, target, conf) {
+            if (obj.from == obj.to) return
+            if (obj.to.className.indexOf('table-wrapper') < 0) {
+                this.$set(this.activeItem.__config__, 'isSubTable', false)
+                this.$set(this.activeItem.__config__, 'parentVModel', '')
+                if (this.$store.getters.hasTable) this.activeItem.__vModel__ = ''
+            } else {
+                this.$set(this.activeItem.__config__, 'isSubTable', true)
+                this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
+                if (this.$store.getters.hasTable) {
+                    this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
+                    this.activeItem.__vModel__ = ''
+                }
             }
-            if (config.jnpfKey === 'popupSelect') {
-              if (!e.interfaceId) {
-                reject({ msg: '弹窗选择控件“远端数据”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.propsValue) {
-                reject({ msg: '弹窗选择控件“储存字段”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.relationField) {
-                reject({ msg: '弹窗选择控件“显示字段”属性为必填项', target: 1 })
-                break
-              }
+        },
+        addComponent(item) {
+            if (item.__config__.dragDisabled) return
+            const clone = this.cloneComponent(item)
+            this.drawingList.push(clone)
+            this.activeFormItem(clone)
+        },
+        cloneComponent(origin) {
+            const clone = deepClone(origin)
+            const config = clone.__config__
+            config.span = this.formConf.span // 生成代码时,会根据span做精简判断
+            this.createIdAndKey(clone)
+            // clone.placeholder !== undefined && (clone.placeholder += config.label)
+            tempActiveData = clone
+            return tempActiveData
+        },
+        createIdAndKey(item, parent) {
+            const config = item.__config__
+            config.formId = ++this.idGlobal
+            config.renderKey = +new Date() // 改变renderKey后可以实现强制更新组件
+            if (config.layout === 'colFormItem') {
+                if (!this.$store.getters.hasTable) {
+                    // 分割线和按钮不加vModel
+                    if (noVModelList.indexOf(config.jnpfKey) < 0 || item.isStorage == 1) {
+                        item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${this.idGlobal}`)
+                    }
+                } else {
+                    if (noVModelList.indexOf(config.jnpfKey) < 0 || item.isStorage == 1) {
+                        item.__vModel__ = ""
+                    }
+                }
+                if (parent && parent.__vModel__ && parent.__config__.jnpfKey === 'table') {
+                    item.__config__.parentVModel = parent.__vModel__
+                }
+            } else if (config.layout === 'rowFormItem') {
+                if (config.jnpfKey === 'table') {
+                    item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${this.idGlobal}`);
+                }
+                config.componentName = `row${this.idGlobal}`
+                !Array.isArray(config.children) && (config.children = [])
+                // delete config.label // rowFormItem无需配置label属性
             }
-            if (config.jnpfKey === 'popupTableSelect') {
-              if (!e.interfaceId) {
-                reject({ msg: '下拉表格控件“远端数据”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.propsValue) {
-                reject({ msg: '下拉表格控件“储存字段”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.relationField) {
-                reject({ msg: '下拉表格控件“显示字段”属性为必填项', target: 1 })
-                break
-              }
+            if (Array.isArray(config.children)) {
+                config.children = config.children.map(childItem => this.createIdAndKey(childItem, item))
             }
-            if (config.jnpfKey === 'autoComplete') {
-              if (!e.interfaceId) {
-                reject({ msg: '下拉补全控件“远端数据”属性为必填项', target: 1 })
-                break
-              }
-              if (!e.relationField) {
-                reject({ msg: '下拉补全控件“显示字段”属性为必填项', target: 1 })
-                break
-              }
+            return item
+        },
+        setVModel(item) {
+            const config = item.__config__
+            item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${config.formId}`)
+        },
+        toggleVmodelCase(str) {
+            const dbType = this.dbType || ''
+            if (dbType.toLowerCase() === 'Oracle'.toLowerCase() || dbType.toLowerCase() === 'DM'.toLowerCase()) {
+                return str.toUpperCase()
             }
-            if (config.layout === 'rowFormItem' && !config.children.length) {
-              reject({ msg: `您的${config.label}控件中没有组件`, target: 1 })
-              break
+            if (dbType.toLowerCase() === 'PostgreSQL'.toLowerCase() || dbType.toLowerCase() === 'KingBaseES'.toLowerCase()) {
+                return str.toLowerCase()
             }
-            if (config && config.children && Array.isArray(config.children)) {
-              loop(config.children)
+            return str
+        },
+        AssembleFormData() {
+            this.formData = {
+                ...this.formConf,
+                fields: deepClone(this.drawingList),
             }
-            if (config.jnpfKey === 'uploadFile') {
-              if (e.pathType === 'selfPath') {
-                if (e.isAccount === 0) {
-                  if (!e.folder) {
-                    reject({ msg: '请设置自定义路径', target: 1 })
-                    break
-                  }
+        },
+        empty() {
+            this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(() => {
+                this.drawingList = []
+                this.idGlobal = 100
+            }).catch(() => { })
+        },
+        drawingItemCopy(item, parent, isActiveFormItem = true) {
+            let clone = deepClone(item)
+            clone = this.createIdAndKey(clone)
+            parent.push(clone)
+            isActiveFormItem && this.activeFormItem(clone)
+        },
+        drawingItemDelete(index, parent) {
+            parent.splice(index, 1)
+            this.$nextTick(() => {
+                const len = this.drawingList.length
+                if (len) {
+                    this.activeFormItem(this.drawingList[len - 1])
                 }
-              }
+            })
+        },
+        preview() {
+            this.AssembleFormData()
+            this.previewVisible = true
+        },
+        showJson() {
+            this.AssembleFormData()
+            this.jsonDrawerVisible = true
+        },
+        tagChange(newTag) {
+            newTag = this.cloneComponent(newTag)
+            const config = newTag.__config__
+            newTag.__vModel__ = this.activeData.__vModel__
+            config.formId = this.activeId
+            config.span = this.activeData.__config__.span
+            this.activeData.__config__.tag = config.tag
+            this.activeData.__config__.tagIcon = config.tagIcon
+            this.activeData.__config__.document = config.document
+            if (typeof this.activeData.__config__.defaultValue === typeof config.defaultValue) {
+                config.defaultValue = this.activeData.__config__.defaultValue
             }
-            if (config.jnpfKey === 'uploadImg') {
-              if (e.pathType === 'selfPath') {
-                if (e.isAccount === 0) {
-                  if (!e.folder) {
-                    reject({ msg: '请设置自定义路径', target: 1 })
-                    break
-                  }
+            Object.keys(newTag).forEach(key => {
+                if (this.activeData[key] !== undefined) {
+                    newTag[key] = this.activeData[key]
                 }
-              }
+            })
+            this.activeData = newTag
+            this.updateDrawingList(newTag, this.drawingList)
+        },
+        updateDrawingList(newTag, list) {
+            const index = list.findIndex(item => item.__config__.formId === this.activeId)
+            if (index > -1) {
+                list.splice(index, 1, newTag)
+            } else {
+                list.forEach(item => {
+                    if (Array.isArray(item.__config__.children)) this.updateDrawingList(newTag, item.__config__.children)
+                })
             }
-            if (config.jnpfKey === 'link' ) {
-              if (e.href && !validURL(e.href)) {
-                reject({ msg: '请输入正确的链接地址', target: 1 })
-                break
-              }
+        },
+        refreshJson(data) {
+            this.drawingList = deepClone(data.fields)
+            delete data.fields
+            this.formConf = data
+        },
+        relationChange(vmodel) {
+            const loop = list => {
+                for (let i = 0; i < list.length; i++) {
+                    const config = list[i].__config__
+                    if (list[i].relationField && list[i].relationField === list[i].__vModel__) {
+                        list[i].showField = ''
+                    }
+                    if (config && config.children && Array.isArray(config.children)) {
+                        loop(config.children)
+                    }
+                }
             }
-             if ( config.jnpfKey === 'iframe') {
-              if (e.href && !isUrl(e.href)) {
-                reject({ msg: '请输入正确的链接地址', target: 1 })
-                break
-              }
+            loop(this.drawingList)
+        },
+        handleTableAddRow(element, insertPos, cloneRowIdx) {
+            const row = element.__config__.children
+            let rowIdx = (insertPos === undefined) ? row.length : insertPos + row[cloneRowIdx].__config__.children[this.colIndex].__config__.rowspan - 1
+            let newRow = (cloneRowIdx === undefined) ? deepClone(row[row.length - 1]) : deepClone(row[cloneRowIdx])
+            newRow.__config__.children.forEach(col => {
+                col.__config__.formId = ++this.idGlobal
+                col.__config__.merged = false
+                col.__config__.colspan = 1
+                col.__config__.rowspan = 1
+                col.__config__.children = []
+            })
+            newRow.__config__.formId = ++this.idGlobal
+            newRow.__config__.jnpfKey = "tableGridTr"
+            row.splice(rowIdx, 0, newRow)
+        },
+        handleTableAddCol(element, insertPos, cloneRowIdx) {
+            const row = element.__config__.children
+            let colIdx = (insertPos === undefined) ? row[0].__config__.children.length : insertPos  //确定插入列位置
+            row.forEach(item => {
+                let newCol = {
+                    __config__: {
+                        jnpfKey: "tableGridTd",
+                        merged: false,
+                        colspan: 1,
+                        rowspan: 1,
+                        formId: ++this.idGlobal,
+                        children: [],
+                        backgroundColor: '',
+                    }
+                }
+                item.__config__.children.splice(colIdx, 0, newCol)
+            })
+        },
+        mergeTableCol(element, type) {
+            let mergedColIndex = type == 1 ? this.colIndex : this.colIndex + this.colData[this.colIndex].__config__.colspan
+            let remainedColIndex = type == 1 ? this.colIndex - this.colData[this.colIndex - 1].__config__.colspan : this.colIndex
+            const colChildren = this.colData[mergedColIndex].__config__.children
+            const colChildren_ = this.colData[remainedColIndex].__config__.children
+            this.colData[remainedColIndex].__config__.children = [...colChildren_, ...deepClone(colChildren)]
+            let newColspan = this.colData[mergedColIndex].__config__.colspan * 1 + this.colData[remainedColIndex].__config__.colspan * 1
+            this.setPropsOfMergedCols(remainedColIndex, newColspan, this.selectCell.__config__.rowspan)
+        },
+        mergeWholeCol() {
+            let childrenData = this.colData.filter((colItem) => {
+                return !colItem.merged && colItem.__config__.children && colItem.__config__.children.length
+            })
+            if (childrenData && childrenData.length) {
+                childrenData.map((o, i) => {
+                    if (i == 0) this.colData[0].__config__.children = cloneDeep(o.__config__.children);
+                    if (i != 0) this.colData[0].__config__.children.push(...deepClone(o.__config__.children))
+                })
             }
-          }
-        }
-        loop(this.drawingList)
-        this.AssembleFormData()
-        if (this.formData.hasPrintBtn && (!this.formData.printId || !this.formData.printId.length)) {
-          reject({ msg: `请选择打印模板`, target: 1 })
-        }
-        resolve({ formData: this.formData, target: 1 })
-      })
-    },
-    //  阻止表格中嵌套行容器
-    shouldClone(to, from, target, event, conf) {
-      const targetConf = target._underlying_vm_
-      const isRowContainer = conf.__config__.cmpType === 'common' && conf.__config__.jnpfKey === 'row'
-      if (isRowContainer) return true
-      if (conf.cmpType === 'custom') return false
-      if (conf.__config__.jnpfKey === 'table') {
-        if (noTableAllowList.includes(targetConf.__config__.jnpfKey)) {
-          // if (this.showTip) {
-          //   this.$message.warning(`子表内暂不支持使用该组件`)
-          //   this.showTip = false
-          // }
-          return false
-        }
-        if (targetConf.__config__.layout === 'rowFormItem') return false
-        if (this.$store.getters.hasTable) {
-          if (!conf.__config__.tableName) {
-            if (this.showTip) {
-              this.$message.warning(`子表请先关联数据表`)
-              this.showTip = false
+            this.setPropsOfMergedCols(0, this.colData.length, this.colData[this.colIndex].__config__.rowspan)
+        },
+        mergeTableRow(type) {
+            let mergedRowIndex = type == 1 ? this.rowIndex : this.rowIndex + this.selectCell.__config__.rowspan
+            let remainedRowIndex = type == 1 ? this.rowIndex - 1 : this.rowIndex
+            let childrenData = this.rowData[mergedRowIndex].__config__.children[this.colIndex].__config__.children
+            let childrenData_ = this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.children
+            this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.children = [...childrenData_, ...deepClone(childrenData)]
+            let newRowspan = this.rowData[mergedRowIndex].__config__.children[this.colIndex].__config__.rowspan * 1 + this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.rowspan * 1
+            this.setPropsOfMergedRows(remainedRowIndex, this.selectCell.__config__.colspan, newRowspan)
+        },
+        mergeWholeRow() {
+            let childrenData = []
+            this.rowData.forEach(o => {
+                let tempCell = o.__config__.children[this.colIndex]
+                if (!o.__config__.merged && !!o.__config__.children && o.__config__.children.length) {
+                    childrenData.push(tempCell)
+                }
+            })
+            let firstCellOfCol = this.rowData[0].__config__.children[this.colIndex]
+            if (childrenData && childrenData.length) {
+                childrenData.map((o, i) => {
+                    if (i != 0) firstCellOfCol.__config__.children.push(...deepClone(o.__config__.children))
+                })
             }
-            return false
-          }
-        }
-        this.activeItem = targetConf
-        this.activeTableItem = conf
-      }
-      if (conf.__config__.jnpfKey === 'tableGridTd' && targetConf.__config__.jnpfKey === 'tableGrid') return false
-      return true
-    },
-    activeFormItem(element) {
-      this.activeData = element
-      this.activeId = element.__config__.formId
-    },
-    onEnd(obj) {
-      this.showTip = true
-      if (obj.from !== obj.to) {
-        this.activeData = tempActiveData
-        this.activeId = tempActiveData.__config__.formId
-      }
-      if (obj.to.className.indexOf('table-wrapper') > -1) {
-        this.$set(this.activeItem.__config__, 'isSubTable', true)
-        this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
-        if (this.$store.getters.hasTable) {
-          this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
-          this.activeItem.__vModel__ = ''
-        }
-      }
-    },
-    onCenterEnd(obj) {
-      this.showTip = true
-      if (obj.from == obj.to) return
-      if (obj.to.className.indexOf('table-wrapper') > -1) {
-        this.$set(this.activeItem.__config__, 'isSubTable', true)
-        this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
-        if (this.$store.getters.hasTable) {
-          this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
-          this.activeItem.__vModel__ = ''
-        }
-      }
-    },
-    onTableEnd(obj, target, conf) {
-      if (obj.from == obj.to) return
-      if (obj.to.className.indexOf('table-wrapper') < 0) {
-        this.$set(this.activeItem.__config__, 'isSubTable', false)
-        this.$set(this.activeItem.__config__, 'parentVModel', '')
-        if (this.$store.getters.hasTable) this.activeItem.__vModel__ = ''
-      } else {
-        this.$set(this.activeItem.__config__, 'isSubTable', true)
-        this.$set(this.activeItem.__config__, 'parentVModel', this.activeTableItem.__vModel__)
-        if (this.$store.getters.hasTable) {
-          this.$set(this.activeItem.__config__, 'relationTable', this.activeTableItem.__config__.tableName)
-          this.activeItem.__vModel__ = ''
-        }
-      }
-    },
-    addComponent(item) {
-      if (item.__config__.dragDisabled) return
-      const clone = this.cloneComponent(item)
-      this.drawingList.push(clone)
-      this.activeFormItem(clone)
-    },
-    cloneComponent(origin) {
-      const clone = deepClone(origin)
-      const config = clone.__config__
-      config.span = this.formConf.span // 生成代码时,会根据span做精简判断
-      this.createIdAndKey(clone)
-      // clone.placeholder !== undefined && (clone.placeholder += config.label)
-      tempActiveData = clone
-      return tempActiveData
-    },
-    createIdAndKey(item, parent) {
-      const config = item.__config__
-      config.formId = ++this.idGlobal
-      config.renderKey = +new Date() // 改变renderKey后可以实现强制更新组件
-      if (config.layout === 'colFormItem') {
-        if (!this.$store.getters.hasTable) {
-          // 分割线和按钮不加vModel
-          if (noVModelList.indexOf(config.jnpfKey) < 0 || item.isStorage == 1) {
-            item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${this.idGlobal}`)
-          }
-        } else {
-          if (noVModelList.indexOf(config.jnpfKey) < 0 || item.isStorage == 1) {
-            item.__vModel__ = ""
-          }
-        }
-        if (parent && parent.__vModel__ && parent.__config__.jnpfKey === 'table') {
-          item.__config__.parentVModel = parent.__vModel__
-        }
-      } else if (config.layout === 'rowFormItem') {
-        if (config.jnpfKey === 'table') {
-          item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${this.idGlobal}`);
-        }
-        config.componentName = `row${this.idGlobal}`
-        !Array.isArray(config.children) && (config.children = [])
-        // delete config.label // rowFormItem无需配置label属性
-      }
-      if (Array.isArray(config.children)) {
-        config.children = config.children.map(childItem => this.createIdAndKey(childItem, item))
-      }
-      return item
-    },
-    setVModel(item) {
-      const config = item.__config__
-      item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${config.formId}`)
-    },
-    toggleVmodelCase(str) {
-      const dbType = this.dbType || ''
-      if (dbType.toLowerCase() === 'Oracle'.toLowerCase() || dbType.toLowerCase() === 'DM'.toLowerCase()) {
-        return str.toUpperCase()
-      }
-      if (dbType.toLowerCase() === 'PostgreSQL'.toLowerCase() || dbType.toLowerCase() === 'KingBaseES'.toLowerCase()) {
-        return str.toLowerCase()
-      }
-      return str
-    },
-    AssembleFormData() {
-      this.formData = {
-        ...this.formConf,
-        fields: deepClone(this.drawingList),
-      }
-    },
-    empty() {
-      this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(() => {
-        this.drawingList = []
-        this.idGlobal = 100
-      }).catch(() => { })
-    },
-    drawingItemCopy(item, parent, isActiveFormItem = true) {
-      let clone = deepClone(item)
-      clone = this.createIdAndKey(clone)
-      parent.push(clone)
-      isActiveFormItem && this.activeFormItem(clone)
-    },
-    drawingItemDelete(index, parent) {
-      parent.splice(index, 1)
-      this.$nextTick(() => {
-        const len = this.drawingList.length
-        if (len) {
-          this.activeFormItem(this.drawingList[len - 1])
-        }
-      })
-    },
-    preview() {
-      this.AssembleFormData()
-      this.previewVisible = true
-    },
-    showJson() {
-      this.AssembleFormData()
-      this.jsonDrawerVisible = true
-    },
-    tagChange(newTag) {
-      newTag = this.cloneComponent(newTag)
-      const config = newTag.__config__
-      newTag.__vModel__ = this.activeData.__vModel__
-      config.formId = this.activeId
-      config.span = this.activeData.__config__.span
-      this.activeData.__config__.tag = config.tag
-      this.activeData.__config__.tagIcon = config.tagIcon
-      this.activeData.__config__.document = config.document
-      if (typeof this.activeData.__config__.defaultValue === typeof config.defaultValue) {
-        config.defaultValue = this.activeData.__config__.defaultValue
-      }
-      Object.keys(newTag).forEach(key => {
-        if (this.activeData[key] !== undefined) {
-          newTag[key] = this.activeData[key]
-        }
-      })
-      this.activeData = newTag
-      this.updateDrawingList(newTag, this.drawingList)
-    },
-    updateDrawingList(newTag, list) {
-      const index = list.findIndex(item => item.__config__.formId === this.activeId)
-      if (index > -1) {
-        list.splice(index, 1, newTag)
-      } else {
-        list.forEach(item => {
-          if (Array.isArray(item.__config__.children)) this.updateDrawingList(newTag, item.__config__.children)
-        })
-      }
-    },
-    refreshJson(data) {
-      this.drawingList = deepClone(data.fields)
-      delete data.fields
-      this.formConf = data
-    },
-    relationChange(vmodel) {
-      const loop = list => {
-        for (let i = 0; i < list.length; i++) {
-          const config = list[i].__config__
-          if (list[i].relationField && list[i].relationField === list[i].__vModel__) {
-            list[i].showField = ''
-          }
-          if (config && config.children && Array.isArray(config.children)) {
-            loop(config.children)
-          }
-        }
-      }
-      loop(this.drawingList)
-    },
-    handleTableAddRow(element, insertPos, cloneRowIdx) {
-      const row = element.__config__.children
-      let rowIdx = (insertPos === undefined) ? row.length : insertPos + row[cloneRowIdx].__config__.children[this.colIndex].__config__.rowspan - 1
-      let newRow = (cloneRowIdx === undefined) ? deepClone(row[row.length - 1]) : deepClone(row[cloneRowIdx])
-      newRow.__config__.children.forEach(col => {
-        col.__config__.formId = ++this.idGlobal
-        col.__config__.merged = false
-        col.__config__.colspan = 1
-        col.__config__.rowspan = 1
-        col.__config__.children = []
-      })
-      newRow.__config__.formId = ++this.idGlobal
-      newRow.__config__.jnpfKey = "tableGridTr"
-      row.splice(rowIdx, 0, newRow)
-    },
-    handleTableAddCol(element, insertPos, cloneRowIdx) {
-      const row = element.__config__.children
-      let colIdx = (insertPos === undefined) ? row[0].__config__.children.length : insertPos  //确定插入列位置
-      row.forEach(item => {
-        let newCol = {
-          __config__: {
-            jnpfKey: "tableGridTd",
-            merged: false,
-            colspan: 1,
-            rowspan: 1,
-            formId: ++this.idGlobal,
-            children: [],
-            backgroundColor: '',
-          }
-        }
-        item.__config__.children.splice(colIdx, 0, newCol)
-      })
-    },
-    mergeTableCol(element, type) {
-      let mergedColIndex = type == 1 ? this.colIndex : this.colIndex + this.colData[this.colIndex].__config__.colspan
-      let remainedColIndex = type == 1 ? this.colIndex - this.colData[this.colIndex - 1].__config__.colspan : this.colIndex
-      const colChildren = this.colData[mergedColIndex].__config__.children
-      const colChildren_ = this.colData[remainedColIndex].__config__.children
-      this.colData[remainedColIndex].__config__.children = [...colChildren_, ...deepClone(colChildren)]
-      let newColspan = this.colData[mergedColIndex].__config__.colspan * 1 + this.colData[remainedColIndex].__config__.colspan * 1
-      this.setPropsOfMergedCols(remainedColIndex, newColspan, this.selectCell.__config__.rowspan)
-    },
-    mergeWholeCol() {
-      let childrenData = this.colData.filter((colItem) => {
-        return !colItem.merged && colItem.__config__.children && colItem.__config__.children.length
-      })
-      if (childrenData && childrenData.length) {
-        childrenData.map((o, i) => {
-          if (i == 0) this.colData[0].__config__.children = cloneDeep(o.__config__.children);
-          if (i != 0) this.colData[0].__config__.children.push(...deepClone(o.__config__.children))
-        })
-      }
-      this.setPropsOfMergedCols(0, this.colData.length, this.colData[this.colIndex].__config__.rowspan)
-    },
-    mergeTableRow(type) {
-      let mergedRowIndex = type == 1 ? this.rowIndex : this.rowIndex + this.selectCell.__config__.rowspan
-      let remainedRowIndex = type == 1 ? this.rowIndex - 1 : this.rowIndex
-      let childrenData = this.rowData[mergedRowIndex].__config__.children[this.colIndex].__config__.children
-      let childrenData_ = this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.children
-      this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.children = [...childrenData_, ...deepClone(childrenData)]
-      let newRowspan = this.rowData[mergedRowIndex].__config__.children[this.colIndex].__config__.rowspan * 1 + this.rowData[remainedRowIndex].__config__.children[this.colIndex].__config__.rowspan * 1
-      this.setPropsOfMergedRows(remainedRowIndex, this.selectCell.__config__.colspan, newRowspan)
-    },
-    mergeWholeRow() {
-      let childrenData = []
-      this.rowData.forEach(o => {
-        let tempCell = o.__config__.children[this.colIndex]
-        if (!o.__config__.merged && !!o.__config__.children && o.__config__.children.length) {
-          childrenData.push(tempCell)
-        }
-      })
-      let firstCellOfCol = this.rowData[0].__config__.children[this.colIndex]
-      if (childrenData && childrenData.length) {
-        childrenData.map((o, i) => {
-          if (i != 0) firstCellOfCol.__config__.children.push(...deepClone(o.__config__.children))
-        })
-      }
-      this.setPropsOfMergedRows(0, firstCellOfCol.__config__.colspan, this.rowData.length)
-    },
-    undoMergeCol() {
-      this.setPropsOfSplitCol(this.colIndex, this.selectCell.__config__.colspan, this.selectCell.__config__.rowspan)
-    },
-    undoMergeRow() {
-      this.setPropsOfSplitRow(this.colIndex, this.selectCell.__config__.colspan, this.selectCell.__config__.rowspan)
-    },
-    deleteWholeCol() {
-      let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
-      this.rowData.forEach((rItem) => {
-        rItem.__config__.children.splice(this.colIndex, startColspan)
-      })
-    },
-    deleteWholeRow() {
-      let startRowspan = this.rowData[this.rowIndex].__config__.children[0].__config__.rowspan
-      this.rowData.splice(this.rowIndex, startRowspan)
-    },
-    setPropsOfMergedCols(startColIndex, newColspan, rowspan) {
-      for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
-        for (let j = startColIndex; j < startColIndex + newColspan; j++) {
-          if ((i === this.rowIndex) && (j === startColIndex)) {
-            this.rowData[i].__config__.children[j].__config__.colspan = newColspan
-            continue
-          }
-          this.rowData[i].__config__.children[j].__config__.merged = true
-          this.rowData[i].__config__.children[j].__config__.colspan = newColspan
-          this.rowData[i].__config__.children[j].__config__.children = []
-        }
-      }
-    },
-    setPropsOfMergedRows(startRowIndex, colspan, newRowspan, colIndex) {
-      if (!colIndex) colIndex = this.colIndex
-      for (let i = startRowIndex; i < startRowIndex + newRowspan; i++) {
-        for (let j = colIndex; j < colIndex + colspan; j++) {
-          if ((i === startRowIndex) && (j === colIndex)) {
-            this.rowData[i].__config__.children[j].__config__.rowspan = newRowspan
-            continue
-          }
-          this.rowData[i].__config__.children[j].__config__.merged = true
-          this.rowData[i].__config__.children[j].__config__.rowspan = newRowspan
-          this.rowData[i].__config__.children[j].__config__.children = []
-        }
-      }
-    },
-    setPropsOfSplitCol(startColIndex, colspan, rowspan) {
-      for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
-        for (let j = startColIndex; j < startColIndex + colspan; j++) {
-          this.rowData[i].__config__.children[j].__config__.merged = false;
-          this.rowData[i].__config__.children[j].__config__.rowspan = 1
-          this.rowData[i].__config__.children[j].__config__.colspan = 1
-        }
-      }
-    },
-    setPropsOfSplitRow(startColIndex, colspan, rowspan) {
-      for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
-        for (let j = startColIndex; j < startColIndex + colspan; j++) {
-          this.rowData[i].__config__.children[j].__config__.merged = false;
-          this.rowData[i].__config__.children[j].__config__.rowspan = 1
-          this.rowData[i].__config__.children[j].__config__.colspan = 1
-        }
-      }
-    },
-    handleTableSetting(e, element) {
-      switch (e) {
-        case '1':
-          //插入左侧列
-          this.handleTableAddCol(element, this.colIndex)
-          break;
-        case '2':
-          //插入右侧列
-          this.handleTableAddCol(element, this.colIndex + 1)
-          break;
-        case '3':
-          //插入上方行
-          this.handleTableAddRow(element, this.rowIndex, this.rowIndex)
-          break;
-        case '4':
-          //插入下方行
-          this.handleTableAddRow(element, this.rowIndex + 1, this.rowIndex)
-          break;
-        case '5':
-          //向左合并
-          this.mergeTableCol(element, 1)
-          break;
-        case '6':
-          //向右合并
-          this.mergeTableCol(element)
-          break;
-        case '7':
-          //合并整行
-          this.mergeWholeCol(element)
-          break;
-        case '8':
-          //向上合并
-          this.mergeTableRow(1)
-          break;
-        case '9':
-          //向下合并
-          this.mergeTableRow()
-          break;
-        case '10':
-          //合并整列
-          this.mergeWholeRow()
-          break;
-        case '11':
-          //撤销行合并
-          this.undoMergeCol()
-          break;
-        case '12':
-          //撤销列合并
-          this.undoMergeRow()
-          break;
-        case '13':
-          //删除整列
-          this.deleteWholeCol()
-          break;
-        case '14':
-          //删除整行
-          this.deleteWholeRow()
-          break;
-        default:
-          break;
-      }
-      this.resetData()
-    },
-    resetData() {
-      this.rowIndex = 0,
-        this.colIndex = 0,
-        this.rowData = [],
-        this.colData = [],
-        this.selectCell = {
-          __config__: {
-            rowspan: 1,
-            colspan: 1
-          }
+            this.setPropsOfMergedRows(0, firstCellOfCol.__config__.colspan, this.rowData.length)
+        },
+        undoMergeCol() {
+            this.setPropsOfSplitCol(this.colIndex, this.selectCell.__config__.colspan, this.selectCell.__config__.rowspan)
+        },
+        undoMergeRow() {
+            this.setPropsOfSplitRow(this.colIndex, this.selectCell.__config__.colspan, this.selectCell.__config__.rowspan)
+        },
+        deleteWholeCol() {
+            let startColspan = this.rowData[0].__config__.children[this.colIndex].__config__.colspan
+            this.rowData.forEach((rItem) => {
+                rItem.__config__.children.splice(this.colIndex, startColspan)
+            })
+        },
+        deleteWholeRow() {
+            let startRowspan = this.rowData[this.rowIndex].__config__.children[0].__config__.rowspan
+            this.rowData.splice(this.rowIndex, startRowspan)
+        },
+        setPropsOfMergedCols(startColIndex, newColspan, rowspan) {
+            for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
+                for (let j = startColIndex; j < startColIndex + newColspan; j++) {
+                    if ((i === this.rowIndex) && (j === startColIndex)) {
+                        this.rowData[i].__config__.children[j].__config__.colspan = newColspan
+                        continue
+                    }
+                    this.rowData[i].__config__.children[j].__config__.merged = true
+                    this.rowData[i].__config__.children[j].__config__.colspan = newColspan
+                    this.rowData[i].__config__.children[j].__config__.children = []
+                }
+            }
+        },
+        setPropsOfMergedRows(startRowIndex, colspan, newRowspan, colIndex) {
+            if (!colIndex) colIndex = this.colIndex
+            for (let i = startRowIndex; i < startRowIndex + newRowspan; i++) {
+                for (let j = colIndex; j < colIndex + colspan; j++) {
+                    if ((i === startRowIndex) && (j === colIndex)) {
+                        this.rowData[i].__config__.children[j].__config__.rowspan = newRowspan
+                        continue
+                    }
+                    this.rowData[i].__config__.children[j].__config__.merged = true
+                    this.rowData[i].__config__.children[j].__config__.rowspan = newRowspan
+                    this.rowData[i].__config__.children[j].__config__.children = []
+                }
+            }
+        },
+        setPropsOfSplitCol(startColIndex, colspan, rowspan) {
+            for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
+                for (let j = startColIndex; j < startColIndex + colspan; j++) {
+                    this.rowData[i].__config__.children[j].__config__.merged = false;
+                    this.rowData[i].__config__.children[j].__config__.rowspan = 1
+                    this.rowData[i].__config__.children[j].__config__.colspan = 1
+                }
+            }
+        },
+        setPropsOfSplitRow(startColIndex, colspan, rowspan) {
+            for (let i = this.rowIndex; i < this.rowIndex + rowspan; i++) {
+                for (let j = startColIndex; j < startColIndex + colspan; j++) {
+                    this.rowData[i].__config__.children[j].__config__.merged = false;
+                    this.rowData[i].__config__.children[j].__config__.rowspan = 1
+                    this.rowData[i].__config__.children[j].__config__.colspan = 1
+                }
+            }
+        },
+        handleTableSetting(e, element) {
+            switch (e) {
+                case '1':
+                    //插入左侧列
+                    this.handleTableAddCol(element, this.colIndex)
+                    break;
+                case '2':
+                    //插入右侧列
+                    this.handleTableAddCol(element, this.colIndex + 1)
+                    break;
+                case '3':
+                    //插入上方行
+                    this.handleTableAddRow(element, this.rowIndex, this.rowIndex)
+                    break;
+                case '4':
+                    //插入下方行
+                    this.handleTableAddRow(element, this.rowIndex + 1, this.rowIndex)
+                    break;
+                case '5':
+                    //向左合并
+                    this.mergeTableCol(element, 1)
+                    break;
+                case '6':
+                    //向右合并
+                    this.mergeTableCol(element)
+                    break;
+                case '7':
+                    //合并整行
+                    this.mergeWholeCol(element)
+                    break;
+                case '8':
+                    //向上合并
+                    this.mergeTableRow(1)
+                    break;
+                case '9':
+                    //向下合并
+                    this.mergeTableRow()
+                    break;
+                case '10':
+                    //合并整列
+                    this.mergeWholeRow()
+                    break;
+                case '11':
+                    //撤销行合并
+                    this.undoMergeCol()
+                    break;
+                case '12':
+                    //撤销列合并
+                    this.undoMergeRow()
+                    break;
+                case '13':
+                    //删除整列
+                    this.deleteWholeCol()
+                    break;
+                case '14':
+                    //删除整行
+                    this.deleteWholeRow()
+                    break;
+                default:
+                    break;
+            }
+            this.resetData()
+        },
+        resetData() {
+            this.rowIndex = 0,
+                this.colIndex = 0,
+                this.rowData = [],
+                this.colData = [],
+                this.selectCell = {
+                    __config__: {
+                        rowspan: 1,
+                        colspan: 1
+                    }
+                }
+        },
+        handleShowMenu(element, rowIndex, colIndex) {
+            this.rowIndex = rowIndex
+            this.colIndex = colIndex
+            this.rowData = element.__config__.children
+            this.colData = this.rowData[rowIndex].__config__.children
+            this.selectCell = this.colData[colIndex]
         }
-    },
-    handleShowMenu(element, rowIndex, colIndex) {
-      this.rowIndex = rowIndex
-      this.colIndex = colIndex
-      this.rowData = element.__config__.children
-      this.colData = this.rowData[rowIndex].__config__.children
-      this.selectCell = this.colData[colIndex]
     }
-  }
 }
 </script>
 <style lang='scss'>

+ 79 - 76
src/components/JNPF-tableOperation/index.vue

@@ -1,85 +1,88 @@
 <template>
-  <div class="jnpf-table-opts">
-    <!--左侧插槽-->
-    <slot name="left" />
-    <template v-if="isJudgePer">
-      <el-button size="mini" type="text" @click="edit()" v-if="hasEdit" :disabled="editDisabled"
-        v-has="editPerCode">{{ editText === '编辑' ? $t(`common.editBtn`) : editText }}</el-button>
-    </template>
-    <template v-else>
-      <el-button size="mini" type="text" @click="edit()" v-if="hasEdit" :disabled="editDisabled">
-        {{ editText === '编辑' ? $t(`common.editBtn`) : editText }}</el-button>
-    </template>
-    <!-- 中间插槽 -->
-    <slot name="center" />
-    <template v-if="isJudgePer">
-      <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="del()" v-if="hasDel"
-        :disabled="delDisabled" v-has="delPerCode">
-        {{ delText === '删除' ? $t(`common.delBtn`) : delText }}</el-button>
-    </template>
-    <template v-else>
-      <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="del()" v-if="hasDel"
-        :disabled="delDisabled">{{ delText === '删除' ? $t(`common.delBtn`) : delText }}</el-button>
-    </template>
-    <!-- 默认右侧插槽 -->
-    <slot />
-  </div>
+    <div class="jnpf-table-opts">
+        <!--左侧插槽-->
+        <slot name="left" />
+        <template v-if="isJudgePer">
+            <el-button size="mini" type="text" @click="edit()" v-if="hasEdit"
+                :disabled="editDisabled"
+                v-has="editPerCode">{{ editText === '编辑' ? $t(`common.editBtn`) : editText }}</el-button>
+        </template>
+        <template v-else>
+            <el-button size="mini" type="text" @click="edit()" v-if="hasEdit"
+                :disabled="editDisabled">
+                {{ editText === '编辑' ? $t(`common.editBtn`) : editText }}</el-button>
+        </template>
+        <!-- 中间插槽 -->
+        <slot name="center" />
+        <template v-if="isJudgePer">
+            <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="del()"
+                v-if="hasDel" :disabled="delDisabled" v-has="delPerCode">
+                {{ delText === '删除' ? $t(`common.delBtn`) : delText }}</el-button>
+        </template>
+        <template v-else>
+            <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="del()"
+                v-if="hasDel"
+                :disabled="delDisabled">{{ delText === '删除' ? $t(`common.delBtn`) : delText }}</el-button>
+        </template>
+        <!-- 默认右侧插槽 -->
+        <slot />
+    </div>
 </template>
 <script>
 export default {
-  props: {
-    delText: {
-      type: String,
-      default: '删除'
+    props: {
+        delText: {
+            type: String,
+            default: '删除'
+        },
+        editText: {
+            type: String,
+            default: '编辑'
+        },
+        // 是否展示编辑按钮
+        hasEdit: {
+            type: Boolean,
+            default: true
+        },
+        // 是否展示删除按钮
+        hasDel: {
+            type: Boolean,
+            default: true
+        },
+        editDisabled: {
+            type: Boolean,
+            default: false
+        },
+        delDisabled: {
+            type: Boolean,
+            default: false
+        },
+        // 编辑按钮权限标识
+        editPerCode: {
+            type: String,
+            default: 'btn_edit'
+        },
+        // 删除按钮权限标识
+        delPerCode: {
+            type: String,
+            default: 'btn_remove'
+        },
+        // 是否开启权限判断
+        isJudgePer: {
+            type: Boolean,
+            default: false
+        },
     },
-    editText: {
-      type: String,
-      default: '编辑'
+    data() {
+        return {}
     },
-    // 是否展示编辑按钮
-    hasEdit: {
-      type: Boolean,
-      default: true
-    },
-    // 是否展示删除按钮
-    hasDel: {
-      type: Boolean,
-      default: true
-    },
-    editDisabled: {
-      type: Boolean,
-      default: false
-    },
-    delDisabled: {
-      type: Boolean,
-      default: false
-    },
-    // 编辑按钮权限标识
-    editPerCode: {
-      type: String,
-      default: 'btn_edit'
-    },
-    // 删除按钮权限标识
-    delPerCode: {
-      type: String,
-      default: 'btn_remove'
-    },
-    // 是否开启权限判断
-    isJudgePer: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data() {
-    return {}
-  },
-  methods: {
-    del() {
-      this.$emit('del')
-    },
-    edit() {
-      this.$emit('edit')
+    methods: {
+        del() {
+            this.$emit('del')
+        },
+        edit() {
+            this.$emit('edit')
+        }
     }
-  }
 }
 </script>

+ 1 - 1
src/components/Jnpf/UserSelect/index.vue

@@ -57,7 +57,7 @@
                                     <span class="custom-tree-node" slot-scope="{ node, data }"
                                         :title="node.label">
                                         <i :class="data.icon"></i>
-                                        <span class="text">{{node.label}}123</span>
+                                        <span class="text">{{node.label}}</span>
                                     </span>
                                 </el-tree>
                                 <div class="single-list" ref="infiniteBody" v-if="isAsync"

+ 12 - 12
src/mixins/generator/index.js

@@ -6,24 +6,24 @@ export default {
       list: [],
       category: '',
       enableFlow: '',
-      webType:'',
-      isRelease:'',
+      webType: '',
+      isRelease: '',
       listQuery: {
         currentPage: 1,
         pageSize: 20,
         sort: 'desc',
         sidx: ''
       },
-      options:[
-      { fullName: '普通表单', id: 1 },
-      { fullName: '流程表单', id: 2 },
-      { fullName: '数据视图', id: 4 }
-    ],
-    releaseOptions: [
-      { fullName: '未发布', id: 0 },
-      { fullName: '已发布', id: 1 },
-      { fullName: '已修改', id: 2 },
-    ],
+      options: [
+        { fullName: '普通表单', id: 1 },
+        { fullName: '流程表单', id: 2 },
+        { fullName: '数据视图', id: 4 }
+      ],
+      releaseOptions: [
+        { fullName: '未发布', id: 0 },
+        { fullName: '已发布', id: 1 },
+        { fullName: '已修改', id: 2 },
+      ],
       total: 0,
       listLoading: false,
       formVisible: false,

+ 2 - 2
src/utils/apiUrl.js

@@ -1,6 +1,6 @@
 module.exports = {
   // 开发环境接口配置
-  // APIURl: "https://test.api.shidaiyun.net"
-  APIURl: "http://localhost:30000"
+  APIURl: "https://test.api.shidaiyun.net"
+  // APIURl: "http://10.21.12.169:30000"
   // APIURl: "https://api.shidaiyun.net"
 };

+ 2 - 0
src/views/governmentCloud/bureauSystemManage/index.vue

@@ -169,6 +169,8 @@ export default {
             findOrganizeList()
                 .then(res => {
                     this.treeData = res.data;
+                    console.log(this.treeData)
+
                     this.$nextTick(() => {
                         this.treeLoading = false;
                         if (isInit) this.initData();

+ 350 - 0
src/views/governmentCloud/processConfiguration/Allocation.vue

@@ -0,0 +1,350 @@
+<template>
+    <el-dialog :visible.sync="visible" fullscreen lock-scroll class="JNPF-full-dialog"
+        :show-close="false" :modal="false">
+        <div class="main">
+            <div class="top">
+                <div class="top-title" v-if="visible">
+                    <div style="opacity: 0.5;">ITSM流程接入配置</div> /
+                    <div>表单配置管理</div> /
+                    <div style="font-size: 20px;font-weight: bold;"> {{order.mscodeProName}}
+                    </div>
+                </div>
+            </div>
+            <div class="content">
+                <div class="left-part">
+                    <el-scrollbar class="left-scrollbar">
+                        <div class="components-list">
+                            <div v-for="(item, listIndex) in leftComponents" :key="listIndex"
+                                class="components-part">
+                                <div class="components-title">{{ item.title }}</div>
+                                <draggable class="components-draggable" :list="item.list"
+                                    :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
+                                    :clone="cloneComponent" draggable=".components-item"
+                                    filter=".disabled" :sort="false" @end="onEnd">
+                                    <div v-for="(element, index) in item.list" :key="index"
+                                        class="components-item"
+                                        :class="{'disabled':element.dragDisabled }"
+                                        @click="addComponent(element)">
+                                        <div class="components-body">
+                                            <i :class="element.tagIcon" />
+                                            {{ element.label }}
+                                        </div>
+                                    </div>
+                                </draggable>
+                            </div>
+                        </div>
+                    </el-scrollbar>
+                </div>
+                <div class="center-part">
+                    <div class="part-top">
+                        <div class="left">
+                            <el-tabs v-model="centerTabActive" @tab-click="changeCenterTabActive">
+                                <el-tab-pane label="表单页面" name="1">
+                                    <span slot="label"><i class="el-icon-tickets"></i> 表单页面</span>
+                                </el-tab-pane>
+                                <el-tab-pane label="详情页面" name="2">
+                                    <span slot="label"><i class="el-icon-document"></i> 详情页面</span>
+                                </el-tab-pane>
+                                <el-tab-pane label="流程基本信息" name="3">
+                                    <span slot="label"><i class="el-icon-notebook-1"></i>
+                                        流程基本信息</span>
+                                </el-tab-pane>
+                            </el-tabs>
+                        </div>
+                        <div class="right">
+                            <el-button type="primary" @click="">保存</el-button>
+                            <el-button @click="closeDialog()">取消</el-button>
+                            <el-button @click="resetForm()">重置</el-button>
+                        </div>
+                    </div>
+                    <div class="part-content">
+                        <el-form size="small" label-position="left" :disabled="false"
+                            :label-width="'100' + 'px'">
+                            <draggable class="drawing-board" :list="drawingList" :animation="340"
+                                group="componentsGroup" @end='onCenterEnd'>
+                                <div v-for="(item,index) in drawingList" :key="index"
+                                    v-if="drawingList.length>0">
+                                    <el-form-item :label="item.label">
+                                        <el-input v-if="item.type == 'INPUT'" v-model="item.value"
+                                            placeholder="请输入内容"></el-input>
+                                        <el-input v-if="item.type == 'TEXTAREA'"
+                                            v-model="item.value" placeholder="请输入内容"
+                                            type="textarea" />
+                                        <el-input v-if="item.type == 'NUMBER'" v-model="item.value"
+                                            placeholder="请输入内容" type="number" />
+                                        <el-radio-group v-if="item.type == 'RADIO'"
+                                            v-model="item.value">
+                                            <el-radio v-for="(radio,radioIndex) in item.options"
+                                                :key="radioIndex" :value="radio.value"
+                                                :label="radio.label">{{ radio.label }}</el-radio>
+                                        </el-radio-group>
+                                        <el-checkbox-group v-if="item.type == 'CHECKBOX'"
+                                            v-model="item.value">
+                                            <el-checkbox
+                                                v-for="(checkbox,checkboxIndex) in item.options"
+                                                :key="checkboxIndex" :value="checkbox.value"
+                                                :label="checkbox.label" name="type">
+                                                {{ checkbox.label }}
+                                            </el-checkbox>
+                                        </el-checkbox-group>
+                                    </el-form-item>
+                                </div>
+                            </draggable>
+                            <img v-show="!drawingList.length" src="@/assets/images/emptyElement.png"
+                                alt="" class="empty-img" style="">
+                        </el-form>
+                    </div>
+                </div>
+                <div class="right-part">3</div>
+            </div>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import {
+    deepClone
+} from '@/components/Generator/utils'
+import draggable from 'vuedraggable'
+
+export default {
+    components: { draggable },
+    data() {
+        return {
+            visible: false,
+            order: null,//流程数据
+            leftComponents: [
+                {
+                    title: '基础组件',
+                    list: [
+                        {
+                            label: '单行输入',
+                            tagIcon: "icon-ym icon-ym-generator-input",
+                            type: 'INPUT',
+                            dragDisabled: false,
+                            span: 24,
+                            value: ''
+                        },
+                        {
+                            label: '多行输入',
+                            tagIcon: "icon-ym icon-ym-generator-textarea",
+                            type: 'TEXTAREA',
+                            dragDisabled: false,
+                            span: 24,
+                            value: ''
+                        },
+                        {
+                            label: '数字输入',
+                            tagIcon: "icon-ym icon-ym-generator-number",
+                            type: 'NUMBER',
+                            dragDisabled: false,
+                            span: 24,
+                            value: ''
+                        },
+                        {
+                            label: '单选框组',
+                            tagIcon: "icon-ym icon-ym-generator-radio",
+                            type: 'RADIO',
+                            dragDisabled: false,
+                            span: 24,
+                            value: '1',
+                            options: [{
+                                value: '1',
+                                label: '选项1'
+                            },
+                            {
+                                value: '2',
+                                label: '选项2'
+                            }]
+                        },
+                        {
+                            label: '多选框组',
+                            tagIcon: "icon-ym icon-ym-generator-checkbox",
+                            type: 'CHECKBOX',
+                            dragDisabled: false,
+                            span: 24,
+                            value: ['1'],
+                            options: [{
+                                value: '1',
+                                label: '选项1'
+                            },
+                            {
+                                value: '2',
+                                label: '选项2'
+                            }, {
+                                value: '3',
+                                label: '选项3'
+                            }]
+                        }
+                    ]
+                }
+            ],
+            centerTabActive: '1', //中间tab active值
+            drawingList: [],//中间列表
+            activeData: null,
+            activeId: ''
+        }
+    },
+    methods: {
+        init1(order) {
+            console.log(order)
+            this.order = order
+            this.visible = true
+        },
+        //关闭配置页面
+        closeDialog() {
+            this.$emit("close");
+        },
+        //改变中部tab值
+        changeCenterTabActive(tab) {
+            this.centerTabActive = tab.name
+        },
+        //克隆
+        cloneComponent(origin) {
+            const clone = deepClone(origin)
+            const config = clone
+            config.span = 24
+            // this.createIdAndKey(clone)
+            // clone.placeholder !== undefined && (clone.placeholder += config.label)
+            let tempActiveData = null
+            tempActiveData = clone
+            return tempActiveData
+        },
+        // 左侧点击增加组件
+        addComponent(item) {
+            if (item.dragDisabled) return
+            const clone = this.cloneComponent(item)
+            this.drawingList.push(clone)
+            console.log(this.drawingList)
+            this.activeFormItem(clone)
+        },
+        //更新当前选中item
+        activeFormItem(element) {
+            this.activeData = element
+            // this.activeId = element.__config__.formId
+        },
+        resetForm() {
+            this.drawingList = []
+        },
+        //左侧end
+        onEnd(obj) {
+            console.log(obj)
+        },
+        //中间end
+        onCenterEnd(obj) {
+            console.log(obj)
+        }
+
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.main {
+    background-color: #f0f2f5;
+    padding: 0;
+    min-height: 100vh;
+    .top {
+        background-color: #fff;
+        width: 100%;
+        height: 7%;
+        padding: 20px;
+        .top-title {
+            margin-left: 0px;
+            display: flex;
+            font-size: 18px;
+            align-items: center;
+            div {
+                margin: 0 10px;
+            }
+        }
+    }
+    .content {
+        padding: 20px;
+        width: 100%;
+        height: 93%;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        .left-part {
+            width: 20%;
+            min-width: 20%;
+            height: 100%;
+            .components-list {
+                width: 100%;
+                .components-part {
+                    background-color: #fff;
+                    padding: 20px;
+                    border-radius: 5px;
+                    .components-title {
+                        font-size: 16px;
+                        font-weight: bold;
+                        margin-bottom: 10px;
+                    }
+                    .components-draggable {
+                        display: flex;
+                        align-items: center;
+                        justify-content: space-between;
+                        flex-wrap: wrap;
+                        .components-item {
+                            width: 47%;
+                            margin-bottom: 10px;
+                            cursor: pointer;
+                            .components-body {
+                                padding: 10px;
+                                background-color: #f3f9ff;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        .center-part {
+            background-color: #fff;
+            padding: 20px;
+            width: 58%;
+            height: 100%;
+            .part-top {
+                height: 7%;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                margin-bottom: 10px;
+                ::v-deep {
+                    .el-tabs .el-tabs__header {
+                        margin-bottom: 0px;
+                        border: none;
+                        background-color: transparent;
+                    }
+                }
+            }
+            .part-content {
+                height: 90%;
+                position: relative;
+                .drawing-board {
+                    height: 100%;
+                    position: relative;
+                }
+                .el-form {
+                    width: 100%;
+                    height: 100%;
+                }
+                img {
+                    width: 80%;
+                    height: auto;
+                    position: absolute;
+                    top: 50%;
+                    left: 50%;
+                    transform: translate(-50%, -50%);
+                }
+            }
+        }
+        .right-part {
+            background-color: #fff;
+            padding: 20px;
+            width: 20%;
+            height: 100%;
+        }
+    }
+}
+</style>

+ 413 - 0
src/views/governmentCloud/processConfiguration/Form.vue

@@ -0,0 +1,413 @@
+<template>
+    <div v-if="visible">
+        <transition name="el-zoom-in-center">
+            <div class="JNPF-preview-main user-form">
+                <div class="JNPF-common-page-header">
+                    <el-page-header @back="goBack" content="" />
+                    <div class="header-title">
+                        <div style="opacity: 0.5;">ITSM流程接入配置</div> /
+                        <div>表单配置管理</div> /
+                        <div style="font-size: 20px;font-weight: bold;"> {{order.mscodeProName}}
+                        </div>
+
+                    </div>
+                    <!-- <div class="options">
+                    <el-button type="primary" :loading="btnLoading" @click="handleConfirm()">
+                        {{ $t("common.confirmButton") }}</el-button>
+                    <el-button @click="goBack">{{ $t("common.cancelButton") }}
+                    </el-button>
+                </div> -->
+                </div>
+                <div class="main">
+                    <div class="JNPF-common-layout-left">
+                        <div class="button-div" v-if="treeData.length">
+                            <el-button style="width: 100%;" type="primary">同步流程表单</el-button>
+                        </div>
+                        <div class="JNPF-common-title">
+                            <h2 style="color: #339dff;">历史版本</h2>
+                            <span class="options">
+                                <el-dropdown>
+                                    <el-link icon="icon-ym icon-ym-mpMenu" :underline="false" />
+                                    <el-dropdown-menu slot="dropdown">
+                                        <el-dropdown-item
+                                            @click.native="init()">刷新数据</el-dropdown-item>
+                                    </el-dropdown-menu>
+                                </el-dropdown>
+                            </span>
+                        </div>
+                        <div class="JNPF-common-tree-search-box">
+                            <el-input placeholder="输入关键字" v-model="filterText"
+                                suffix-icon="el-icon-search" clearable />
+                        </div>
+                        <el-scrollbar class="JNPF-common-el-tree-scrollbar" v-loading="treeLoading">
+                            <el-tree ref="treeBox" :data="treeData" :props="defaultProps"
+                                :default-expand-all="expands" highlight-current
+                                :expand-on-click-node="false" node-key="id"
+                                @node-click="handleNodeClick" class="JNPF-common-el-tree"
+                                v-if="refreshTree" :filter-node-method="filterNode">
+                                <span class="custom-tree-node" slot-scope="{ data }"
+                                    :title="data.label">
+                                    <i :class="data.icon" />
+                                    <span class="text" :title="data.label">{{ data.label }}</span>
+                                </span>
+                            </el-tree>
+                        </el-scrollbar>
+                    </div>
+                    <div class="JNPF-common-layout-center JNPF-flex-main">
+                        <el-row class="JNPF-common-search-box" :gutter="16"
+                            style="margin-bottom: 10px;padding-top: 0px;">
+                            <div class="JNPF-common-head">
+                                <el-button v-if="treeData.length == 0" type="primary"
+                                    @click="submit()">同步流程表单</el-button>
+                                <div v-else style="width: 100%;">
+                                    <div class="top-setting">
+                                        <div class="left">
+                                            <span style="margin-right: 10px">是否生效</span>
+                                            <el-switch v-model="value1">
+                                            </el-switch>
+                                            <i style="font-size: 20px;color: #8d8d8d;margin: 0 5px;"
+                                                class="el-icon-warning-outline">
+                                            </i>
+                                            <span>注:开启后会将其他版本置为无效</span>
+                                        </div>
+
+                                        <div class="right">
+                                            <div class="miniapp" style="margin-right: 50px;">
+                                                <img
+                                                    src="@/assets/images/processConfiguration/wxmp.png" />
+                                                <span @click="showAllocation()">小程序端配置</span>
+                                            </div>
+                                            <div class="qywx">
+                                                <img style="width: 25px;"
+                                                    src="@/assets/images/processConfiguration/qywx.png" />
+                                                <span>企微端配置</span>
+                                            </div>
+                                        </div>
+                                    </div>
+
+                                </div>
+                                <!-- <div class="JNPF-common-head-right">
+                                <el-tooltip effect="dark" :content="$t('common.refresh')"
+                                    placement="top">
+                                    <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                        :underline="false" @click="initData()" />
+                                </el-tooltip>
+                            </div> -->
+                            </div>
+                        </el-row>
+                        <el-row class="JNPF-common-search-box basic-information" :gutter="16"
+                            style="margin-bottom: 10px;padding-top: 0px;">
+                            <div class="title">
+                                基础信息
+                            </div>
+                            <div class="content">
+                                <div class="info">
+                                    <div class="info-item">
+                                        <div class="label">流程名称:</div>
+                                        <div class="value"></div>
+                                    </div>
+                                    <div class="info-item">
+                                        <div class="label">流程类型:</div>
+                                        <div class="value"></div>
+                                    </div>
+                                    <div class="info-item">
+                                        <div class="label">流程编码:</div>
+                                        <div class="value"></div>
+                                    </div>
+                                    <div class="info-item">
+                                        <div class="label">工单前缀:</div>
+                                        <div class="value"></div>
+                                    </div>
+                                    <div class="info-item">
+                                        <div class="label">流程描述:</div>
+                                        <div class="value"></div>
+                                    </div>
+                                </div>
+                                <div class="foot">
+                                    更新时间:2024年6月19日18点07分
+                                </div>
+                            </div>
+                        </el-row>
+                        <div class="JNPF-common-layout-main JNPF-flex-main basic-table">
+                            <div class="title">
+                                表单信息
+                            </div>
+                            <JNPF-table v-loading="listLoading" :data="tableData" :hasNO="false"
+                                @selection-change="handleSelectionChange">
+                                <el-table-column align="center" prop="" label="字段名" />
+                                <el-table-column align="center" prop="" label="字段编码" />
+                                <el-table-column align="center" prop="" label="字段类型" />
+
+                            </JNPF-table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </transition>
+        <Allocation v-if="allocationVisible" ref="Allocation" @close="closeAllocation" />
+    </div>
+
+</template>
+
+<script>
+import {
+    findAllNotVisibleOrganizeList,
+    findAllNotVisibleSystemListByOrganizeId,
+    updateRelationList
+} from "@/api/governmentCloud/officeSystemPermissions/officeSystemPermissions";
+import Allocation from './Allocation'
+
+export default {
+    components: { Allocation },
+    data() {
+        return {
+            visible: false,
+            btnLoading: false,
+            listLoading: true,
+            treeLoading: false,
+            organizeId: null,
+            filterText: "",
+            userId: null,
+            userMobilePhone: null,
+
+            refreshTree: true,
+            treeData: [
+                {
+                    children: null,
+                    data: "qita",
+                    dictId: "6541148fb81748a3ae4fd0a80af2e2b4",
+                    id: "7358c5fe470949f983f0340c5705a494",
+                    label: "其他厅局",
+                    level: 1,
+                    notVisible: null,
+                    parentId: "0",
+                }
+            ],
+            defaultProps: {
+                children: "children",
+                label: "fullName"
+            },
+            expands: true,
+            listQuery: {
+                organizeId: "",
+                systemName: ""
+            },
+            tableData: [],
+            multipleSelection: null,
+
+            order: null,
+
+
+            value1: false, //是否生效 临时
+
+
+            allocationVisible: false,//配置页面是否展示
+        };
+    },
+    watch: {
+        filterText(val) {
+            console.log(val);
+            this.$refs.treeBox.filter(val);
+        }
+    },
+    methods: {
+        // 打开配置页
+        showAllocation() {
+            console.log(this.order)
+            this.allocationVisible = true
+            this.$refs.Allocation.init1(this.order)
+        },
+        //关闭配置页
+        closeAllocation() {
+            this.allocationVisible = false;
+        },
+        //保存修改
+        submit() {
+            console.log(this.multipleSelection);
+            let data = [];
+            this.multipleSelection.map(item => {
+                let obj = {
+                    itsmOrganizeId: this.listQuery.organizeId || this.treeData[0].id,
+                    itsmSystemId: item.id,
+                    visible: item.notVisible ? "0" : "1",
+                    userId: this.userId,
+                    userMobile: this.userMobilePhone,
+                    itsmSystemData: item.data
+                };
+                data.push(obj);
+            });
+
+            updateRelationList(data, this.userId).then(res => {
+                console.log(res);
+                if (res.code == 200) {
+                    this.$message({
+                        type: "success",
+                        message: res.msg,
+                        duration: 1000
+                    });
+                    this.initData();
+                }
+            });
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+            console.log(selection);
+            this.multipleSelection = selection;
+            this.$nextTick(() => {
+                // this.changePageCoreRecordData();
+            });
+        },
+        filterNode(value, data) {
+            if (!value) return true;
+            return data.label.indexOf(value) !== -1;
+        },
+        handleNodeClick(data, node) {
+            console.log(data);
+            if (this.listQuery.organizeId === data.id) return;
+            this.listQuery.organizeId = data.id;
+            this.reset();
+        },
+        search() {
+            this.initData();
+        },
+        reset() {
+            this.listQuery.systemName = "";
+            this.search();
+        },
+        init(row) {
+            console.log(row)
+
+            this.order = row
+
+            this.visible = true;
+            this.filterText = "";
+            this.treeLoading = true;
+            this.treeLoading = false;
+            this.listLoading = false
+
+        },
+        initData() {
+            this.listLoading = true;
+            let organizeId = "";
+            if (this.listQuery.organizeId) {
+                organizeId = this.listQuery.organizeId;
+            } else {
+                organizeId = this.treeData[0].id;
+            }
+            findAllNotVisibleSystemListByOrganizeId(
+                organizeId,
+                this.listQuery.systemName || "",
+                this.userId
+            )
+                .then(res => {
+                    this.listLoading = false;
+                    this.tableData = res.data;
+                })
+                .catch(() => {
+                    this.listLoading = false;
+                });
+        },
+        goBack() {
+            this.$emit("close");
+        },
+        handleConfirm() { }
+    }
+};
+</script>
+<style lang="scss" scoped>
+.user-form {
+    .header-title {
+        margin-left: 0px;
+        display: flex;
+        font-size: 18px;
+        align-items: center;
+        div {
+            margin: 0 10px;
+        }
+    }
+    .main {
+        padding: 10px 0px 0;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        background-color: #e3e6ec;
+        .button-div {
+            padding: 15px 10px 0;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+        .top-setting {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            width: 100%;
+            span {
+                padding-top: 4px;
+            }
+            .left {
+                display: flex;
+                align-items: center;
+                color: #8d8d8d;
+            }
+            .right {
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                div {
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    img {
+                        width: 20px;
+                        height: 20px;
+                        margin-right: 5px;
+                    }
+                    span {
+                        cursor: pointer;
+                        &:hover {
+                            color: #1890ff;
+                        }
+                    }
+                }
+            }
+        }
+        .basic-information {
+            .title {
+                padding: 15px;
+                font-size: 16px;
+                color: #1890ff;
+                border-bottom: 1px solid #8d8d8d50;
+            }
+            .content {
+                padding: 15px;
+                font-size: 14px;
+                .info {
+                    display: flex;
+                    justify-content: space-between;
+                    align-items: center;
+                    flex-wrap: wrap;
+                    .info-item {
+                        width: 50%;
+                        padding: 10px 0;
+                        color: #8d8d8d;
+                    }
+                }
+                .foot {
+                    display: flex;
+                    justify-content: flex-end;
+                    color: #1890ff;
+                }
+            }
+        }
+        .basic-table {
+            .title {
+                padding: 15px;
+                font-size: 16px;
+                color: #1890ff;
+                border-bottom: 1px solid #8d8d8d50;
+            }
+        }
+    }
+}
+</style>

+ 165 - 147
src/views/governmentCloud/processConfiguration/index.vue

@@ -1,167 +1,185 @@
 <template>
-  <div class="JNPF-common-layout">
-    <div class="JNPF-common-layout-center JNPF-flex-main">
-      <el-row class="JNPF-common-search-box" :gutter="16">
-        <el-form @submit.native.prevent>
-          <el-col :span="6">
-            <el-form-item label="流程名称">
-              <el-input
-                v-model="listQuery.itsmProName"
-                placeholder="流程名称"
-                clearable
-                @keyup.enter.native="getList()"
-                @clear="getList()"
-              />
-            </el-form-item>
-          </el-col>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center JNPF-flex-main" v-if="!formVisible">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item label="流程名称或编号">
+                            <el-input v-model="listQuery.itsmProName" placeholder="请输入流程名称或编号"
+                                clearable @keyup.enter.native="getList()" @clear="getList()" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="状态">
+                            <el-select v-model="listQuery.status" placeholder="请选择状态">
+                                <el-option label="启用" value="1"></el-option>
+                                <el-option label="禁用" value="0"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
 
-          <el-col :span="6">
-            <el-form-item>
-              <el-button
-                type="primary"
-                icon="el-icon-search"
-                @click="getList()"
-              >
-                {{ $t("common.search") }}</el-button
-              >
-              <el-button icon="el-icon-refresh-right" @click="reset()"
-                >{{ $t("common.reset") }}
-              </el-button>
-            </el-form-item>
-          </el-col>
-        </el-form>
-      </el-row>
-      <div class="JNPF-common-layout-main JNPF-flex-main">
-        <!-- <div class="JNPF-common-head">
-          <el-button type="primary" icon="el-icon-plus" @click="addTeam()"
-            >新建</el-button
-          >
-          <div class="JNPF-common-head-right">
-            <el-tooltip
-              effect="dark"
-              :content="$t('common.refresh')"
-              placement="top"
-            >
-              <el-link
-                icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
-                :underline="false"
-                @click="initData()"
-              />
-            </el-tooltip>
-          </div>
-        </div> -->
-        <JNPF-table v-loading="listLoading" :data="tableData">
-          <el-table-column prop="itsmProName" label="流程名称" />
-          <el-table-column prop="itsmProKey" label="流程编号" />
-          <el-table-column prop="icon" label="流程图标">
-            <template slot-scope="scope" sortable>
-              <img style="width: 40px;height: 40px;" :src="'https://oss.shidaiyun.net/'+scope.row.icon"></img>
-            </template>
-          </el-table-column>
-           <el-table-column prop="wx" label="可用范围"  align="center">
-            <template slot-scope="scope" sortable>
-              <template v-if="scope.row.used == '1'">
-                <span v-if="scope.row.used == '1'" style="margin-right: 10px;color: #13afff;">企业微信可用</span>
-                <span v-if="scope.row.used == '1' && scope.row.wx == 1" style="color: #1ed76d;">小程序可用</span>
-              </template>
-              <template v-else>
-                <span>均不可用</span>
-              </template>
-            </template>
-          </el-table-column>
-          
-          <!-- <el-table-column label="操作" width="150" fixed="right">
-            <template slot-scope="scope">
-              <tableOpts
-                @edit="editTeam(scope.row, scope.row.id)"
-                @del="deleteTeam(scope.row.id)"
-              >
-              </tableOpts>
-            </template>
-          </el-table-column> -->
-        </JNPF-table>
-        <!-- <pagination
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" @click="getList()">
+                                {{ $t("common.search") }}</el-button>
+                            <el-button icon="el-icon-refresh-right"
+                                @click="reset()">{{ $t("common.reset") }}
+                            </el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head" style="justify-content: flex-start;">
+                    <el-button type="primary" @click="">一键同步所有流程</el-button>
+                    <el-button type="primary" @click="">一键同步所有流程及表单</el-button>
+                    <!-- <div class="JNPF-common-head-right">
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div> -->
+                </div>
+                <JNPF-table v-loading="listLoading" :data="tableData" :hasNO="false">
+                    <el-table-column align="center" prop="itsmProName" label="流程名称" />
+                    <el-table-column align="center" prop="itsmProKey" label="流程编号" />
+                    <el-table-column align="center" prop="" label="流程分类" />
+                    <el-table-column align="center" prop="" label="工单编号前缀" />
+                    <el-table-column align="center" prop="" label="版本号" />
+                    <el-table-column align="center" prop="" label="状态" />
+                    <el-table-column align="center" prop="" label="更新时间" />
+                    <!-- <el-table-column prop="icon" label="流程图标">
+                        <template slot-scope="scope" sortable>
+                            <img style="width: 40px;height: 40px;"
+                                :src="'https://oss.shidaiyun.net/'+scope.row.icon"></img>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="wx" label="可用范围" align="center">
+                        <template slot-scope="scope" sortable>
+                            <template v-if="scope.row.used == '1'">
+                                <span v-if="scope.row.used == '1'"
+                                    style="margin-right: 10px;color: #13afff;">企业微信可用</span>
+                                <span v-if="scope.row.used == '1' && scope.row.wx == 1"
+                                    style="color: #1ed76d;">小程序可用</span>
+                            </template>
+                            <template v-else>
+                                <span>均不可用</span>
+                            </template>
+                        </template>
+                    </el-table-column> -->
+
+                    <el-table-column align="center" label="操作" width="150" fixed="right">
+                        <template slot-scope="scope" sortable>
+                            <div>
+                                <el-button style="width: 100%;margin-left: 10px;" size="mini"
+                                    type="text" @click="editTeam(scope.row,scope.row.id)">表单配置
+                                </el-button>
+                                <el-button style="width: 100%;" size="mini" type="text"
+                                    @click="edit()">历史版本
+                                </el-button>
+                                <el-button style="width: 100%;" size="mini" type="text"
+                                    @click="edit()">同步版本及表单
+                                </el-button>
+                            </div>
+                        </template>
+
+                    </el-table-column>
+                </JNPF-table>
+                <!-- <pagination
           :total="total"
           :page.sync="listQuery.currentPage"
           :limit.sync="listQuery.pageSize"
           @pagination="getList"
         /> -->
-      </div>
+            </div>
+        </div>
+        <Form v-if="formVisible" ref="Form" @close="closeForm" />
+
     </div>
-  </div>
 </template>
 
 <script>
 import { getProModelListByQYWX } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+import Form from './Form'
 
 export default {
-  name: "process-configuration",
-  components: {},
-  data() {
-    return {
-      tableData: [],
-      listLoading: false,
-      // organizeIdTree: [],
-      listQuery: {
-        currentPage: 1,
-        pageSize: 100,
-        modelType: "",
-        itsmProName: ""
-      },
-      total: 0
-    };
-  },
-  watch: {},
-  created() {
-    this.getList();
-  },
-  methods: {
-    getList() {
-      this.listLoading = true;
-      getProModelListByQYWX(this.listQuery)
-        .then(res => {
-          console.log(res);
-          for (let key in res.data) {
-            console.log(res.data[key]);
-            this.tableData = this.tableData.concat(res.data[key]);
-          }
-          console.log(this.tableData);
-          // this.total = res.data.total;
-          this.listLoading = false;
-        })
-        .catch(() => {
-          this.listLoading = false;
-        });
-    },
-    addTeam() {
-      this.formVisible = true;
-      this.$nextTick(() => {
-        this.$refs.Form.init("1");
-      });
-    },
-    editTeam(row, id) {
-      this.formVisible = true;
-      console.log(row);
-      console.log(id);
-      this.$nextTick(() => {
-        this.$refs.Form.init("2", row, id);
-      });
+    name: "process-configuration",
+    components: { Form },
+    data() {
+        return {
+            tableData: [],
+            listLoading: false,
+            // organizeIdTree: [],
+            listQuery: {
+                currentPage: 1,
+                pageSize: 100,
+                status: "",
+                itsmProName: ""
+            },
+            total: 0,
+            formVisible: false
+        };
     },
-    deleteTeam(id) {
-      delSysTeam(id).then(res => {
-        this.$message({
-          message: "删除成功",
-          type: "success",
-          duration: 1500
-        });
-        this.listLoading = true;
+    watch: {},
+    created() {
         this.getList();
-      });
     },
-    reset() {
-      this.listQuery.name = "";
-      this.getList();
+    methods: {
+        //编辑流程
+        editFlow(item) {
+            console.log(item)
+            this.formVisible = true
+            this.$refs.Form.init(item.itsmProKey)
+        },
+        getList() {
+            this.listLoading = true;
+            getProModelListByQYWX(this.listQuery)
+                .then(res => {
+                    console.log(res);
+                    for (let key in res.data) {
+                        console.log(res.data[key]);
+                        this.tableData = this.tableData.concat(res.data[key]);
+                    }
+                    console.log(this.tableData);
+                    // this.total = res.data.total;
+                    this.listLoading = false;
+                })
+                .catch(() => {
+                    this.listLoading = false;
+                });
+        },
+        closeForm() {
+            this.formVisible = false;
+        },
+        addTeam() {
+            this.formVisible = true;
+            this.$nextTick(() => {
+                this.$refs.Form.init("1");
+            });
+        },
+        editTeam(row, id) {
+            this.formVisible = true;
+            console.log(row);
+            console.log(id);
+            this.$nextTick(() => {
+                this.$refs.Form.init(row, id);
+            });
+        },
+        deleteTeam(id) {
+            delSysTeam(id).then(res => {
+                this.$message({
+                    message: "删除成功",
+                    type: "success",
+                    duration: 1500
+                });
+                this.listLoading = true;
+                this.getList();
+            });
+        },
+        reset() {
+            this.listQuery.name = "";
+            this.getList();
+        }
     }
-  }
 };
 </script>

+ 1 - 1
src/views/login/index.vue

@@ -102,7 +102,7 @@ export default {
         if (this.otherQuery.code) {
             let params = {
                 code: this.otherQuery.code,
-                redirectUri: "https://www.shidaiyun.net:9002"
+                redirectUri: "https://www.shidaiyun.net:9006"
             };
             this.$store.commit("user/SET_LOGIN_LOADING", true);
             this.$store

+ 153 - 0
src/views/msgCenter/accountConfig/wxAppConfig/Form.vue

@@ -0,0 +1,153 @@
+<template>
+    <el-dialog :title="!dataForm.id ? '新建' : '编辑'" :close-on-click-modal="false"
+        :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
+        <el-form ref="dataForm" :model="dataForm" :rules="dataRule" v-loading="formLoading"
+            label-width="140px">
+            <jnpf-form-tip-item label="名称" prop="fullName">
+                <el-input v-model="dataForm.fullName" placeholder="请输入名称" clearable />
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="编码" prop="enCode">
+                <el-input v-model="dataForm.enCode" placeholder="请输入编码" clearable />
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="appId" prop="appId" tip-label="请在“小程序管理后台”中获得">
+                <el-input v-model="dataForm.appId" placeholder="请输入小程序appId" clearable />
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="小程序Secret" prop="appSecret" tip-label="请在“小程序管理后台”中获得">
+                <el-input v-model="dataForm.appSecret" placeholder="请输入小程序Secret" show-password
+                    clearable>
+                    <el-button slot="append" :disabled="btnLoading" @click="sendTest()">测试
+                    </el-button>
+                </el-input>
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="排序" prop="sortCode">
+                <el-input-number :min="0" :max="999999" v-model="dataForm.sortCode"
+                    controls-position="right" />
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="状态" prop="enabledMark">
+                <el-switch v-model="dataForm.enabledMark" :active-value="1" :inactive-value="0" />
+            </jnpf-form-tip-item>
+            <jnpf-form-tip-item label="说明" prop="description">
+                <el-input v-model="dataForm.description" type="textarea" :rows="3" />
+            </jnpf-form-tip-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <!-- <el-button type="primary" :loading="testBtnLoading" :disabled="btnLoading"
+        @click="sendTest()">测试</el-button> -->
+            <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
+            <el-button type="primary" :loading="btnLoading" :disabled="testBtnLoading"
+                @click="dataFormSubmit()">
+                {{$t('common.confirmButton')}}</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import {
+    createConfig,
+    updateConfig,
+    getConfigDetail,
+    testConfig
+} from '@/api/msgCenter/accountConfig'
+export default {
+    data() {
+        return {
+            visible: false,
+            formLoading: false,
+            btnLoading: false,
+            testBtnLoading: false,
+            dataForm: {
+                fullName: '',
+                enCode: '',
+                appId: "",
+                appSecret: "",
+                sortCode: 0,
+                enabledMark: 1,
+                description: ''
+            },
+            categoryList: [],
+            dataRule: {
+                fullName: [
+                    { required: true, message: '请输入名称', trigger: 'blur' },
+                    { max: 50, message: '名称最多为50个字符!', trigger: 'blur' }
+                ],
+                enCode: [
+                    { required: true, message: '请输入编码', trigger: 'blur' },
+                    { max: 50, message: '编码最多为50个字符!', trigger: 'blur' },
+                    { validator: this.formValidate('enCode'), trigger: 'blur' },
+                ],
+                appId: [
+                    { required: true, message: '请输入小程序appId', trigger: 'blur' },
+                ],
+                appSecret: [
+                    { required: true, message: '请输入小程序Secret', trigger: 'blur' }
+                ]
+            }
+        }
+    },
+    methods: {
+        init(id) {
+            this.dataForm.id = id || ''
+            this.visible = true
+            this.formLoading = true
+            this.$nextTick(() => {
+                this.$refs['dataForm'].resetFields()
+                if (this.dataForm.id) {
+                    getConfigDetail(this.dataForm.id).then(res => {
+                        this.dataForm = res.data
+                    })
+                }
+            })
+            this.formLoading = false
+        },
+        sendTest() {
+            this.$refs['dataForm'].validate((valid) => {
+                if (valid) {
+                    this.testBtnLoading = true
+                    let query = {
+                        ...this.dataForm,
+                        type: 'WXMP'
+                    }
+                    testConfig(query, 'testWxmpWebChatConnect').then(res => {
+                        this.$message({
+                            type: 'success',
+                            message: res.msg,
+                            duration: 1000,
+                            onClose: () => {
+                                this.testBtnLoading = false
+                            }
+                        });
+                    }).catch(() => {
+                        this.testBtnLoading = false
+                    })
+                }
+            })
+        },
+        dataFormSubmit() {
+            this.$refs['dataForm'].validate((valid) => {
+                if (valid) {
+                    let query = {
+                        ...this.dataForm,
+                        type: 'WXMP'
+                    }
+                    this.btnLoading = true
+                    const formMethod = this.dataForm.id ? updateConfig : createConfig
+                    formMethod(query).then(res => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1500,
+                            onClose: () => {
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refreshDataList')
+                            }
+                        })
+                    }).catch(() => {
+                        this.btnLoading = false
+                    })
+                }
+            })
+        }
+    }
+}
+</script>

+ 208 - 0
src/views/msgCenter/accountConfig/wxAppConfig/index.vue

@@ -0,0 +1,208 @@
+<template>
+    <div class="JNPF-common-layout">
+        <div class="JNPF-common-layout-center">
+            <el-row class="JNPF-common-search-box" :gutter="16">
+                <el-form @submit.native.prevent>
+                    <el-col :span="6">
+                        <el-form-item label="关键词">
+                            <el-input v-model="keyword" placeholder="请输入关键词查询" clearable
+                                @keyup.enter.native="search()" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item label="状态">
+                            <el-select v-model="enabledMark" placeholder="请选择状态" clearable>
+                                <el-option v-for="item in categoryList" :key="item.enCode"
+                                    :label="item.fullName" :value="item.enCode">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="6">
+                        <el-form-item>
+                            <el-button type="primary" icon="el-icon-search" @click="search()">
+                                {{$t('common.search')}}</el-button>
+                            <el-button icon="el-icon-refresh-right"
+                                @click="reset()">{{$t('common.reset')}}
+                            </el-button>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="JNPF-common-layout-main JNPF-flex-main">
+                <div class="JNPF-common-head">
+                    <topOpts @add="addOrUpdateHandle()">
+                        <!-- <upload-btn url="/api/message/AccountConfig/Action/Import" @on-success="initData" /> -->
+                    </topOpts>
+                    <div class="JNPF-common-head-right">
+                        <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
+                            <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                :underline="false" @click="initData()" />
+                        </el-tooltip>
+                    </div>
+                </div>
+                <JNPF-table v-loading="listLoading" :data="list">
+                    <el-table-column prop="fullName" label="名称" show-overflow-tooltip
+                        min-width="120" />
+                    <el-table-column prop="enCode" label="编码" width="150" />
+                    <el-table-column prop="creatorUser" label="创建人" width="120" />
+                    <el-table-column prop="creatorTime" label="创建时间"
+                        :formatter="jnpf.tableDateFormat" width="120" />
+                    <el-table-column prop="lastModifyTime" label="最后修改时间"
+                        :formatter="jnpf.tableDateFormat" width="120" />
+                    <el-table-column prop="sortCode" label="排序" width="70" align="center" />
+                    <el-table-column prop="enabledMark" label="状态" width="70" align="center">
+                        <template slot-scope="scope">
+                            <el-tag :type="scope.row.enabledMark == 1 ? 'success' : 'danger'"
+                                disable-transitions>
+                                {{scope.row.enabledMark==1?'启用':'禁用'}}</el-tag>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" width="150">
+                        <template slot-scope="scope">
+                            <tableOpts @edit="addOrUpdateHandle(scope.row.id)"
+                                @del="handleDel(scope.row.id)">
+                                <el-dropdown>
+                                    <span class="el-dropdown-link">
+                                        <el-button type="text"
+                                            size="mini">{{$t('common.moreBtn')}}<i
+                                                class="el-icon-arrow-down el-icon--right"></i>
+                                        </el-button>
+                                    </span>
+                                    <el-dropdown-menu slot="dropdown">
+                                        <el-dropdown-item
+                                            @click.native="copy(scope.row.id)">复制</el-dropdown-item>
+                                        <!-- <el-dropdown-item @click.native="exportTpl(scope.row.id)">导出</el-dropdown-item> -->
+                                    </el-dropdown-menu>
+                                </el-dropdown>
+                            </tableOpts>
+                        </template>
+                    </el-table-column>
+                </JNPF-table>
+                <pagination :total="total" :page.sync="listQuery.currentPage"
+                    :limit.sync="listQuery.pageSize" @pagination="initData" />
+            </div>
+        </div>
+        <Form v-if="formVisible" ref="Form" @refreshDataList="initData" />
+    </div>
+</template>
+
+<script>
+import Form from './Form'
+import {
+    getConfigList,
+    delConfig,
+    copyConfig,
+    exportConfig
+} from '@/api/msgCenter/accountConfig'
+export default {
+    name: 'msgCenter-accountConfig-weCom',
+    components: { Form },
+    data() {
+        return {
+            list: [],
+            categoryList: [{ fullName: '启用', enCode: 1 }, { fullName: '禁用', enCode: 0 }],
+            keyword: '',
+            listQuery: {
+                currentPage: 1,
+                pageSize: 20,
+                sort: 'desc',
+                sidx: ''
+            },
+            total: 0,
+            listLoading: true,
+            formVisible: false,
+            enabledMark: '',
+        }
+    },
+    created() {
+        this.initData()
+    },
+    methods: {
+        reset() {
+            this.keyword = ''
+            this.enabledMark = ''
+            this.search()
+        },
+        search() {
+            this.listQuery = {
+                currentPage: 1,
+                pageSize: 20,
+                sort: 'desc',
+                sidx: ''
+            }
+            this.initData()
+        },
+
+        initData() {
+            this.listLoading = true
+            let query = {
+                ...this.listQuery,
+                keyword: this.keyword,
+                enabledMark: this.enabledMark,
+                type: 'WXMP'
+            }
+            getConfigList(query).then(res => {
+                this.list = res.data.list
+                this.total = res.data.pagination.total
+                this.listLoading = false
+            }).catch(() => {
+                this.listLoading = false
+            })
+        },
+        addOrUpdateHandle(id) {
+            this.formVisible = true
+            this.$nextTick(() => {
+                this.$refs.Form.init(id)
+            })
+        },
+        copy(id) {
+            this.$confirm('您确定要复制该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                copyConfig(id).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        duration: 1000,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    });
+                })
+            }).catch(() => { });
+        },
+        exportTpl(id) {
+            this.$confirm('您确定要导出该数据, 是否继续?', '提示', {
+                type: 'warning'
+            }).then(() => {
+                exportConfig(id).then(res => {
+                    this.jnpf.downloadFile(res.data.url)
+                })
+            }).catch(() => { });
+        },
+        closeForm(isRefresh) {
+            this.formVisible = false
+            if (isRefresh) {
+                this.initData()
+            }
+        },
+        handleDel(id) {
+            this.$confirm(this.$t('common.delTip'), this.$t('common.tipTitle'), {
+                type: 'warning'
+            }).then(() => {
+                delConfig(id).then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: res.msg,
+                        duration: 1500,
+                        onClose: () => {
+                            this.initData()
+                        }
+                    })
+                })
+            }).catch(() => { })
+        },
+    }
+}
+</script>

+ 709 - 560
src/views/msgCenter/msgTemplate/Form.vue

@@ -1,596 +1,745 @@
 <template>
-  <transition name="el-zoom-in-center">
-    <div class="JNPF-preview-main flow-form-main">
-      <div class="JNPF-common-page-header">
-        <el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
-        <div class="options">
-          <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">
-            {{$t('common.confirmButton')}}</el-button>
-          <el-button @click="goBack()">{{$t('common.cancelButton')}}</el-button>
-        </div>
-      </div>
-      <el-row class="main" v-loading="loading">
-        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px"
-          @submit.native.prevent>
-          <el-col :span="12">
-            <el-form-item label="名称" prop="fullName">
-              <el-input v-model="dataForm.fullName" placeholder="请输入名称" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="编码" prop="enCode">
-              <el-input v-model="dataForm.enCode" placeholder="请输入编码" clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="模板类型">
-              <el-input value="自定义模板" disabled clearable></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="消息来源" prop="messageSource">
-              <el-select v-model="dataForm.messageSource" placeholder="请选择消息来源" clearable
-                :disabled="this.dataForm.id?true:false" filterable @change="onMessageSourceChange">
-                <el-option v-for="(item,index) in messageSourceList" :key="index"
-                  :label="item.fullName" :value="item.enCode">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="消息类型" prop="messageType">
-              <el-select v-model="dataForm.messageType" placeholder="请选择消息类型" clearable
-                :disabled="this.dataForm.id?true:false" @change="onMsgTypeChange" filterable>
-                <el-option v-for="(item,index) in messageTypeList" :key="index"
-                  :label="item.fullName" :value="item.enCode">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="状态" prop="enabledMark">
-              <el-switch v-model="dataForm.enabledMark" :active-value="1" :inactive-value="0" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="排序" prop="sortCode">
-              <el-input-number :min="0" :max="999999" v-model="dataForm.sortCode"
-                controls-position="right" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="说明" prop="description">
-              <el-input v-model="dataForm.description" placeholder="请输入说明" type="textarea"
-                :rows="3" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <div class="parameter-box">
-              <div class="left-pane">
-                <div class="left-pane-list">
-                  <div class="list">
-                    <div class="header">
-                      <span>参数名称</span>
-                      <span>参数说明</span>
-                      <span class="operation">操作</span>
-                    </div>
-                    <el-input v-model="keyword" placeholder="请输入关键字" suffix-icon="el-icon-search"
-                      clearable @input='searchParameter' />
-                    <el-table :data="parameterList" :showHeader="false" ref="dragTable" row-key="id"
-                      size='mini' height="100%">
-                      <el-table-column prop="field" label="参数名称">
-                        <template slot-scope="scope">
-                          <p @click="addContent(scope.row)" style="cursor:pointer">
-                            {{scope.row.field}}
-                          </p>
-                        </template>
-                      </el-table-column>
-                      <el-table-column prop="fieldName" label="参数说明">
-                        <template slot-scope="scope">
-                          <p @click="addContent(scope.row)" style="cursor:pointer;line-height:36px">
-                            {{scope.row.fieldName}}
-                          </p>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="操作" width="70">
-                        <template slot-scope="scope" v-if="!getIsSystem(scope.row.field)">
-                          <el-button type="text" @click="addEditParameter(scope.row,scope.$index)"
-                            icon="el-icon-edit-outline"></el-button>
-                          <el-button type="text" class="JNPF-table-delBtn" icon="el-icon-delete"
-                            @click="removeParameter(scope.$index)"></el-button>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                  </div>
-                  <div class="table-actions" @click="addEditParameter()"
-                    v-if="dataForm.messageSource==='2'">
-                    <el-button type="text" icon="el-icon-plus">新建</el-button>
-                  </div>
+    <transition name="el-zoom-in-center">
+        <div class="JNPF-preview-main flow-form-main">
+            <div class="JNPF-common-page-header">
+                <el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
+                <div class="options">
+                    <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">
+                        {{ $t("common.confirmButton") }}</el-button>
+                    <el-button @click="goBack()">{{
+            $t("common.cancelButton")
+          }}</el-button>
                 </div>
-              </div>
-              <div class="right-pane" v-if="dataForm.messageType != 3&&dataForm.messageType != 7">
-                <jnpf-form-tip-item label="消息标题" prop="title" :tipLabel="getTipLabel()">
-                  <el-input v-model="dataForm.title" placeholder="请输入消息标题" clearable></el-input>
-                </jnpf-form-tip-item>
-                <jnpf-form-tip-item label="消息内容" prop="content" v-if="dataForm.messageType == 2"
-                  :tipLabel="getTipLabel()">
-                  <JnpfEditor v-model="dataForm.content" ref="myQuillEditor"
-                    placeholder="请输入消息内容" />
-                </jnpf-form-tip-item>
-                <jnpf-form-tip-item label="消息内容" prop="content"
-                  v-else-if="dataForm.messageType != 1" :tipLabel="getTipLabel()">
-                  <el-input v-model="dataForm.content" placeholder="请输入消息内容" type="textarea"
-                    :rows="19" />
-                </jnpf-form-tip-item>
-              </div>
-              <div class="right-pane" v-else>
-                <el-row :gutter="20">
-                  <el-col :span="12">
-                    <jnpf-form-tip-item label="模版编号" prop="templateCode"
-                      :tipLabel="dataForm.messageType==3?'阿里云:请在【阿里云管理后台-模板管理】⻚⾯查看模板CODE<br/>腾讯云:请在【腾讯云管理后台-正⽂模板管理】⻚⾯查看模板ID':'在【微信公众号管理后台-广告与服务-模板消息】⻚⾯查看模板ID'">
-                      <el-input v-model="dataForm.templateCode" placeholder="请输入模版编号" />
-                    </jnpf-form-tip-item>
-                  </el-col>
-                  <el-col :span="12" offset="12"></el-col>
-                  <el-col :span="12" v-if="dataForm.messageType == 7">
-                    <jnpf-form-tip-item label="跳转方式" prop="wxSkip">
-                      <el-select v-model="dataForm.wxSkip" placeholder="请选择跳转方式" clearable
-                        filterable>
-                        <el-option v-for="(item,index) in wxSkipList" :key="index"
-                          :label="item.fullName" :value="item.enCode">
-                        </el-option>
-                      </el-select>
+            </div>
+            <el-row class="main" v-loading="loading">
+                <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px"
+                    @submit.native.prevent>
+                    <el-col :span="12">
+                        <el-form-item label="名称" prop="fullName">
+                            <el-input v-model="dataForm.fullName" placeholder="请输入名称"
+                                clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="编码" prop="enCode">
+                            <el-input v-model="dataForm.enCode" placeholder="请输入编码"
+                                clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="模板类型">
+                            <el-input value="自定义模板" disabled clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="消息来源" prop="messageSource">
+                            <el-select v-model="dataForm.messageSource" placeholder="请选择消息来源"
+                                clearable :disabled="this.dataForm.id ? true : false" filterable
+                                @change="onMessageSourceChange">
+                                <el-option v-for="(item, index) in messageSourceList" :key="index"
+                                    :label="item.fullName" :value="item.enCode">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="消息类型" prop="messageType">
+                            <el-select v-model="dataForm.messageType" placeholder="请选择消息类型"
+                                clearable :disabled="this.dataForm.id ? true : false"
+                                @change="onMsgTypeChange" filterable>
+                                <el-option v-for="(item, index) in messageTypeList" :key="index"
+                                    :label="item.fullName" :value="item.enCode">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="状态" prop="enabledMark">
+                            <el-switch v-model="dataForm.enabledMark" :active-value="1"
+                                :inactive-value="0" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="排序" prop="sortCode">
+                            <el-input-number :min="0" :max="999999" v-model="dataForm.sortCode"
+                                controls-position="right" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="说明" prop="description">
+                            <el-input v-model="dataForm.description" placeholder="请输入说明"
+                                type="textarea" :rows="3" />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <div class="parameter-box">
+                            <div class="left-pane">
+                                <div class="left-pane-list">
+                                    <div class="list">
+                                        <div class="header">
+                                            <span>参数名称</span>
+                                            <span>参数说明</span>
+                                            <span class="operation">操作</span>
+                                        </div>
+                                        <el-input v-model="keyword" placeholder="请输入关键字"
+                                            suffix-icon="el-icon-search" clearable
+                                            @input="searchParameter" />
+                                        <el-table :data="parameterList" :showHeader="false"
+                                            ref="dragTable" row-key="id" size="mini" height="100%">
+                                            <el-table-column prop="field" label="参数名称">
+                                                <template slot-scope="scope">
+                                                    <p @click="addContent(scope.row)"
+                                                        style="cursor:pointer">
+                                                        {{ scope.row.field }}
+                                                    </p>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column prop="fieldName" label="参数说明">
+                                                <template slot-scope="scope">
+                                                    <p @click="addContent(scope.row)"
+                                                        style="cursor:pointer;line-height:36px">
+                                                        {{ scope.row.fieldName }}
+                                                    </p>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="操作" width="70">
+                                                <template slot-scope="scope"
+                                                    v-if="!getIsSystem(scope.row.field)">
+                                                    <el-button type="text"
+                                                        @click="addEditParameter(scope.row, scope.$index)"
+                                                        icon="el-icon-edit-outline"></el-button>
+                                                    <el-button type="text" class="JNPF-table-delBtn"
+                                                        icon="el-icon-delete"
+                                                        @click="removeParameter(scope.$index)"></el-button>
+                                                </template>
+                                            </el-table-column>
+                                        </el-table>
+                                    </div>
+                                    <div class="table-actions" @click="addEditParameter()"
+                                        v-if="dataForm.messageSource === '2'">
+                                        <el-button type="text" icon="el-icon-plus">新建</el-button>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="right-pane"
+                                v-if="dataForm.messageType != 3 && dataForm.messageType != 7 && dataForm.messageType != 'WXMP'">
+                                <jnpf-form-tip-item label="消息标题" prop="title"
+                                    :tipLabel="getTipLabel()">
+                                    <el-input v-model="dataForm.title" placeholder="请输入消息标题"
+                                        clearable></el-input>
+                                </jnpf-form-tip-item>
+                                <jnpf-form-tip-item label="消息内容" prop="content"
+                                    v-if="dataForm.messageType == 2" :tipLabel="getTipLabel()">
+                                    <JnpfEditor v-model="dataForm.content" ref="myQuillEditor"
+                                        placeholder="请输入消息内容" />
+                                </jnpf-form-tip-item>
+                                <jnpf-form-tip-item label="消息内容" prop="content"
+                                    v-else-if="dataForm.messageType != 1" :tipLabel="getTipLabel()">
+                                    <el-input v-model="dataForm.content" placeholder="请输入消息内容"
+                                        type="textarea" :rows="19" />
+                                </jnpf-form-tip-item>
+                            </div>
+                            <div class="right-pane" v-else-if="dataForm.messageType == 'WXMP'">
+                                <el-row :gutter="20">
+                                    <el-col :span="12">
+                                        <jnpf-form-tip-item label="模版编号" prop="templateCode"
+                                            tipLabel="在【微信小程序管理后台-订阅消息-我的模板】⻚⾯查看模板ID">
+                                            <el-input v-model="dataForm.templateCode"
+                                                placeholder="请输入模版编号" />
+                                        </jnpf-form-tip-item>
+                                    </el-col>
+                                </el-row>
+                                <div class="msg-pane">
+                                    <div class="list">
+                                        <el-table :data="smsList" ref="dragTable" row-key="id"
+                                            size="mini" height="100%">
+                                            <el-table-column label="序号" type="index"
+                                                width="50"></el-table-column>
+                                            <el-table-column prop="name">
+                                                <template slot="header">
+                                                    <p>
+                                                        变量
+                                                        <el-tooltip placement="top">
+                                                            <div slot="content"
+                                                                v-if="dataForm.messageType == 3">
+                                                                阿里云:在【阿里云管理后台-模板管理】维护模板变量参数<br />腾讯云:在【腾讯云管理后台-正⽂模板管理】维护模板变量参数
+                                                            </div>
+                                                            <div slot="content" v-else>
+                                                                在【微信公众号管理后台-广告与服务-模板消息】维护模板参数
+                                                            </div>
+                                                            <a
+                                                                class="el-icon-question tooltip-question"></a>
+                                                        </el-tooltip>
+                                                    </p>
+                                                </template>
+                                                <template slot-scope="scope">
+                                                    <el-input v-model="scope.row.smsField"
+                                                        :placeholder="'请输入变量'">
+                                                    </el-input>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="参数">
+                                                <template slot-scope="scope">
+                                                    <el-select v-model="scope.row.field"
+                                                        placeholder="请选择参数" clearable filterable>
+                                                        <el-option
+                                                            v-for="(item, index) in parameterList"
+                                                            :key="index" :label="item.field"
+                                                            :value="item.field">
+                                                        </el-option>
+                                                    </el-select>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="标题" width="70"
+                                                v-if="dataForm.messageType == 7">
+                                                <template slot-scope="scope">
+                                                    <el-checkbox v-model="scope.row.isTitle"
+                                                        @change="changeKey($event, scope.row)"
+                                                        :true-label="1" :false-label="0" />
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="操作" width="70">
+                                                <template slot-scope="scope">
+                                                    <el-button type="text" class="JNPF-table-delBtn"
+                                                        icon="el-icon-delete"
+                                                        @click="removeSmsData(scope.$index)"></el-button>
+                                                </template>
+                                            </el-table-column>
+                                        </el-table>
+                                    </div>
+                                    <div class="table-actions" @click="addSmsData">
+                                        <el-button type="text" icon="el-icon-plus">添加一行</el-button>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="right-pane" v-else>
+                                <el-row :gutter="20">
+                                    <el-col :span="12">
+                                        <jnpf-form-tip-item label="模版编号" prop="templateCode"
+                                            :tipLabel="
+                        dataForm.messageType == 3
+                          ? '阿里云:请在【阿里云管理后台-模板管理】⻚⾯查看模板CODE<br/>腾讯云:请在【腾讯云管理后台-正⽂模板管理】⻚⾯查看模板ID'
+                          : '在【微信公众号管理后台-广告与服务-模板消息】⻚⾯查看模板ID'
+                      ">
+                                            <el-input v-model="dataForm.templateCode"
+                                                placeholder="请输入模版编号" />
+                                        </jnpf-form-tip-item>
+                                    </el-col>
+                                    <el-col :span="12" offset="12"></el-col>
+                                    <el-col :span="12" v-if="dataForm.messageType == 7">
+                                        <jnpf-form-tip-item label="跳转方式" prop="wxSkip">
+                                            <el-select v-model="dataForm.wxSkip"
+                                                placeholder="请选择跳转方式" clearable filterable>
+                                                <el-option v-for="(item, index) in wxSkipList"
+                                                    :key="index" :label="item.fullName"
+                                                    :value="item.enCode">
+                                                </el-option>
+                                            </el-select>
+                                        </jnpf-form-tip-item>
+                                    </el-col>
+                                    <el-col :span="12"
+                                        v-if="dataForm.messageType == 7 && dataForm.wxSkip == 1">
+                                        <jnpf-form-tip-item label="关联小程序ID" prop="xcxAppId"
+                                            label-width="126px"
+                                            tipLabel="请在【微信公众号管理后台-广告与服务-小程序管理】⻚⾯查看小程序ID">
+                                            <el-input v-model="dataForm.xcxAppId"
+                                                placeholder="请输入关联小程序ID" clearable />
+                                        </jnpf-form-tip-item>
+                                    </el-col>
+                                </el-row>
+                                <div class="msg-pane">
+                                    <div class="list">
+                                        <el-table :data="smsList" ref="dragTable" row-key="id"
+                                            size="mini" height="100%">
+                                            <el-table-column label="序号" type="index"
+                                                width="50"></el-table-column>
+                                            <el-table-column prop="name">
+                                                <template slot="header">
+                                                    <p>
+                                                        变量
+                                                        <el-tooltip placement="top">
+                                                            <div slot="content"
+                                                                v-if="dataForm.messageType == 3">
+                                                                阿里云:在【阿里云管理后台-模板管理】维护模板变量参数<br />腾讯云:在【腾讯云管理后台-正⽂模板管理】维护模板变量参数
+                                                            </div>
+                                                            <div slot="content" v-else>
+                                                                在【微信公众号管理后台-广告与服务-模板消息】维护模板参数
+                                                            </div>
+                                                            <a
+                                                                class="el-icon-question tooltip-question"></a>
+                                                        </el-tooltip>
+                                                    </p>
+                                                </template>
+                                                <template slot-scope="scope">
+                                                    <el-input v-model="scope.row.smsField"
+                                                        :placeholder="
+                              dataForm.messageType == 3
+                                ? '请输入短信变量'
+                                : '请输入变量'
+                            "></el-input>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="参数">
+                                                <template slot-scope="scope">
+                                                    <el-select v-model="scope.row.field"
+                                                        placeholder="请选择参数" clearable filterable>
+                                                        <el-option
+                                                            v-for="(item, index) in parameterList"
+                                                            :key="index" :label="item.field"
+                                                            :value="item.field">
+                                                        </el-option>
+                                                    </el-select>
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="标题" width="70"
+                                                v-if="dataForm.messageType == 7">
+                                                <template slot-scope="scope">
+                                                    <el-checkbox v-model="scope.row.isTitle"
+                                                        @change="changeKey($event, scope.row)"
+                                                        :true-label="1" :false-label="0" />
+                                                </template>
+                                            </el-table-column>
+                                            <el-table-column label="操作" width="70">
+                                                <template slot-scope="scope">
+                                                    <el-button type="text" class="JNPF-table-delBtn"
+                                                        icon="el-icon-delete"
+                                                        @click="removeSmsData(scope.$index)"></el-button>
+                                                </template>
+                                            </el-table-column>
+                                        </el-table>
+                                    </div>
+                                    <div class="table-actions" @click="addSmsData">
+                                        <el-button type="text" icon="el-icon-plus">添加一行</el-button>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <el-dialog :title="isEdit ? '编辑' : '新建'" :visible.sync="dialogVisible"
+                :close-on-click-modal="false" class="JNPF-dialog JNPF-dialog_center" lock-scroll
+                append-to-body width="600px">
+                <el-form :model="fieldForm" :rules="fieldRule" ref="fieldForm" label-width="100px">
+                    <jnpf-form-tip-item label="参数名称" prop="field" :tip-label="
+              isEdit
+                ? ''
+                : '可以使用大小写英文字母、数字、下划线组合,且不能数字、下划线开头。'
+            " placement="top-start">
+                        <el-input v-model="fieldForm.field" placeholder="请输入参数名称"
+                            :disabled="isEdit" />
                     </jnpf-form-tip-item>
-                  </el-col>
-                  <el-col :span="12" v-if="dataForm.messageType == 7&&dataForm.wxSkip == 1">
-                    <jnpf-form-tip-item label="关联小程序ID" prop="xcxAppId" label-width="126px"
-                      tipLabel="请在【微信公众号管理后台-广告与服务-小程序管理】⻚⾯查看小程序ID">
-                      <el-input v-model="dataForm.xcxAppId" placeholder="请输入关联小程序ID" clearable />
+                    <jnpf-form-tip-item label="参数说明" prop="fieldName">
+                        <el-input v-model="fieldForm.fieldName" placeholder="请输入参数说明"></el-input>
                     </jnpf-form-tip-item>
-                  </el-col>
-                </el-row>
-                <div class="msg-pane">
-                  <div class="list">
-                    <el-table :data="smsList" ref="dragTable" row-key="id" size='mini'
-                      height="100%">
-                      <el-table-column label="序号" type="index" width="50"></el-table-column>
-                      <el-table-column prop="name">
-                        <template slot="header">
-                          <p>
-                            变量
-                            <el-tooltip placement="top">
-                              <div slot="content" v-if="dataForm.messageType==3">
-                                阿里云:在【阿里云管理后台-模板管理】维护模板变量参数<br />腾讯云:在【腾讯云管理后台-正⽂模板管理】维护模板变量参数</div>
-                              <div slot="content" v-else>在【微信公众号管理后台-广告与服务-模板消息】维护模板参数</div>
-                              <a class="el-icon-question tooltip-question"></a>
-                            </el-tooltip>
-                          </p>
-                        </template>
-                        <template slot-scope="scope">
-                          <el-input v-model="scope.row.smsField"
-                            :placeholder="dataForm.messageType==3?'请输入短信变量':'请输入变量'"></el-input>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="参数">
-                        <template slot-scope="scope">
-                          <el-select v-model="scope.row.field" placeholder="请选择参数" clearable
-                            filterable>
-                            <el-option v-for="(item,index) in parameterList" :key="index"
-                              :label="item.field" :value="item.field">
-                            </el-option>
-                          </el-select>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="标题" width="70" v-if="dataForm.messageType==7">
-                        <template slot-scope="scope">
-                          <el-checkbox v-model="scope.row.isTitle"
-                            @change='changeKey($event,scope.row)' :true-label="1"
-                            :false-label="0" />
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="操作" width="70">
-                        <template slot-scope="scope">
-                          <el-button type="text" class="JNPF-table-delBtn" icon="el-icon-delete"
-                            @click="removeSmsData(scope.$index)"></el-button>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                  </div>
-                  <div class="table-actions" @click="addSmsData">
-                    <el-button type="text" icon="el-icon-plus">添加一行</el-button>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </el-col>
-        </el-form>
-      </el-row>
-      <el-dialog :title="isEdit?'编辑':'新建'" :visible.sync="dialogVisible"
-        :close-on-click-modal="false" class="JNPF-dialog JNPF-dialog_center" lock-scroll
-        append-to-body width="600px">
-        <el-form :model="fieldForm" :rules="fieldRule" ref="fieldForm" label-width="100px">
-          <jnpf-form-tip-item label="参数名称" prop="field"
-            :tip-label="isEdit?'':'可以使用大小写英文字母、数字、下划线组合,且不能数字、下划线开头。'" placement="top-start">
-            <el-input v-model="fieldForm.field" placeholder="请输入参数名称" :disabled="isEdit" />
-          </jnpf-form-tip-item>
-          <jnpf-form-tip-item label="参数说明" prop="fieldName">
-            <el-input v-model="fieldForm.fieldName" placeholder="请输入参数说明"></el-input>
-          </jnpf-form-tip-item>
-        </el-form>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible=false">{{$t('common.cancelButton')}}
-          </el-button>
-          <el-button type="primary" @click="addParameter()">
-            {{$t('common.confirmButton')}}</el-button>
-        </span>
-      </el-dialog>
-    </div>
-  </transition>
+                </el-form>
+                <span slot="footer" class="dialog-footer">
+                    <el-button @click="dialogVisible = false">{{ $t("common.cancelButton") }}
+                    </el-button>
+                    <el-button type="primary" @click="addParameter()">
+                        {{ $t("common.confirmButton") }}</el-button>
+                </span>
+            </el-dialog>
+        </div>
+    </transition>
 </template>
 <script>
-import { getMsgTemplateDetail, addMsgTemplate, editMsgTemplate } from '@/api/msgCenter/msgTemplate'
-import { deepClone } from '@/utils'
+import {
+    getMsgTemplateDetail,
+    addMsgTemplate,
+    editMsgTemplate
+} from "@/api/msgCenter/msgTemplate";
+import { deepClone } from "@/utils";
 const defaultParameterList = [
-  { field: '@Title', fieldName: '标题' },
-  { field: '@CreatorUserName', fieldName: '创建人' },
-]
+    { field: "@Title", fieldName: "标题" },
+    { field: "@CreatorUserName", fieldName: "创建人" }
+];
 const noticeParameterList = [
-  ...defaultParameterList,
-  { field: '@Content', fieldName: '内容' },
-  { field: '@Remark', fieldName: '摘要' },
-]
+    ...defaultParameterList,
+    { field: "@Content", fieldName: "内容" },
+    { field: "@Remark", fieldName: "摘要" }
+];
 const flowParameterList = [
-  ...defaultParameterList,
-  { field: '@FlowLink', fieldName: '流程链接' },
-]
-const systemParameterList = defaultParameterList
+    ...defaultParameterList,
+    { field: "@FlowLink", fieldName: "流程链接" }
+];
+const systemParameterList = defaultParameterList;
 const scheduleParameterList = [
-  ...defaultParameterList,
-  { field: '@Content', fieldName: '内容' },
-  { field: '@StartDate', fieldName: '开始日期' },
-  { field: '@StartTime', fieldName: '开始时间' },
-  { field: '@EndDate', fieldName: '结束日期' },
-  { field: '@EndTime', fieldName: '结束时间' },
-]
+    ...defaultParameterList,
+    { field: "@Content", fieldName: "内容" },
+    { field: "@StartDate", fieldName: "开始日期" },
+    { field: "@StartTime", fieldName: "开始时间" },
+    { field: "@EndDate", fieldName: "结束日期" },
+    { field: "@EndTime", fieldName: "结束时间" }
+];
 export default {
-  name: 'msgTemplate-Form',
-  data() {
-    return {
-      dataForm: {
-        id: '',
-        fullName: '',
-        enCode: '',
-        templateType: 0,
-        messageType: '',
-        messageSource: '',
-        enabledMark: 1,
-        sortCode: 0,
-        description: '',
-        title: '',
-        content: '',
-        templateCode: '',
-        wxSkip: '1',
-        xcxAppId: ''
-      },
-      dataRule: {
-        fullName: [
-          { required: true, message: '模板名称不能为空', trigger: 'blur' },
-        ],
-        enCode: [
-          { required: true, message: '模板编码不能为空', trigger: 'blur' },
-          { validator: this.formValidate('enCode'), trigger: 'blur' },
-        ],
-        messageSource: [
-          { required: true, message: '请选择消息来源', trigger: 'change' },
-        ],
-        messageType: [
-          { required: true, message: '请选择消息类型', trigger: 'change' },
-        ],
-        title: [
-          { required: true, message: '消息标题不能为空', trigger: 'blur' },
-        ],
-        content: [
-          { required: true, message: '消息内容不能为空', trigger: 'blur' },
-        ],
-        templateCode: [
-          { required: true, message: '模版编号不能为空', trigger: 'blur' },
-        ],
-        wxSkip: [
-          { required: true, message: '跳转方式不能为空', trigger: 'blur' },
-        ],
-        xcxAppId: [
-          { required: true, message: '关联小程序ID不能为空', trigger: 'blur' },
-        ],
-      },
-      fieldRule: {
-        field: [
-          { required: true, message: '参数名称不能为空', trigger: 'blur' },
-          { validator: this.formValidate('filed'), trigger: 'blur' },
-        ],
-        fieldName: [
-          { required: true, message: '参数说明不能为空', trigger: 'blur' },
-        ],
-      },
-      fieldForm: {
-        field: '',
-        fieldName: ''
-      },
-      dialogVisible: false,
-      btnLoading: false,
-      loading: false,
-      messageSourceList: [],
-      messageTypeList: [],
-      isEdit: false,
-      keyword: "",
-      parameterList: [],
-      allParameterList: [],
-      smsList: [],
-      wxSkipList: [
-        { enCode: "1", fullName: '小程序' },
-        { enCode: "2", fullName: '页面' }
-      ]
-    }
-  },
-  methods: {
-    init(id) {
-      this.dataForm.id = id || ''
-      this.parameterList = []
-      this.allParameterList = this.parameterList
-      this.getConfig()
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.id) {
-          this.loading = true
-          getMsgTemplateDetail(this.dataForm.id).then(res => {
-            this.loading = false
-            this.dataForm = res.data
-            this.parameterList = res.data.templateParamList
-            this.allParameterList = this.parameterList
-            this.smsList = res.data.smsFieldList
-          }).catch(() => {
-            this.loading = false
-          })
-        }
-      })
-    },
-    getConfig() {
-      this.$store.dispatch('base/getDictionaryData', { sort: 'msgSendType' }).then((res) => {
-        this.messageTypeList = res
-        if (this.messageTypeList.length) this.dataForm.messageType = this.messageTypeList[0].enCode
-      })
-      this.$store.dispatch('base/getDictionaryData', { sort: 'msgSourceType' }).then((res) => {
-        this.messageSourceList = res
-      })
+    name: "msgTemplate-Form",
+    data() {
+        return {
+            dataForm: {
+                id: "",
+                fullName: "",
+                enCode: "",
+                templateType: 0,
+                messageType: "",
+                messageSource: "",
+                enabledMark: 1,
+                sortCode: 0,
+                description: "",
+                title: "",
+                content: "",
+                templateCode: "",
+                wxSkip: "1",
+                xcxAppId: ""
+            },
+            dataRule: {
+                fullName: [
+                    { required: true, message: "模板名称不能为空", trigger: "blur" }
+                ],
+                enCode: [
+                    { required: true, message: "模板编码不能为空", trigger: "blur" },
+                    { validator: this.formValidate("enCode"), trigger: "blur" }
+                ],
+                messageSource: [
+                    { required: true, message: "请选择消息来源", trigger: "change" }
+                ],
+                messageType: [
+                    { required: true, message: "请选择消息类型", trigger: "change" }
+                ],
+                title: [
+                    { required: true, message: "消息标题不能为空", trigger: "blur" }
+                ],
+                content: [
+                    { required: true, message: "消息内容不能为空", trigger: "blur" }
+                ],
+                templateCode: [
+                    { required: true, message: "模版编号不能为空", trigger: "blur" }
+                ],
+                wxSkip: [
+                    { required: true, message: "跳转方式不能为空", trigger: "blur" }
+                ],
+                xcxAppId: [
+                    { required: true, message: "关联小程序ID不能为空", trigger: "blur" }
+                ]
+            },
+            fieldRule: {
+                field: [
+                    { required: true, message: "参数名称不能为空", trigger: "blur" },
+                    { validator: this.formValidate("filed"), trigger: "blur" }
+                ],
+                fieldName: [
+                    { required: true, message: "参数说明不能为空", trigger: "blur" }
+                ]
+            },
+            fieldForm: {
+                field: "",
+                fieldName: ""
+            },
+            dialogVisible: false,
+            btnLoading: false,
+            loading: false,
+            messageSourceList: [],
+            messageTypeList: [],
+            isEdit: false,
+            keyword: "",
+            parameterList: [],
+            allParameterList: [],
+            smsList: [],
+            wxSkipList: [
+                { enCode: "1", fullName: "小程序" },
+                { enCode: "2", fullName: "页面" }
+            ]
+        };
     },
-    dataFormSubmit() {
-      this.dataForm.templateParamList = []
-      this.dataForm.smsFieldList = []
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.dataForm.templateParamList = this.parameterList
-          this.dataForm.smsFieldList = this.smsList
-          this.btnLoading = true
-          const formMethod = this.dataForm.id ? editMsgTemplate : addMsgTemplate
-          let isOk = true;
-          for (let i = 0; i < this.dataForm.smsFieldList.length; i++) {
-            let list = this.dataForm.smsFieldList[i]
-            let num = this.dataForm.smsFieldList.filter(o => o.smsField == list.smsField)
-            if (num.length > 1) {
-              this.$message({
-                showClose: true,
-                message: `第${i + 1}行短信变量'${list.smsField}'已重复`,
-                type: 'error',
-                duration: 1000
-              });
-              this.visible = false
-              this.btnLoading = false
-              isOk = false
-              break
-            }
-          }
-          if (isOk) {
-            formMethod(this.dataForm).then((res) => {
-              this.$message({
-                message: res.msg,
-                type: 'success',
-                duration: 1500,
-                onClose: () => {
-                  this.visible = false
-                  this.btnLoading = false
-                  this.$emit('close', true)
+    methods: {
+        init(id) {
+            this.dataForm.id = id || "";
+            this.parameterList = [];
+            this.allParameterList = this.parameterList;
+            this.getConfig();
+            this.$nextTick(() => {
+                this.$refs["dataForm"].resetFields();
+                if (this.dataForm.id) {
+                    this.loading = true;
+                    getMsgTemplateDetail(this.dataForm.id)
+                        .then(res => {
+                            this.loading = false;
+                            this.dataForm = res.data;
+                            this.parameterList = res.data.templateParamList;
+                            this.allParameterList = this.parameterList;
+                            this.smsList = res.data.smsFieldList;
+                        })
+                        .catch(() => {
+                            this.loading = false;
+                        });
+                }
+            });
+        },
+        getConfig() {
+            this.$store
+                .dispatch("base/getDictionaryData", { sort: "msgSendType" })
+                .then(res => {
+                    this.messageTypeList = res;
+                    if (this.messageTypeList.length)
+                        this.dataForm.messageType = this.messageTypeList[0].enCode;
+                });
+            this.$store
+                .dispatch("base/getDictionaryData", { sort: "msgSourceType" })
+                .then(res => {
+                    this.messageSourceList = res;
+                });
+        },
+        dataFormSubmit() {
+            this.dataForm.templateParamList = [];
+            this.dataForm.smsFieldList = [];
+            this.$refs["dataForm"].validate(valid => {
+                if (valid) {
+                    this.dataForm.templateParamList = this.parameterList;
+                    this.dataForm.smsFieldList = this.smsList;
+                    this.btnLoading = true;
+                    const formMethod = this.dataForm.id
+                        ? editMsgTemplate
+                        : addMsgTemplate;
+                    let isOk = true;
+                    for (let i = 0; i < this.dataForm.smsFieldList.length; i++) {
+                        let list = this.dataForm.smsFieldList[i];
+                        let num = this.dataForm.smsFieldList.filter(
+                            o => o.smsField == list.smsField
+                        );
+                        if (num.length > 1) {
+                            this.$message({
+                                showClose: true,
+                                message: `第${i + 1}行短信变量'${list.smsField}'已重复`,
+                                type: "error",
+                                duration: 1000
+                            });
+                            this.visible = false;
+                            this.btnLoading = false;
+                            isOk = false;
+                            break;
+                        }
+                    }
+                    if (isOk) {
+                        formMethod(this.dataForm)
+                            .then(res => {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "success",
+                                    duration: 1500,
+                                    onClose: () => {
+                                        this.visible = false;
+                                        this.btnLoading = false;
+                                        this.$emit("close", true);
+                                    }
+                                });
+                            })
+                            .catch(() => {
+                                this.btnLoading = false;
+                            });
+                    }
+                }
+            });
+        },
+        addEditParameter(item) {
+            this.dialogVisible = true;
+            this.isEdit = false;
+            this.$nextTick(() => {
+                this.$refs["fieldForm"].resetFields();
+                if (item) {
+                    this.isEdit = true;
+                    this.fieldForm = JSON.parse(JSON.stringify(item));
+                }
+            });
+        },
+        removeParameter(index) {
+            this.$confirm("此操作删除该参数, 不能恢复,是否继续?", "提示", {
+                type: "warning"
+            })
+                .then(() => {
+                    this.parameterList.splice(index, 1);
+                    this.allParameterList = this.parameterList;
+                })
+                .catch(() => { });
+        },
+        /**
+         * 查找是否有相同参数,没有则添加
+         */
+        addParameter() {
+            this.$refs["fieldForm"].validate(valid => {
+                if (valid) {
+                    if (!this.isEdit) {
+                        let boo = this.parameterList.some(
+                            o => o.field === this.fieldForm.field
+                        );
+                        if (boo) {
+                            this.$message({
+                                type: "error",
+                                message: "参数名重复,请重新输入"
+                            });
+                            return;
+                        }
+                        this.parameterList.push(deepClone(this.fieldForm));
+                    } else {
+                        for (let index = 0; index < this.parameterList.length; index++) {
+                            if (this.fieldForm.field === this.parameterList[index].field) {
+                                this.$set(this.parameterList, index, deepClone(this.fieldForm));
+                                break;
+                            }
+                        }
+                    }
+                    this.allParameterList = this.parameterList;
+                    this.dialogVisible = false;
+                }
+            });
+        },
+        addContent(item) {
+            const content = "{" + item.field + "}";
+            this.dataForm.content += content;
+            this.dataForm.title += content;
+            this.$refs.dataForm.clearValidate(["title", "content"]);
+        },
+        searchParameter() {
+            this.parameterList = this.allParameterList.filter(item => {
+                if (
+                    item.field.toLowerCase().includes(this.keyword.toLowerCase()) ||
+                    item.fieldName.toLowerCase().includes(this.keyword.toLowerCase())
+                ) {
+                    return item;
+                }
+            });
+        },
+        addSmsData() {
+            this.smsList.push({
+                smsField: "",
+                field: "",
+                fieldId: this.jnpf.idGenerator()
+            });
+        },
+        removeSmsData(index) {
+            this.smsList.splice(index, 1);
+        },
+        onMsgTypeChange(e) {
+            this.dataForm.content = "";
+        },
+        goBack() {
+            this.$emit("close");
+        },
+        changeKey(val, row) {
+            if (!val) return;
+            for (let i = 0; i < this.smsList.length; i++) {
+                if (row.fieldId != this.smsList[i].fieldId) {
+                    this.$set(this.smsList[i], "isTitle", 0);
                 }
-              })
-            }).catch(() => { this.btnLoading = false })
-          }
-        }
-      })
-    },
-    addEditParameter(item) {
-      this.dialogVisible = true
-      this.isEdit = false
-      this.$nextTick(() => {
-        this.$refs['fieldForm'].resetFields()
-        if (item) {
-          this.isEdit = true
-          this.fieldForm = JSON.parse(JSON.stringify(item))
-        }
-      })
-    },
-    removeParameter(index) {
-      this.$confirm('此操作删除该参数, 不能恢复,是否继续?', '提示', {
-        type: 'warning'
-      }).then(() => {
-        this.parameterList.splice(index, 1)
-        this.allParameterList = this.parameterList
-      }).catch(() => { });
-    },
-    /**
-     * 查找是否有相同参数,没有则添加
-     */
-    addParameter() {
-      this.$refs['fieldForm'].validate((valid) => {
-        if (valid) {
-          if (!this.isEdit) {
-            let boo = this.parameterList.some(o => o.field === this.fieldForm.field)
-            if (boo) {
-              this.$message({
-                type: 'error',
-                message: '参数名重复,请重新输入'
-              })
-              return
-            }
-            this.parameterList.push(deepClone(this.fieldForm))
-          } else {
-            for (let index = 0; index < this.parameterList.length; index++) {
-              if (this.fieldForm.field === this.parameterList[index].field) {
-                this.$set(this.parameterList, index, deepClone(this.fieldForm))
-                break
-              }
             }
-          }
-          this.allParameterList = this.parameterList
-          this.dialogVisible = false
-        }
-      })
-    },
-    addContent(item) {
-      const content = '{' + item.field + '}'
-      this.dataForm.content += content
-      this.dataForm.title += content
-      this.$refs.dataForm.clearValidate(['title', 'content'])
-    },
-    searchParameter() {
-      this.parameterList = this.allParameterList.filter(item => {
-        if (item.field.toLowerCase().includes(this.keyword.toLowerCase()) || item.fieldName.toLowerCase().includes(this.keyword.toLowerCase())) {
-          return item
-        }
-      })
-    },
-    addSmsData() {
-      this.smsList.push({
-        smsField: "",
-        field: "",
-        fieldId: this.jnpf.idGenerator()
-      })
-    },
-    removeSmsData(index) {
-      this.smsList.splice(index, 1)
-    },
-    onMsgTypeChange(e) {
-      this.dataForm.content = ''
-    },
-    goBack() {
-      this.$emit('close')
-    },
-    changeKey(val, row) {
-      if (!val) return
-      for (let i = 0; i < this.smsList.length; i++) {
-        if (row.fieldId != this.smsList[i].fieldId) {
-          this.$set(this.smsList[i], 'isTitle', 0)
+        },
+        onMessageSourceChange(val) {
+            console.log(val);
+            if (val == 1)
+                this.parameterList = JSON.parse(JSON.stringify(noticeParameterList));
+            if (val == 2)
+                this.parameterList = JSON.parse(JSON.stringify(flowParameterList));
+            if (val == 3)
+                this.parameterList = JSON.parse(JSON.stringify(systemParameterList));
+            if (val == 4)
+                this.parameterList = JSON.parse(JSON.stringify(scheduleParameterList));
+            this.allParameterList = this.parameterList;
+        },
+        getIsSystem(val) {
+            return val && val.startsWith("@") ? true : false;
+        },
+        getTipLabel() {
+            return this.dataForm.messageSource == "2"
+                ? "系统参数格式:{@系统参数名};自定义参数格式:{自定义参数名}"
+                : "系统参数格式:{@系统参数名}";
         }
-      }
-    },
-    onMessageSourceChange(val) {
-      if (val == 1) this.parameterList = JSON.parse(JSON.stringify(noticeParameterList))
-      if (val == 2) this.parameterList = JSON.parse(JSON.stringify(flowParameterList))
-      if (val == 3) this.parameterList = JSON.parse(JSON.stringify(systemParameterList))
-      if (val == 4) this.parameterList = JSON.parse(JSON.stringify(scheduleParameterList))
-      this.allParameterList = this.parameterList
-    },
-    getIsSystem(val) {
-      return val && val.startsWith('@') ? true : false
-    },
-    getTipLabel() {
-      return this.dataForm.messageSource == '2' ? '系统参数格式:{@系统参数名};自定义参数格式:{自定义参数名}' : '系统参数格式:{@系统参数名}'
     }
-  }
-}
+};
 </script>
 <style lang="scss" scoped>
 .text {
-  color: #5e6d82;
+    color: #5e6d82;
 }
 .parameter-box {
-  display: flex;
-  .left-pane {
-    width: 350px;
-    height: 433px;
-    flex-shrink: 0;
     display: flex;
-    flex-direction: column;
-    overflow: hidden;
-    margin: 0 10px 18px 20px;
-
-    .left-pane-list {
-      border: 1px solid #dcdfe6;
-      border-radius: 4px;
-      flex: 1;
-      display: flex;
-      flex-direction: column;
-      overflow: hidden;
-      .table-actions {
+    .left-pane {
+        width: 350px;
+        height: 433px;
         flex-shrink: 0;
-        border: unset;
-        border-top: #ebeef5 1px dashed;
-      }
-      .list {
-        flex: 1;
         display: flex;
         flex-direction: column;
         overflow: hidden;
-        .header {
-          background-color: #f5f7fa;
-          display: flex;
+        margin: 0 10px 18px 20px;
 
-          span {
-            font-size: 12px;
-            color: #606266;
-            padding: 6px 10px;
-            display: inline-block;
-            line-height: 23px;
+        .left-pane-list {
+            border: 1px solid #dcdfe6;
+            border-radius: 4px;
             flex: 1;
-          }
+            display: flex;
+            flex-direction: column;
+            overflow: hidden;
+            .table-actions {
+                flex-shrink: 0;
+                border: unset;
+                border-top: #ebeef5 1px dashed;
+            }
+            .list {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                overflow: hidden;
+                .header {
+                    background-color: #f5f7fa;
+                    display: flex;
 
-          .operation {
-            width: 70px;
-            flex: unset;
-          }
-        }
+                    span {
+                        font-size: 12px;
+                        color: #606266;
+                        padding: 6px 10px;
+                        display: inline-block;
+                        line-height: 23px;
+                        flex: 1;
+                    }
 
-        >>> .el-input {
-          width: auto;
-          margin: 5px 10px;
-        }
+                    .operation {
+                        width: 70px;
+                        flex: unset;
+                    }
+                }
 
-        >>> .el-table {
-          border-top: unset;
+                >>> .el-input {
+                    width: auto;
+                    margin: 5px 10px;
+                }
+
+                >>> .el-table {
+                    border-top: unset;
+                }
+            }
+            >>> .el-icon-edit-outline,
+            >>> .el-icon-delete {
+                font-size: 16px;
+            }
         }
-      }
-      >>> .el-icon-edit-outline,
-      >>> .el-icon-delete {
-        font-size: 16px;
-      }
     }
-  }
-  .right-pane {
-    flex: 1;
-    display: flex;
-    flex-direction: column;
-    .msg-pane {
-      margin-left: 10px;
-      flex: 1;
-      display: flex;
-      flex-direction: column;
-      .list {
+    .right-pane {
         flex: 1;
-      }
-      >>> .el-icon-delete {
-        font-size: 16px;
-      }
-    }
-    >>> .ql-editor {
-      min-height: 300px !important;
+        display: flex;
+        flex-direction: column;
+        .msg-pane {
+            margin-left: 10px;
+            flex: 1;
+            display: flex;
+            flex-direction: column;
+            .list {
+                flex: 1;
+            }
+            >>> .el-icon-delete {
+                font-size: 16px;
+            }
+        }
+        >>> .ql-editor {
+            min-height: 300px !important;
+        }
     }
-  }
 }
-</style>
+</style>