Browse Source

ITSM流程配置

lilinfeng 4 months ago
parent
commit
0d73006338

+ 2 - 2
.env.production

@@ -2,7 +2,7 @@
 ENV = 'production'
 
 # VUE_APP_BASE_API = 'http://192.168.103.102:58080'
-# VUE_APP_BASE_API = 'http://192.168.103.104:58080'
+VUE_APP_BASE_API = 'http://192.168.103.104:58080'
 # VUE_APP_BASE_API = 'https://test.api.shidaiyun.net'
-VUE_APP_BASE_API =  "https://api.shidaiyun.net"
+# VUE_APP_BASE_API =  "https://api.shidaiyun.net"
 

+ 11 - 2
src/api/governmentCloud/processConfiguration/processConfiguration.js

@@ -67,9 +67,18 @@ export const getFiledList = (data) => {
 };
 
 // 获取用户编辑的字段列表
-export const getUpdateFiledList = (data) => {
+export const getFormJson = (data) => {
   return request({
-    url: `/api/itsm/ProcessForm/getUpdateList`,
+    url: `/api/itsm/ProcessForm/formJson`,
+    method: "POST",
+    data: data
+  });
+};
+
+// 保存编辑的字段列表
+export const saveFormJson = (data) => {
+  return request({
+    url: `/api/itsm/ProcessForm/saveFormJson`,
     method: "POST",
     data: data
   });

+ 52 - 38
src/components/Generator/generator/itsmConfig.js

@@ -48,7 +48,7 @@ export const itsmBasicComponents = [
   },
   {
     __config__: {
-      jnpfKey: "custom-inputNumber",
+      jnpfKey: "custom-number",
       label: "数字输入",
       showLabel: true,
       tag: "JnpfInputNumber",
@@ -106,7 +106,6 @@ export const itsmBasicComponents = [
     disabled: false,
     optionType: "default",
   },
-
   {
     __config__: {
       jnpfKey: "custom-checkbox",
@@ -312,65 +311,57 @@ export const itsmBasicComponents = [
     __config__: {
       jnpfKey: "custom-uploadFile",
       label: "文件上传",
-      tipLabel: "",
-      labelWidth: undefined,
       showLabel: true,
       tag: "JnpfUploadFile",
       tagIcon: "icon-ym icon-ym-generator-upload",
       tableAlign: 'left',
       tableFixed: 'none',
-      className: [],
-      defaultValue: [],
-      required: false,
       layout: "colFormItem",
       span: 24,
       dragDisabled: false,
-      visibility: ["pc", "app"],
-      tableName: "",
-      noShow: false,
-      regList: [],
-      trigger: "change"
+      defaultValue: [],// 默认值
+      valueType: null, // 默认值类型(1 与发起人相关 2 字典)
+      isApi: null, // 选择项数据源类型(1 api 2 字典)
+      fieldApi: null, // 选择项数据源
+      required: false,// 是否必填
+      noShow: false,// 是否隐藏
+      isDisplay: true,// 是否提交(1 是 2否)否:字段不给前端 processFormSubmit
+      formId: null,
+      renderKey: null,
     },
-    disabled: false,
-    accept: "",
-    fileSize: 10,
-    sizeUnit: "MB",
-    buttonText: "点击上传",
-    showTip: false,
+    disabled: false, // 是否不可编辑
+    placeholder: "请输入",
     pathType: "defaultPath",
-    isAccount: 0,
-    folder: "",
-    tipText: '',
-    limit: 9
+    fileSize: null,//文件大小限制
+    sizeUnit: null,//文件大小单位
+    limit: null,//文件个数限制
+    moduleFileId: null,//文件附件ID
+    moduleFileName: null,//文件附件名称
   },
-
   {
     __config__: {
-      jnpfKey: "custom-alert",
-      label: "提示",
-      tipLabel: "",
-      labelWidth: undefined,
-      showLabel: false,
+      jnpfKey: "custom-text",
+      label: "文本提示",
+      showLabel: true,
       tag: "JnpfAlert",
       tagIcon: "icon-ym icon-ym-generator-alert",
       tableAlign: 'left',
       tableFixed: 'none',
-      className: [],
-      required: false,
       layout: "colFormItem",
       span: 24,
       dragDisabled: false,
-      visibility: ["pc", "app"]
+      defaultValue: '这是一条文本提示',// 默认值
+      required: false,// 是否必填
+      noShow: false,// 是否隐藏
+      isDisplay: true,// 是否提交(1 是 2否)否:字段不给前端 processFormSubmit
     },
-    title: '这是一个提示',
-    type: "success",
-    showIcon: false,
-    closable: true,
-    description: '',
-    closeText: '',
+    disabled: false, // 是否不可编辑
+    placeholder: "请输入",
+    title: '这是一条文本提示',
   },
 ];
 
+//布局控件 【左面板】
 export const itsmLayoutComponents = [
   {
     __config__: {
@@ -387,4 +378,27 @@ export const itsmLayoutComponents = [
     },
     header: "模块容器",
   },
-]
+]
+
+// 高级控件 【左面板】
+export const itsmSelectComponents = [
+  {
+    __config__: {
+      jnpfKey: "custom-table",
+      tag: "CustomTable",
+      tagIcon: "icon-ym icon-ym-generator-popupTableSelect",
+      label: "表格",
+      required: false,
+      noShow: false,
+      isDisplay: true,
+      showLabel: true,
+      tableAlign: "left",
+      tableFixed: "none",
+      layout: "rowFormItem",
+      span: 24,
+      dragDisabled: false,
+      children: [],
+    },
+    disabled: false
+  },
+];

+ 47 - 1
src/components/Generator/index/DraggableItem.vue

@@ -91,11 +91,17 @@ const layouts = {
         let labelWidth = config.labelWidth ? `${config.labelWidth}px` : null
         let label = config.label ? config.parentVModel ? config.label : config.label + (this.formConf.labelSuffix || '') : ''
         if (config.showLabel === false) labelWidth = '0'
-        const Item = config.jnpfKey === 'cascader'
+        let Item = config.jnpfKey === 'cascader'
             ? <JnpfCascader props={{ props: element.props }} v-model={config.defaultValue} placeholder={element.placeholder} options={element.options} multiple={element.multiple}
                 disabled={element.disabled} show-all-levels={element.showAllLevels} separator={element.separator}
                 style={element.style} clearable={element.clearable} filterable={element.filterable} key={config.renderKey}></JnpfCascader>
             : <render key={config.renderKey} conf={element} onInput={event => { this.$set(config, 'defaultValue', event) }} />
+
+        console.log(element)
+        if (!element.__config__.isDisplay && element.__config__.jnpfKey.includes('custom')) {
+            return
+        }
+
         return (
             <el-col span={config.span} class={className}
                 nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
@@ -324,6 +330,16 @@ const layouts = {
 
         //自定义模块容器
         if (element.__config__.jnpfKey === 'custom-card') {
+
+
+            // 判断模块内是否有可提交字段,没有就不渲染
+            let flag = element.__config__.children.some(item => {
+                return item.__config__.isDisplay
+            })
+            if (!flag) {
+                return
+            }
+
             let tip = ''
             if (!element.__config__.children.length) {
                 tip = <div class="table-tip card-tip">请将组件拖到此区域(可拖多个组件)</div>
@@ -361,6 +377,36 @@ const layouts = {
                 </el-col>
             )
         }
+
+        if (element.__config__.jnpfKey === 'custom-table') {
+            let tip = ''
+            if (!element.__config__.children.length) {
+                tip = <div class="table-tip">请将组件拖到此区域(可拖多个组件)</div>
+            }
+            let toolTip = element.__config__.label
+            if (element.__config__.tipLabel && element.__config__.label) {
+                toolTip = <span slot="label">{element.__config__.label}
+                    <el-tooltip placement="top" content={element.__config__.tipLabel}>
+                        <a class='el-icon-question tooltip-question content-name'></a>
+                    </el-tooltip>
+                </span >
+            }
+            return (
+                <el-col span={element.__config__.span}>
+                    <el-row gutter={element.__config__.gutter} class={className + ' drawing-row-item-table'}
+                        nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
+                        <span class="component-name" >{toolTip} </span>
+                        {tip}
+                        <el-form label-position="top">
+                            <draggable list={element.__config__.children} animation={340} group={group} class="drag-wrapper custom-table-wrapper table-wrapper-web" onEnd={onEnd} clone={cloneComponent}>
+                                {child}
+                            </draggable>
+                        </el-form>
+                        {components.itemBtns.apply(this, arguments)}
+                    </el-row>
+                </el-col>
+            )
+        }
     }
 }
 function cloneComponent(origin) {

+ 104 - 7
src/components/Generator/index/Home.vue

@@ -1,7 +1,7 @@
 
 <template>
     <div class="container">
-        <div class="left-board">
+        <div class="left-board" v-if="!isITSM">
             <el-scrollbar class="left-scrollbar">
                 <div class="components-list">
                     <div v-for="(item, listIndex) in leftComponents" :key="listIndex"
@@ -25,6 +25,37 @@
                 </div>
             </el-scrollbar>
         </div>
+
+        <div class="custom-left-board " v-if="isITSM">
+            <div class="action-bar"
+                style="justify-content: space-between;align-items: center;text-align: left; display: flex">
+                <span>字段列表</span>
+
+            </div>
+            <div style="padding: 10px">
+                <el-button size="mini" type="primary"
+                    @click="changeIsdisplay(true)">改为提交</el-button>
+                <el-button size="mini" type="danger"
+                    @click="changeIsdisplay(false)">改为不提交</el-button>
+            </div>
+            <el-table :data="tableData" style="width: 100%" default-expand-all
+                ref="multipleTableRef" @selection-change="handleSelectionChange" border
+                height="calc(100% - 110px)">
+                <el-table-column type="selection" width="40">
+                </el-table-column>
+                <el-table-column prop="__config__.label" label="字段名称">
+                </el-table-column>
+                <el-table-column prop="__config__.isDisplay" label="是否提交">
+                    <template slot-scope="scope">
+                        <el-tag :type="scope.row.__config__.isDisplay ? 'success' : 'danger'"
+                            disable-transitions>
+                            {{scope.row.__config__.isDisplay ?'是':'否'}}</el-tag>
+                    </template>
+                </el-table-column>
+                <!-- 其他列 -->
+            </el-table>
+
+        </div>
         <div class="center-board">
             <div class="action-bar">
                 <div class="action-bar-right">
@@ -110,7 +141,8 @@
         <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" />
+            :isITSM="isITSM" :drawingList="drawingList" @setVModel="setVModel"
+            @copyItem="drawingItemCopy" />
         <json-drawer size="550px" :visible.sync="jsonDrawerVisible" :jsonData="formData"
             @refresh="refreshJson" />
         <Preview :visible.sync="previewVisible" :form-data="formData" />
@@ -131,7 +163,7 @@ import {
 
 //引入政务云独有组件
 import {
-    itsmBasicComponents, itsmLayoutComponents
+    itsmBasicComponents, itsmLayoutComponents, itsmSelectComponents
 } from '@/components/Generator/generator/itsmConfig'
 
 import { noVModelList, noTableAllowList, calculateItem, onlinePeculiarList } from '@/components/Generator/generator/comConfig'
@@ -145,6 +177,7 @@ import {
     getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf
 } from '@/components/Generator/utils/db'
 import { validURL, isUrl } from '@/utils/validate'
+import object from 'element-resize-detector/src/detection-strategy/object'
 
 const emptyActiveData = { style: {}, autosize: {} }
 let oldActiveId
@@ -161,7 +194,25 @@ export default {
         DraggableItemApp,
         Preview
     },
-    props: ['conf', 'modelType', 'webType', 'dbType', 'formInfo', 'isITSM',],
+    // props: [{}'conf', 'modelType', 'webType', 'dbType', 'formInfo', 'isITSM',],
+    props: {
+        conf: {
+            type: Object,
+            deep: true
+        },
+        modelType: {
+        },
+        webType: {
+        },
+        dbType: {
+        },
+        formInfo: {
+        },
+        isITSM: {
+        },
+        itsmDrawingList: {
+        },
+    },
     data() {
         return {
             idGlobal: 100,
@@ -216,7 +267,9 @@ export default {
                     rowspan: 1,
                     colspan: 1
                 }
-            }
+            },
+            multipleSelection: [], // 存储选中的行,
+            tableData: []
         }
     },
     provide() {
@@ -342,7 +395,7 @@ export default {
                 //   this.isDrawingListChange = true
                 //   return
                 // }
-                this.$emit('drawingListChange')
+                this.$emit('drawingListChange', this.drawingList)
             },
             deep: true
         },
@@ -390,7 +443,20 @@ export default {
                     title: '布局控件',
                     list: itsmLayoutComponents
                 },
+                {
+                    title: '高级控件',
+                    list: itsmSelectComponents
+                }
             ]
+
+            this.drawingList = this.itsmDrawingList
+
+            //整理左侧展示的表格数据
+            this.itsmDrawingList.forEach(item => {
+                console.log(item)
+                this.tableData.push(...item.__config__.children)
+            }
+            )
         }
     },
     mounted() {
@@ -402,6 +468,18 @@ export default {
         }
     },
     methods: {
+        handleSelectionChange(val) {
+            console.log(val)
+            this.multipleSelection = val; // 当表格的选项发生变化时,更新选中项数组
+        },
+        changeIsdisplay(type) {
+            this.multipleSelection.forEach(item => {
+                item.__config__.isDisplay = type
+            })
+            this.$message.success('设置成功')
+            this.$refs.multipleTableRef.clearSelection()
+        },
+
         // 供父组件使用 获取表单JSON
         getData() {
             return new Promise((resolve, reject) => {
@@ -559,6 +637,24 @@ export default {
             this.activeId = element.__config__.formId
         },
         onEnd(obj) {
+            console.log('onEnd')
+            console.log(obj)
+            console.log(tempActiveData)
+
+
+            // 增加组织向自定义表格内拖入不匹配移动端的组件
+            if (obj.to.className.indexOf('custom-table-wrapper') > -1) {
+                if (['custom-input', 'custom-select', 'custom-number'].includes(tempActiveData.__config__.jnpfKey)) {
+                } else {
+                    obj.to.__vue__.realList.splice(obj.newIndex, 1);
+                    this.$message({
+                        message: '暂不支持向自定义表格内拖入该控件',
+                        type: 'warning'
+                    });
+                }
+            }
+
+
             this.showTip = true
             if (obj.from !== obj.to) {
                 this.activeData = tempActiveData
@@ -586,6 +682,7 @@ export default {
             }
         },
         onTableEnd(obj, target, conf) {
+            console.log('tableEnd')
             if (obj.from == obj.to) return
             if (obj.to.className.indexOf('table-wrapper') < 0) {
                 this.$set(this.activeItem.__config__, 'isSubTable', false)
@@ -635,7 +732,7 @@ export default {
                     item.__config__.parentVModel = parent.__vModel__
                 }
             } else if (config.layout === 'rowFormItem') {
-                if (config.jnpfKey === 'table') {
+                if (config.jnpfKey === 'table' || config.jnpfKey === 'custom-table') {
                     item.__vModel__ = this.toggleVmodelCase(`${config.jnpfKey}Field${this.idGlobal}`);
                 }
                 config.componentName = `row${this.idGlobal}`

+ 3 - 5
src/components/Generator/index/RightComponents/CCheckbox.vue

@@ -71,14 +71,14 @@
             </el-form-item>
 
         </template>
-        <el-form-item label="默认值">
+        <!-- <el-form-item label="默认值">
             <el-checkbox-group v-model="activeData.__config__.defaultValue" :min="activeData.min"
                 :max="activeData.max">
                 <el-checkbox :label="item[activeData.props.value]"
                     v-for="(item,i) in activeData.options" :key="i">
                     {{item[activeData.props.label]}}</el-checkbox>
             </el-checkbox-group>
-        </el-form-item>
+        </el-form-item> -->
         <el-divider />
     </el-row>
 </template>
@@ -115,9 +115,7 @@ export default {
                 })
             }
 
-            if (this.activeData.__config__.isApi == '2') {
-                this.dictionaryTypeChange(this.activeData.__config__.fieldApi)
-            }
+
         }
 
 

+ 1 - 3
src/components/Generator/index/RightComponents/CGroup.vue

@@ -105,9 +105,7 @@ export default {
                 })
             }
 
-            if (this.activeData.__config__.isApi == '2') {
-                this.dictionaryTypeChange(this.activeData.__config__.fieldApi)
-            }
+
         }
     },
     methods: {

+ 3 - 7
src/components/Generator/index/RightComponents/CInput.vue

@@ -10,18 +10,13 @@
 
         <template v-if="activeData.__config__.valueType == '1'">
             <el-form-item label="发起类型">
-                <el-select v-model="activeData.__config__.defaultValue" placeholder="请选择发起类型">
+                <el-select v-model="activeData.__config__.defaultValue" placeholder="请选择发起类型"
+                    clearable>
                     <el-option :label="item.fullName" :value="item.enCode"
                         v-for="item,index in startOptions" :key="index"></el-option>
                 </el-select>
             </el-form-item>
         </template>
-
-        <template v-if="activeData.__config__.valueType == '2'">
-            <el-form-item label="默认值">
-                <el-input v-model="activeData.__config__.defaultValue" placeholder="请输入默认值" />
-            </el-form-item>
-        </template>
     </el-row>
 </template>
 <script>
@@ -38,6 +33,7 @@ export default {
     },
     created() {
         if (this.activeData.__config__.valueType == '1') {
+            console.log('inputCreated')
             this.getStartOptions();
         }
     },

+ 1 - 3
src/components/Generator/index/RightComponents/CMember.vue

@@ -58,9 +58,7 @@ export default {
                 })
             }
 
-            if (this.activeData.__config__.isApi == '2') {
-                this.dictionaryTypeChange(this.activeData.__config__.fieldApi)
-            }
+
         }
 
         if (this.activeData.__config__.valueType == '1') {

+ 1 - 3
src/components/Generator/index/RightComponents/CRadio.vue

@@ -105,9 +105,7 @@ export default {
                 })
             }
 
-            if (this.activeData.__config__.isApi == '2') {
-                this.dictionaryTypeChange(this.activeData.__config__.fieldApi)
-            }
+
         }
     },
     methods: {

+ 8 - 7
src/components/Generator/index/RightComponents/CSelect.vue

@@ -154,21 +154,22 @@ export default {
         }
     },
     created() {
+
+        if (this.activeData.__config__.valueType == '1') {
+            this.getStartOptions();
+        }
+
         if (this.activeData.__config__.isApi && this.activeData.__config__.fieldApi) {
-            if (this.activeData.__config__.isApi == '1') {
+            if (this.activeData.__config__.isApi == '1' && this.activeData.__config__.valueType !== '1') {
                 this.getApiOption(this.activeData.__config__.fieldApi).then((res) => {
                     this.activeData.options = res.data
                 })
             }
 
-            if (this.activeData.__config__.isApi == '2') {
-                this.dictionaryTypeChange(this.activeData.__config__.fieldApi)
-            }
-        }
 
-        if (this.activeData.__config__.valueType == '1') {
-            this.getStartOptions();
         }
+
+
     },
     methods: {
         valueTypeChange(e) {

+ 27 - 0
src/components/Generator/index/RightComponents/CText.vue

@@ -0,0 +1,27 @@
+<template>
+    <el-row>
+        <el-form-item label="提示文本">
+            <el-input type="textarea" v-model="activeData.__config__.defaultValue"
+                placeholder="请输入默认值" @input="onInput" />
+        </el-form-item>
+    </el-row>
+</template>
+<script>
+import comMixin from './mixin';
+export default {
+    props: ['activeData'],
+    mixins: [comMixin],
+    components: {},
+    data() {
+        return {
+        }
+    },
+    created() {
+    },
+    methods: {
+        onInput(e) {
+            this.activeData.title = e
+        }
+    }
+}
+</script>

+ 122 - 0
src/components/Generator/index/RightComponents/CUpload.vue

@@ -0,0 +1,122 @@
+<template>
+    <el-row>
+        <el-form-item label="文件大小">
+            <el-input v-model.number="activeData.fileSize" placeholder="请输入文件大小" @change="onChange">
+                <el-select slot="append" v-model="activeData.sizeUnit" :style="{ width: '66px' }"
+                    @change="onChange">
+                    <el-option label="KB" value="KB" />
+                    <el-option label="MB" value="MB" />
+                </el-select>
+            </el-input>
+        </el-form-item>
+        <el-form-item label="最大上传数">
+            <el-input-number v-model="activeData.limit" :min="0" placeholder="最大上传数" :step="1"
+                :precision="0" controls-position="right" />
+        </el-form-item>
+        <el-form-item label="附件名称">
+            <el-input v-model="activeData.moduleFileName" placeholder="请上传附件" disabled />
+        </el-form-item>
+        <el-form-item label="附件地址">
+            <el-input v-model="activeData.moduleFileId" placeholder="请上传附件" disabled />
+        </el-form-item>
+        <el-form-item label="附件">
+            <el-upload class="upload-demo" action="http://localhost:3000/dev/api/minio/upload"
+                :data="uploadData" :headers="uploadHeaders" :on-success="uploadSuccess"
+                :before-upload="beforeUpload" :on-remove="onRemove" :limit="1"
+                :on-preview="onPreview">
+                <el-button size="small" type="primary">点击上传</el-button>
+            </el-upload>
+        </el-form-item>
+
+    </el-row>
+</template>
+
+
+<script>
+import comMixin from './mixin';
+
+import { getToken } from '@/utils/auth'
+
+
+export default {
+    props: ['activeData'],
+    mixins: [comMixin],
+    data() {
+        return {
+            uploadData: {
+                type: "process/template"
+
+            },
+            uploadHeaders: {
+                Authorization: getToken(),
+            }
+        }
+    },
+    computed: {
+        acceptArray: {
+            get() {
+                if (!this.activeData.accept) return []
+                const str = this.activeData.accept.replace('.xls,.xlsx', '.xls|.xlsx').replace('.doc,.docx', '.doc|.docx')
+                const list = str.split(',').map(o => o.replace('|', ','))
+                return list
+            },
+            set(val) {
+                this.activeData.accept = val.join(',');
+            }
+        },
+    },
+    created() { },
+    methods: {
+        onChange() {
+            this.activeData.__config__.renderKey = +new Date()
+        },
+        uploadSuccess(res, file) {
+            console.log(res)
+            console.log(file)
+            this.activeData.moduleFileId = res.data.url
+
+        },
+        beforeUpload(file) {
+            this.activeData.moduleFileName = file.name
+        },
+        onRemove() {
+            this.activeData.moduleFileId = null
+            this.activeData.moduleFileName = null
+        },
+        onPreview() {
+            this.pcDownloadFile(this.activeData.moduleFileId, this.activeData.moduleFileName)
+        },
+        pcDownloadFile(url, name) {
+            console.log(url)
+            url = 'http://47.95.1.150:9001/' + url
+            //保存到本地
+            try {
+                const x = new window.XMLHttpRequest();
+                x.open('GET', url, true);
+                x.responseType = 'blob';
+                x.onload = () => {
+                    const url = window.URL.createObjectURL(x.response);
+                    const a = document.createElement('a');
+                    a.href = url;
+                    a.download = name;
+                    a.click();
+                };
+                x.send();
+
+
+                this.$message({
+                    message: '下载成功',
+                    type: 'success',
+                    duration: 1000,
+                })
+            } catch (error) {
+                this.$message({
+                    message: '下载失败',
+                    type: 'warning',
+                    duration: 1000,
+                })
+            }
+        },
+    }
+}
+</script>

+ 39 - 12
src/components/Generator/index/RightPanel.vue

@@ -2,15 +2,16 @@
     <div class="right-board">
         <el-tabs v-model="currentTab" class="center-tabs">
             <el-tab-pane label="组件属性" name="field" />
-            <el-tab-pane label="组件样式" name="style" />
-            <el-tab-pane label="表单属性" name="form" />
+            <template v-if="!isITSM">
+                <el-tab-pane label="组件样式" name="style" />
+                <el-tab-pane label="表单属性" name="form" />
+            </template>
         </el-tabs>
         <div class="field-box">
             <el-scrollbar class="right-scrollbar">
                 <!-- 组件属性 -->
                 <el-form v-show="currentTab==='field' && showField" size="small" label-width="90px"
                     labelPosition="left">
-                    <span>{{activeData.__config__.jnpfKey}}</span>
                     <template v-if="activeData.__config__&&activeData.__config__.jnpfKey">
                         <template
                             v-if="!['tableGridTr', 'tableGridTd'].includes(activeData.__config__.jnpfKey)">
@@ -453,7 +454,7 @@
 
                         <!-- 自定义组件公共属性 -->
                         <template
-                            v-if="activeData.__config__.jnpfKey.includes('custom') && activeData.__config__.jnpfKey!=='custom-card'">
+                            v-if="activeData.__config__.jnpfKey.includes('custom') && activeData.__config__.jnpfKey!=='custom-card' && activeData.__config__.jnpfKey!=='custom-text'">
                             <el-form-item label="控件标题">
                                 <el-input v-model="activeData.__config__.label"
                                     placeholder="请输入控件标题" />
@@ -464,14 +465,16 @@
                             <el-form-item label="是否禁用">
                                 <el-switch v-model="activeData.disabled" />
                             </el-form-item>
-                            <el-form-item label="是否隐藏">
-                                <el-switch v-model="activeData.__config__.noShow" />
-                            </el-form-item>
                             <el-form-item label="是否提交">
                                 <el-switch v-model="activeData.__config__.isDisplay" />
                             </el-form-item>
                         </template>
 
+                        <el-form-item label="是否隐藏"
+                            v-if="activeData.__config__.jnpfKey!=='custom-card'">
+                            <el-switch v-model="activeData.__config__.noShow" />
+                        </el-form-item>
+
                         <!-- 自定义组件 -->
 
                         <!-- 自定义custom-input -->
@@ -482,8 +485,8 @@
                         <template v-if="activeData.__config__.jnpfKey==='custom-textarea'">
                             <CTextarea :active-data="activeData"></CTextarea>
                         </template>
-                        <!-- 自定义custom-inputNumber -->
-                        <template v-if="activeData.__config__.jnpfKey==='custom-inputNumber'">
+                        <!-- 自定义custom-number -->
+                        <template v-if="activeData.__config__.jnpfKey==='custom-number'">
                             <CInputNumber :active-data="activeData"></CInputNumber>
                         </template>
                         <!-- 自定义custom-radio -->
@@ -531,6 +534,18 @@
                             </CMember>
                         </template>
 
+                        <!-- 自定义custom-upload -->
+                        <template v-if="activeData.__config__.jnpfKey==='custom-uploadFile'">
+                            <CUpload :active-data="activeData">
+                            </CUpload>
+                        </template>
+
+                        <!-- 自定义custom-text -->
+                        <template v-if="activeData.__config__.jnpfKey==='custom-text'">
+                            <CText :active-data="activeData">
+                            </CText>
+                        </template>
+
                         <!-- row 布局 -->
                         <template v-if="activeData.__config__.jnpfKey==='row'">
                             <el-form-item v-if="activeData.__config__.componentName!==undefined"
@@ -806,6 +821,13 @@
 <script>
 import { noVModelList, calculateItem, onlinePeculiarList } from '@/components/Generator/generator/comConfig'
 import { inputComponents, selectComponents, systemComponents, layoutComponents } from '@/components/Generator/generator/config'
+
+//引入政务云独有组件
+import {
+    itsmBasicComponents, itsmLayoutComponents, itsmSelectComponents
+} from '@/components/Generator/generator/itsmConfig'
+
+
 import { isNumberStr } from '@/components/Generator/utils'
 import { saveFormConf, getDrawingList } from '@/components/Generator/utils/db'
 import { getDictionaryTypeSelector } from "@/api/systemData/dictionary"
@@ -861,6 +883,9 @@ import CSelect from './RightComponents/CSelect.vue'
 import CCheckbox from './RightComponents/CCheckbox.vue'
 import CGroup from './RightComponents/CGroup.vue'
 import CMember from './RightComponents/CMember.vue'
+import CUpload from './RightComponents/CUpload.vue'
+import CText from './RightComponents/CText.vue'
+
 
 
 
@@ -925,10 +950,12 @@ export default {
         CCheckbox,
         CSelect,
         CGroup,
-        CMember
+        CMember,
+        CUpload,
+        CText
     },
     inject: ["getShowType", "getFormInfo"],
-    props: ['showField', 'activeData', 'formConf', 'modelType', 'webType', 'drawingList', 'formInfo'],
+    props: ['showField', 'activeData', 'formConf', 'modelType', 'webType', 'drawingList', 'formInfo', 'isITSM'],
     data() {
         return {
             currentTab: 'field',
@@ -1101,7 +1128,7 @@ export default {
             return list
         },
         getCompName() {
-            const allComps = [...inputComponents, ...selectComponents, ...systemComponents, ...layoutComponents, calculateItem, ...onlinePeculiarList]
+            const allComps = [...inputComponents, ...selectComponents, ...systemComponents, ...layoutComponents, calculateItem, ...onlinePeculiarList, ...itsmBasicComponents, ...itsmLayoutComponents, ...itsmSelectComponents]
             const comp = allComps.filter(o => o.__config__.jnpfKey === this.activeData.__config__.jnpfKey);
             if (!comp.length) return '';
             return comp[0].__config__.label;

+ 7 - 0
src/components/Generator/render/render.js

@@ -105,6 +105,13 @@ export default {
     // 将json表单配置转化为vue render可以识别的 “数据对象(dataObject)”
     buildDataObject.call(this, confClone, dataObject, this.formData)
 
+
+
+    // 单独给table组件做特殊处理
+    if (this.conf.__config__.jnpfKey == 'custom-table') {
+      dataObject.props.columns = this.conf.children
+    }
+
     return h(this.conf.__config__.tag, dataObject, children)
   }
 }

+ 16 - 0
src/components/Generator/styles/home.scss

@@ -104,6 +104,22 @@ $lighterBlue: #409EFF;
   border-radius: 4px;
 }
 
+.custom-left-board {
+  width: 250px;
+  position: absolute;
+  left: 0;
+  top: 0;
+  height: 100%;
+  overflow: hidden;
+  border-radius: 4px;
+  background-color: #fff;
+
+  .el-table {
+    padding: 10px;
+    padding-bottom: 30px;
+  }
+}
+
 .left-scrollbar {
   height: 100%;
   overflow: hidden;

+ 105 - 0
src/components/ITSM/CustomTable/index.vue

@@ -0,0 +1,105 @@
+<template>
+    <div class="popupSelect-container">
+        <el-table :data="tableData" style="width: 100%">
+            <el-table-column v-for="column,columnIndex in columns" :key="columnIndex"
+                :prop="column.__vModel__" :label="column.__config__.label">
+                <template slot-scope="scope">
+                    <el-input
+                        v-if="['custom-input','custom-number','custom-textarea'].includes(column.__config__.jnpfKey)"
+                        v-model="scope.row[column.__vModel__]" disabled
+                        :placeholder="'请输入'+column.__config__.label"></el-input>
+
+                    <el-select
+                        v-if="['custom-select','custom-selectMany'].includes(column.__config__.jnpfKey)"
+                        v-model="scope.row[column.__vModel__]"
+                        :placeholder="'请选择'+column.__config__.label" disabled>
+
+                    </el-select>
+                </template>
+            </el-table-column>
+
+        </el-table>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'CustomTable',
+    props: {
+        columns: {
+            type: Array,
+            required: true,
+            default: () => {
+                return []
+            }
+        }
+    },
+    data() {
+        return {
+            tableData: [{}]
+        }
+    },
+    watch: {
+
+    },
+    computed: {
+
+    },
+    created() {
+        console.log(this.tableData)
+        console.log(this.columns)
+
+        this.columns.forEach((item, index) => {
+            console.log(item)
+            // let obj = {
+            //     type: this.getTableColumnType(item.__config__.jnpfKey),
+            //     label: item.__config__.label,
+            //     prop: item.__vModel__
+            // }
+            this.tableData[0][item.__vModel__] = item.__config__.defaultValue
+        })
+
+        this.tableData = [
+            {
+                name: '张三',
+            }
+        ]
+    },
+    methods: {
+        getTableColumnType(type) {
+            let mappingList = [
+                {
+                    jnpfKey: 'custom-input',
+                    columnType: 'input',
+                    type: 'normal'
+                },
+                {
+                    jnpfKey: 'custom-textArea',
+                    columnType: 'input',
+                    type: 'normal'
+                },
+                {
+                    jnpfKey: 'custom-number',
+                    columnType: 'input',
+                    type: 'number'
+                },
+                {
+                    jnpfKey: 'custom-selectMany',
+                    columnType: 'select'
+                },
+                {
+                    jnpfKey: 'custom-select',
+                    columnType: 'select'
+                }
+            ]
+        }
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.fr {
+    float: right;
+}
+</style>

+ 7 - 0
src/components/index.js

@@ -53,6 +53,10 @@ import JnpfCalculate from '@/components/Jnpf/Calculate'
 import JnpfAutoComplete from '@/components/Jnpf/AutoComplete'
 import JnpfOpenData from '@/components/Jnpf/OpenData'
 
+
+// 自定义组件 custom-table
+import CustomTable from '@/components/ITSM/CustomTable'
+
 import NumRange from '@/components/Generator/components/NumRange'
 import DicSelect from '@/components/Generator/components/DicSelect'
 import BillRule from '@/components/Generator/components/BillRule'
@@ -126,5 +130,8 @@ export default {
     Vue.component('JnpfSign', Sign)
     Vue.component('JnpfLocation', Location)
 
+    // 自定义组件 custom-table
+    Vue.component('CustomTable', CustomTable)
+
   }
 }

+ 157 - 149
src/views/generator/webForm/Form.vue

@@ -1,134 +1,142 @@
 <template>
-  <el-dialog :visible.sync="visible" fullscreen lock-scroll class="JNPF-full-dialog"
-    :show-close="false" :modal="false">
-    <div class="JNPF-full-dialog-header">
-      <div class="header-title">
-        <img src="@/assets/images/jnpf.png" class="header-logo" />
-        <p class="header-txt" v-if="activeStep==0"> · 代码生成</p>
-        <el-tooltip effect="dark" :content="dataForm.fullName" placement="bottom" v-else>
-          <p class="header-txt"> · {{dataForm.fullName}}</p>
-        </el-tooltip>
-      </div>
-      <el-steps :active="activeStep" finish-status="success" simple
-        :class="'steps steps'+(maxStep+1)" v-if="!loading">
-        <el-step title="基础设置" @click.native="stepChick(0)" />
-        <el-step title="表单设计" @click.native="stepChick(1)" />
-        <el-step title="列表设计" @click.native="stepChick(2)" v-if="maxStep>=2" />
-      </el-steps>
-      <div class="options">
-        <el-button @click="changeList(1)" v-if="activeStep==2&&dataForm.webType==2" type="warning">
-          关闭列表
-        </el-button>
-        <el-button @click="prev" :disabled="activeStep<=0">{{$t('common.prev')}}</el-button>
-        <el-button @click="next" :disabled="activeStep>=maxStep || loading">{{$t('common.next')}}
-        </el-button>
-        <el-button type="primary" @click="dataFormSubmit()" :disabled="loading"
-          :loading="btnLoading">{{$t('common.saveButton')}}</el-button>
-        <el-button @click="closeDialog()">{{$t('common.cancelButton')}}</el-button>
-      </div>
-    </div>
-    <div class="main" v-loading="loading">
-      <el-row type="flex" justify="center" align="middle" v-if="!activeStep" class="basic-box">
-        <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="10" class="basicForm">
-          <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px"
-            @submit.native.prevent label-position="right">
-            <el-form-item label="模板名称" prop="fullName">
-              <el-input v-model="dataForm.fullName" placeholder="模板名称" maxlength="100">
-              </el-input>
-            </el-form-item>
-            <el-form-item label="模板编码" prop="enCode">
-              <el-input v-model="dataForm.enCode" placeholder="模板编码" maxlength="50">
-              </el-input>
-            </el-form-item>
-            <el-form-item label="模板分类" prop="category">
-              <el-select v-model="dataForm.category" placeholder="选择分类" filterable>
-                <el-option :key="item.id" :label="item.fullName" :value="item.id"
-                  v-for="item in categoryList" />
-              </el-select>
-            </el-form-item>
-            <el-form-item label="模板类型" prop="enableFlow">
-              <el-radio-group v-model="dataForm.enableFlow" size="small">
-                <el-radio-button :label="0">普通表单</el-radio-button>
-                <el-radio-button :label="1">流程表单</el-radio-button>
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item label="模板说明" prop="description">
-              <el-input v-model="dataForm.description" placeholder="模板说明" type="textarea"
-                :rows="3" />
-            </el-form-item>
-            <el-form-item label="数据连接">
-              <el-select v-model="dataForm.dbLinkId" placeholder="请选择数据库" @change="onDbChange"
-                clearable filterable>
-                <el-option-group v-for="group in dbOptions" :key="group.fullName"
-                  :label="group.fullName">
-                  <el-option v-for="item in group.children" :key="item.id" :label="item.fullName"
-                    :value="item.id" />
-                </el-option-group>
-              </el-select>
-            </el-form-item>
-            <el-table :data="tables" class="JNPF-common-table"
-              empty-text="点击“新增”可选择1条(单表)或2条以上(多表)">
-              <el-table-column type="index" label="序号" width="50" align="center" />
-              <el-table-column prop="typeId" label="类别" width="65">
-                <template slot-scope="scope">
-                  <el-tag v-if="scope.row.typeId=='1'">主表</el-tag>
-                  <el-tag type="warning" v-else @click="changeTable(scope.row)"
-                    style="cursor:pointer" title="点击设置成主表">从表</el-tag>
-                </template>
-              </el-table-column>
-              <el-table-column prop="table" label="表名">
-                <template slot-scope="scope">
-                  <el-tooltip :content="scope.row.tableName||scope.row.table" placement="top">
-                    <span>{{scope.row.table}}</span>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-              <el-table-column prop="tableField" label="外键字段">
-                <template slot-scope="scope" v-if="scope.row.typeId !=='1'">
-                  <el-select v-model="scope.row.tableField" placeholder="请选择" filterable>
-                    <el-option v-for="item in scope.row.fields" :key="item.field"
-                      :label="item.field" :value="item.field">
-                    </el-option>
-                  </el-select>
-                </template>
-              </el-table-column>
-              <!-- <el-table-column prop="relationTable" label="关联主表" /> -->
-              <el-table-column prop="relationField" label="关联主键">
-                <template slot-scope="scope" v-if="scope.row.typeId !=='1'">
-                  <el-select v-model="scope.row.relationField" placeholder="请选择" filterable>
-                    <el-option v-for="item in mainTableFields" :key="item.field" :label="item.field"
-                      :value="item.field">
-                    </el-option>
-                  </el-select>
-                </template>
-              </el-table-column>
-              <el-table-column label="操作" fixed="right" width="50">
-                <template slot-scope="scope">
-                  <el-button size="mini" type="text" class="JNPF-table-delBtn"
-                    @click="delItem(scope.row,scope.$index)">移除
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-            <div class="table-actions" @click="openTableBox">
-              <el-button type="text" icon="el-icon-plus">新增一行</el-button>
+    <el-dialog :visible.sync="visible" fullscreen lock-scroll class="JNPF-full-dialog"
+        :show-close="false" :modal="false">
+        <div class="JNPF-full-dialog-header">
+            <div class="header-title">
+                <img src="@/assets/images/jnpf.png" class="header-logo" />
+                <p class="header-txt" v-if="activeStep==0"> · 代码生成</p>
+                <el-tooltip effect="dark" :content="dataForm.fullName" placement="bottom" v-else>
+                    <p class="header-txt"> · {{dataForm.fullName}}</p>
+                </el-tooltip>
             </div>
-          </el-form>
-        </el-col>
-      </el-row>
-      <template v-if="activeStep==1">
-        <Generator ref="generator" :conf="formData" :modelType="dataForm.type"
-          :webType="dataForm.webType" :dbType="dbType" :formInfo='dataForm'/>
-      </template>
-      <template v-if="activeStep==2">
-        <columnDesign ref="columnDesign" :columnData="columnData" :appColumnData="appColumnData"
-          :modelType="dataForm.type" :webType="dataForm.webType" :dbType="dbType"
-          @openList="changeList(2)" />
-      </template>
-    </div>
-    <TableForm :visible.sync="formVisible" ref="tableForm" @closeForm="closeForm"
-      :dbLinkId="dataForm.dbLinkId" />
-  </el-dialog>
+            <el-steps :active="activeStep" finish-status="success" simple
+                :class="'steps steps'+(maxStep+1)" v-if="!loading">
+                <el-step title="基础设置" @click.native="stepChick(0)" />
+                <el-step title="表单设计" @click.native="stepChick(1)" />
+                <el-step title="列表设计" @click.native="stepChick(2)" v-if="maxStep>=2" />
+            </el-steps>
+            <div class="options">
+                <el-button @click="changeList(1)" v-if="activeStep==2&&dataForm.webType==2"
+                    type="warning">
+                    关闭列表
+                </el-button>
+                <el-button @click="prev" :disabled="activeStep<=0">{{$t('common.prev')}}</el-button>
+                <el-button @click="next"
+                    :disabled="activeStep>=maxStep || loading">{{$t('common.next')}}
+                </el-button>
+                <el-button type="primary" @click="dataFormSubmit()" :disabled="loading"
+                    :loading="btnLoading">{{$t('common.saveButton')}}</el-button>
+                <el-button @click="closeDialog()">{{$t('common.cancelButton')}}</el-button>
+            </div>
+        </div>
+        <div class="main" v-loading="loading">
+            <el-row type="flex" justify="center" align="middle" v-if="!activeStep"
+                class="basic-box">
+                <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="10" class="basicForm">
+                    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px"
+                        @submit.native.prevent label-position="right">
+                        <el-form-item label="模板名称" prop="fullName">
+                            <el-input v-model="dataForm.fullName" placeholder="模板名称"
+                                maxlength="100">
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item label="模板编码" prop="enCode">
+                            <el-input v-model="dataForm.enCode" placeholder="模板编码" maxlength="50">
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item label="模板分类" prop="category">
+                            <el-select v-model="dataForm.category" placeholder="选择分类" filterable>
+                                <el-option :key="item.id" :label="item.fullName" :value="item.id"
+                                    v-for="item in categoryList" />
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="模板类型" prop="enableFlow">
+                            <el-radio-group v-model="dataForm.enableFlow" size="small">
+                                <el-radio-button :label="0">普通表单</el-radio-button>
+                                <el-radio-button :label="1">流程表单</el-radio-button>
+                            </el-radio-group>
+                        </el-form-item>
+                        <el-form-item label="模板说明" prop="description">
+                            <el-input v-model="dataForm.description" placeholder="模板说明"
+                                type="textarea" :rows="3" />
+                        </el-form-item>
+                        <el-form-item label="数据连接">
+                            <el-select v-model="dataForm.dbLinkId" placeholder="请选择数据库"
+                                @change="onDbChange" clearable filterable>
+                                <el-option-group v-for="group in dbOptions" :key="group.fullName"
+                                    :label="group.fullName">
+                                    <el-option v-for="item in group.children" :key="item.id"
+                                        :label="item.fullName" :value="item.id" />
+                                </el-option-group>
+                            </el-select>
+                        </el-form-item>
+                        <el-table :data="tables" class="JNPF-common-table"
+                            empty-text="点击“新增”可选择1条(单表)或2条以上(多表)">
+                            <el-table-column type="index" label="序号" width="50" align="center" />
+                            <el-table-column prop="typeId" label="类别" width="65">
+                                <template slot-scope="scope">
+                                    <el-tag v-if="scope.row.typeId=='1'">主表</el-tag>
+                                    <el-tag type="warning" v-else @click="changeTable(scope.row)"
+                                        style="cursor:pointer" title="点击设置成主表">从表</el-tag>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="table" label="表名">
+                                <template slot-scope="scope">
+                                    <el-tooltip :content="scope.row.tableName||scope.row.table"
+                                        placement="top">
+                                        <span>{{scope.row.table}}</span>
+                                    </el-tooltip>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="tableField" label="外键字段">
+                                <template slot-scope="scope" v-if="scope.row.typeId !=='1'">
+                                    <el-select v-model="scope.row.tableField" placeholder="请选择"
+                                        filterable>
+                                        <el-option v-for="item in scope.row.fields"
+                                            :key="item.field" :label="item.field"
+                                            :value="item.field">
+                                        </el-option>
+                                    </el-select>
+                                </template>
+                            </el-table-column>
+                            <!-- <el-table-column prop="relationTable" label="关联主表" /> -->
+                            <el-table-column prop="relationField" label="关联主键">
+                                <template slot-scope="scope" v-if="scope.row.typeId !=='1'">
+                                    <el-select v-model="scope.row.relationField" placeholder="请选择"
+                                        filterable>
+                                        <el-option v-for="item in mainTableFields" :key="item.field"
+                                            :label="item.field" :value="item.field">
+                                        </el-option>
+                                    </el-select>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="操作" fixed="right" width="50">
+                                <template slot-scope="scope">
+                                    <el-button size="mini" type="text" class="JNPF-table-delBtn"
+                                        @click="delItem(scope.row,scope.$index)">移除
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <div class="table-actions" @click="openTableBox">
+                            <el-button type="text" icon="el-icon-plus">新增一行</el-button>
+                        </div>
+                    </el-form>
+                </el-col>
+            </el-row>
+            <template v-if="activeStep==1">
+                <Generator ref="generator" :conf="formData" :modelType="dataForm.type"
+                    :webType="dataForm.webType" :dbType="dbType" :formInfo='dataForm' />
+            </template>
+            <template v-if="activeStep==2">
+                <columnDesign ref="columnDesign" :columnData="columnData"
+                    :appColumnData="appColumnData" :modelType="dataForm.type"
+                    :webType="dataForm.webType" :dbType="dbType" @openList="changeList(2)" />
+            </template>
+        </div>
+        <TableForm :visible.sync="formVisible" ref="tableForm" @closeForm="closeForm"
+            :dbLinkId="dataForm.dbLinkId" />
+    </el-dialog>
 </template>
 
 <script>
@@ -137,26 +145,26 @@ import ColumnDesign from '@/components/ColumnDesign'
 import TableForm from '../TableForm'
 import mixin from '@/mixins/generator/form'
 export default {
-  mixins: [mixin],
-  components: { Generator, ColumnDesign, TableForm },
-  data() {
-    return {
-      dataRule: {
-        fullName: [
-          { required: true, message: '模板名称不能为空', trigger: 'blur' },
-        ],
-        enCode: [
-          { required: true, message: '模板编码不能为空', trigger: 'blur' },
-          { validator: this.formValidate('enCode'), trigger: 'blur' },
-        ],
-        category: [
-          { required: true, message: '模板分类不能为空', trigger: 'change' },
-        ],
-        enableFlow: [
-          { required: true }
-        ]
-      }
+    mixins: [mixin],
+    components: { Generator, ColumnDesign, TableForm },
+    data() {
+        return {
+            dataRule: {
+                fullName: [
+                    { required: true, message: '模板名称不能为空', trigger: 'blur' },
+                ],
+                enCode: [
+                    { required: true, message: '模板编码不能为空', trigger: 'blur' },
+                    { validator: this.formValidate('enCode'), trigger: 'blur' },
+                ],
+                category: [
+                    { required: true, message: '模板分类不能为空', trigger: 'change' },
+                ],
+                enableFlow: [
+                    { required: true }
+                ]
+            }
+        }
     }
-  }
 }
 </script>

+ 27 - 116
src/views/governmentCloud/processConfiguration/AllocationNew.vue

@@ -10,7 +10,7 @@
                     </div>
                 </div>
                 <div>
-                    <el-button type="primary">
+                    <el-button type="primary" @click="saveForm">
                         保存
                     </el-button>
                     <el-button @click="closeDialog">
@@ -18,10 +18,11 @@
                     </el-button>
                 </div>
             </div>
-            <div class="content">
+            <div class="content" v-if="itsmDrawingList">
                 <Generator ref="generator" :conf="formData" :modelType="dataForm.type"
                     :webType="dataForm.webType" :dbType="dbType" :formInfo='dataForm'
-                    :isITSM="true" />
+                    @drawingListChange="drawingListChange" :isITSM="true"
+                    :itsmDrawingList="itsmDrawingList" />
             </div>
 
         </div>
@@ -33,7 +34,7 @@
 import Generator from '@/components/Generator/index/Home'
 import mixin from '@/mixins/generator/form'
 
-import { getUpdateFiledList } from "@/api/governmentCloud/processConfiguration/processConfiguration";
+import { getFormJson, saveFormJson } from "@/api/governmentCloud/processConfiguration/processConfiguration";
 
 
 
@@ -44,115 +45,15 @@ export default {
         return {
             visible: false,
             orderDetail: null,//流程数据
-            formData: {
-                "formRef": "formRef",
-                "formModel": "dataForm",
-                "size": "small",
-                "labelPosition": "right",
-                "labelWidth": 160,
-                "labelSuffix": "",
-                "formRules": "rules",
-                "popupType": "general",
-                "generalWidth": "600px",
-                "fullScreenWidth": "100%",
-                "drawerWidth": "600px",
-                "gutter": 15,
-                "disabled": false,
-                "span": 24,
-                "formBtns": false,
-                "hasCancelBtn": true,
-                "cancelButtonText": "取 消",
-                "hasConfirmBtn": true,
-                "confirmButtonText": "确 定",
-                "hasPrintBtn": false,
-                "hasConfirmAndAddBtn": true,
-                "confirmAndAddText": "确定并继续操作",
-                "printButtonText": "打 印",
-                "primaryKeyPolicy": 1,
-                "concurrencyLock": false,
-                "logicalDelete": false,
-                "printId": "",
-                "formStyle": "",
-                "classNames": [],
-                "className": [],
-                "classJson": "",
-                "funcs": {
-                    "onLoad": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n    // 在此编写代码\n    \n}",
-                    "beforeSubmit": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n    return new Promise((resolve, reject) => {\n        // 在此编写代码\n        \n        // 继续执行\n        resolve()\n    })\n}",
-                    "afterSubmit": "({ formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n    // 在此编写代码\n    \n}"
-                },
-                "idGlobal": 134,
-                "fields": [
-                    {
-                        "__config__": {
-                            "jnpfKey": "custom-card",
-                            "label": "模块容器",
-                            "tag": "el-card",
-                            "tagIcon": "icon-ym icon-ym-generator-card",
-                            "tableAlign": "left",
-                            "tableFixed": "none",
-                            "layout": "rowFormItem",
-                            "span": 24,
-                            "dragDisabled": false,
-                            "children": [
-                                {
-                                    "__config__": {
-                                        "jnpfKey": "custom-checkbox",
-                                        "label": "CHECKBOX",
-                                        "showLabel": true,
-                                        "tag": "JnpfCheckbox",
-                                        "tagIcon": "icon-ym icon-ym-generator-checkbox",
-                                        "tableAlign": "left",
-                                        "tableFixed": "none",
-                                        "defaultValue": [
-                                            "1"
-                                        ],
-                                        "required": false, // 是否必填
-                                        "layout": "colFormItem",
-                                        "span": 24,
-                                        "dragDisabled": false,
-                                        "noShow": false, // 是否隐藏
-                                        "propsUrl": "",
-
-                                        "formId": 101,
-                                        "renderKey": 1721360154554,
-                                        "isDisplay": true, // 是否提交(1 是 2否)否:字段不给前端 processFormSubmit
-                                        "id": 1150,
-                                        "valueType": null, // 默认值类型(1 与发起人相关 2 字典)
-                                        "fieldValue": null, // 默认值
-                                        "isApi": '2', // 选择项数据源类型(1 api 2 字典)
-                                        "fieldApi": '583948307240322117', // 选择项数据源
-                                        "regex": null, // 正则
-                                        "minValue": null, // 最小值
-                                        "minValueUnit": null, // 最小值单位
-                                        "maxValue": null, // 最大值
-                                        "maxValueUnit": null, // 最大值单位
-                                        "placeholder": null, // 占位符
-                                        "moduleFileId": null, // 模版文件ID
-                                        "moduleFileName": null, // 模版文件名称
-                                        "fileCount": null, // 文件上传数量
-                                        "changeCode": null, // 变更字段code
-                                        "parentDefault": null // 默认值同步
-                                    },
-                                    "props": {
-                                        "label": "fullName",
-                                        "value": "enCode"
-                                    },
-                                    "options": [],
-                                    "disabled": false, // 是否不可编辑
-                                    "__vModel__": "checkbox"
-                                },
-                            ],
-                            "formId": 134,
-                            "renderKey": 1721370342502,
-                            "componentName": "row134"
-                        },
-                        "header": "模块容器1"
-                    }
-                ]
+            itsmDrawingList: null,
+            nowList: {
+                fields: null
             }
         }
     },
+    created() {
+        console.log(this.formData)
+    },
     methods: {
         init(orderDetail, type) {
             console.log(orderDetail)
@@ -161,25 +62,35 @@ export default {
             this.visible = true
 
             let params = {
-                dataType: "1", // 数据类型 0-当前页 1-全部数据
-                currentPage: 1,
-                pageSize: 200,
-                sidx: "moduleSort,sort",
                 itsmProNum: this.orderDetail.itsmProKey, // 流程Key
                 version: this.orderDetail.version, // 版本
                 fieldOperantConfig: type, // 类别(qw qw_detail wx wx_detail)
             }
-            getUpdateFiledList(params).then(res => {
+            getFormJson(params).then(res => {
                 if (res.code == 200) {
-                    this.formData = res.data
+                    this.itsmDrawingList = res.data
                 }
             })
 
         },
+        drawingListChange(list) {
+            this.nowList.fields = JSON.parse(JSON.stringify(list))
+        },
+
         //关闭配置页面
         closeDialog() {
             this.$emit("close");
         },
+        //保存配置
+        saveForm() {
+            console.log(this.nowList)
+            saveFormJson(this.nowList).then(res => {
+                if (res.code == 200) {
+                    this.$message.success("保存成功");
+                    // this.closeDialog();
+                }
+            })
+        }
     },
 }
 </script>

+ 9 - 7
src/views/governmentCloud/processConfiguration/Form.vue

@@ -181,12 +181,13 @@
                         <div class="JNPF-common-layout-main JNPF-flex-main basic-table">
                             <el-row class="JNPF-common-search-box basic-information" :gutter="16"
                                 style="margin-bottom: 10px;padding-top: 0px;">
-                                <el-col :gutter="16" :span="12">
+                                <el-col :gutter="16" :span="12" style="max-height: 100%;">
                                     <div class="title">
                                         小程序表单信息
                                     </div>
-                                    <JNPF-table v-loading="listLoading1" :data="tableData1"
-                                        :hasNO="true">
+                                    <el-table :data="tableData1" :loding="listLoading1">
+                                        <el-table-column prop="index" type="index" width="50"
+                                            label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"
                                             label="字段名" />
                                         <el-table-column align="center" prop="itsmFormCode"
@@ -194,14 +195,15 @@
                                         <el-table-column align="center" prop="fieldType"
                                             label="字段类型" />
 
-                                    </JNPF-table>
+                                    </el-table>
                                 </el-col>
                                 <el-col :gutter="16" :span="12">
                                     <div class="title">
                                         企微表单信息
                                     </div>
-                                    <JNPF-table v-loading="listLoading2" :data="tableData2"
-                                        :hasNO="true">
+                                    <el-table :data="tableData2" :loding="listLoading2">
+                                        <el-table-column prop="index" type="index" width="50"
+                                            label="序号" align="center" />
                                         <el-table-column align="center" prop="itsmFieldName"
                                             label="字段名" />
                                         <el-table-column align="center" prop="itsmFormCode"
@@ -209,7 +211,7 @@
                                         <el-table-column align="center" prop="fieldType"
                                             label="字段类型" />
 
-                                    </JNPF-table>
+                                    </el-table>
                                 </el-col>
                             </el-row>
 

+ 2 - 2
src/views/governmentCloud/processConfiguration/index.vue

@@ -3,13 +3,13 @@
         <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-col :span="4">
                         <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-col :span="4">
                         <el-form-item label="流程编号">
                             <el-input v-model="listQuery.itsmProKey" placeholder="请输入流程编号" clearable
                                 @keyup.enter.native="getList()" @clear="getList()" />