Просмотр исходного кода

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

cfort 2 лет назад
Родитель
Сommit
33e2d007dc

+ 0 - 5
src/business/platform/bpmn/form/dialog.vue

@@ -16,7 +16,6 @@
       :def-id="defId"
       :pro-inst-id="proInstId"
       :flowName ="title"
-      :processName="processName"
       :task-id="taskId"
       :waiJian="waiJian"
       :instance-id="instanceId"
@@ -66,10 +65,6 @@ export default {
     },
     waiJian: { // 新增参数
       type: String
-    },
-    processName: { // 流程名称
-        type: String,
-        default: ''
     }
   },
   data() {

+ 0 - 6
src/business/platform/bpmn/form/index.vue

@@ -224,11 +224,6 @@
             closeable: {
                 type: Boolean,
                 default: true
-            },
-            // 流程名称
-            processName: {
-                type: String,
-                default: ''
             }
         },
         data() {
@@ -401,7 +396,6 @@
                     // 表单定义
                     this.formDef = this.$utils.parseData(formModel.formData) || {}
                     this.formDef.flowName = this.flowName
-                    this.formDef.processName = this.processName
 
                     this.formData = {
                         // 表单数据

+ 10 - 10
src/business/platform/form/formbuilder/dialog.vue

@@ -160,17 +160,17 @@
 <style lang="scss" module>
     .content {
         :global {
+            .el-dialog__header {
+                padding: 0;
+                border-bottom: 0;
+            }
+            .el-dialog__body {
+                padding: 0;
+            }
+            .is-fullscreen {
+                overflow: hidden;
+            }
             .form-main .widget-form-container {
-                .el-dialog__header {
-                    padding: 0;
-                    border-bottom: 0;
-                }
-                .el-dialog__body {
-                    padding: 0;
-                }
-                .is-fullscreen {
-                    overflow: hidden;
-                }
                 .el-form-item__label {
                     padding-left: 30px;
                     position: relative;

+ 1274 - 1279
src/business/platform/form/formbuilder/index.vue

@@ -1,57 +1,57 @@
 <template>
-  <div class="formbuilder-container">
-    <ibps-layout ref="layout">
-      <div slot="west">
-        <left-aside
-          :bo-data="boData"
-          @set-field="setField"
+    <div class="formbuilder-container">
+        <ibps-layout ref="layout">
+            <div slot="west">
+                <left-aside
+                    :bo-data="boData"
+                    @set-field="setField"
+                />
+            </div>
+            <div class="form-main">
+                <el-header :height="'40px'" class="layout-header form-actions">
+                    <div class="layout-header-title">
+                        表单设计
+                    </div>
+                    <div class="layout-tools ">
+                        <el-button type="primary" size="mini" icon="ibps-icon-save" @click="handleSaveForm()">保存表单</el-button>
+                        <el-button type="info" size="mini" icon="el-icon-view" @click="handlePreviewForm()">预览</el-button>
+                        <!-- <el-button type="primary" size="mini" icon="ibps-icon-question-circle-o" @click.prevent.stop="guide()">介绍</el-button> -->
+                        <el-button size="mini" icon="ibps-icon-file-text-o" @click="handleGenerateCode()">生成代码</el-button>
+                        <el-button size="mini" icon="ibps-icon-close" @click="closeDialog()">关闭</el-button>
+                    </div>
+                </el-header>
+                <widget-form
+                    ref="widgetForm"
+                    :data="widgetForm"
+                    :select.sync="widgetFormSelect"
+                    :loading="loading"
+                />
+            </div>
+            <div slot="east">
+                <right-aside
+                    :id="id"
+                    :data="widgetForm"
+                    :select.sync="widgetFormSelect"
+                    :aside-active-name="asideActiveName"
+                    :bo-data="boData"
+                    @active-name="name=> asideActiveName = name"
+                    @update-form-def="updateFormDef"
+                />
+            </div>
+        </ibps-layout>
+
+        <formrender-preview
+            :visible="formrenderDialogVisible"
+            :data="widgetFormData"
+            @close="visible => formrenderDialogVisible = visible"
         />
-      </div>
-      <div class="form-main">
-        <el-header :height="'40px'" class="layout-header form-actions">
-          <div class="layout-header-title">
-            表单设计
-          </div>
-          <div class="layout-tools ">
-            <el-button type="primary" size="mini" icon="ibps-icon-save" @click="handleSaveForm()">保存表单</el-button>
-            <el-button type="info" size="mini" icon="el-icon-view" @click="handlePreviewForm()">预览</el-button>
-            <!-- <el-button type="primary" size="mini" icon="ibps-icon-question-circle-o" @click.prevent.stop="guide()">介绍</el-button> -->
-            <el-button size="mini" icon="ibps-icon-file-text-o" @click="handleGenerateCode()">生成代码</el-button>
-            <el-button size="mini" icon="ibps-icon-close" @click="closeDialog()">关闭</el-button>
-          </div>
-        </el-header>
-        <widget-form
-          ref="widgetForm"
-          :data="widgetForm"
-          :select.sync="widgetFormSelect"
-          :loading="loading"
+        <ibps-code-dialog
+            :visible="codeDialogVisible"
+            :file-key="data.key"
+            :data="vueTemplate"
+            @close="visible => codeDialogVisible = visible"
         />
-      </div>
-      <div slot="east">
-        <right-aside
-          :id="id"
-          :data="widgetForm"
-          :select.sync="widgetFormSelect"
-          :aside-active-name="asideActiveName"
-          :bo-data="boData"
-          @active-name="name=> asideActiveName = name"
-          @update-form-def="updateFormDef"
-        />
-      </div>
-    </ibps-layout>
-
-    <formrender-preview
-      :visible="formrenderDialogVisible"
-      :data="widgetFormData"
-      @close="visible => formrenderDialogVisible = visible"
-    />
-    <ibps-code-dialog
-      :visible="codeDialogVisible"
-      :file-key="data.key"
-      :data="vueTemplate"
-      @close="visible => codeDialogVisible = visible"
-    />
-  </div>
+    </div>
 </template>
 <script>
 import { save } from '@/api/platform/form/formDef'
@@ -69,1290 +69,1285 @@ import generateCode from './utils/generateCode'
 import IbpsCodeDialog from '@/components/ibps-code-dialog'
 
 export default {
-  name: 'formbuilder',
-  components: {
-    LeftAside,
-    RightAside,
-    WidgetForm,
-    FormrenderPreview,
-    IbpsCodeDialog
-  },
-  props: {
-    data: {
-      type: Object
-    },
-    id: String,
-    bo: {
-      type: Array
-    },
-    loading: Boolean
-  },
-  data() {
-    return {
-      widgetForm: {},
-      boData: [],
-      asideActiveName: 'form-property',
-      widgetFormSelect: null,
-      formrenderDialogVisible: false,
-      codeDialogVisible: false,
-      widgetFormData: {},
-      bindField: {},
-      bindFlowField: {},
-      bindBpmLink: {},
-      vueTemplate: '',
-
-      formRules: {
-        dictionary: [
-          { required: true, name: 'dictionary', message: '请绑定数据字典' }
-        ],
-        autoNumber: [
-          { required: true, name: 'identity', message: '请绑定流水号' }
-        ],
-        customDialog: [
-          { required: true, name: 'dialog', message: '请绑定流水号' }
-        ],
-        linkdata: [
-          { required: true, name: 'linkdata', message: '请绑定关联数据' }
-        ]
-      }
-    }
-  },
-  watch: {
-    widgetForm: {
-      deep: true,
-      handler: function(val) {
-        // console.log(this.$refs.widgetForm)
-      }
-    },
-    widgetFormSelect: {
-      deep: true,
-      handler: function(val) {
-        this.selectField(val)
-      }
-    },
-    data: {
-      handler: function(val, oldVal) {
-        this.widgetForm = JSON.parse(JSON.stringify(val))
-      },
-      immediate: true,
-      deep: true
-    },
-    bo: {
-      handler: function(val, oldVal) {
-        this.boData = val
-      },
-      deep: true
-    }
-  },
-  methods: {
-    setField(data) {
-      if (data.parentId === '0') { return }
-      if (!this.widgetFormSelect) {
-        ActionUtils.warning('请选择字段')
-        return
-      }
-      if (this.widgetFormSelect.field_type === 'table' && data.attrType !== 'subTable') {
-        ActionUtils.warning('请选择子表')
-        return
-      }
-      if (this.widgetFormSelect.code !== data.tableName) {
-        ActionUtils.warning('请选择相同业务对象的字段')
-        return
-      }
-
-      this.widgetFormSelect.label = data.name
-      this.widgetFormSelect.name = data.key
+    name: 'formbuilder',
+    components: {
+        LeftAside,
+        RightAside,
+        WidgetForm,
+        FormrenderPreview,
+        IbpsCodeDialog
     },
-    // 选择字段
-    selectField(field) {
-      if (field) {
-        this.asideActiveName = 'field-config'
-        this.widgetFormSelect = field
-      } else {
-        this.asideActiveName = 'form-property'
-      }
+    props: {
+        data: {
+            type: Object
+        },
+        id: String,
+        bo: {
+            type: Array
+        },
+        loading: Boolean
     },
-    /**
-     * 更新当前表单定义
-     */
-    updateFormDef(data) {
-      this.widgetForm = data
-    },
-    /**
-     * 关闭窗口
-     */
-    closeDialog() {
-      this.$emit('close', false)
-    },
-    validateForm(callback, checkAll = true) {
-      const flag = false
-      if (checkAll) {
-        if (this.$utils.isEmpty(this.widgetForm.name)) {
-          this.asideActiveName = 'form-property'
-          callback(flag, '请设置表单标题')
-          return
-        }
-
-        if (this.$utils.isEmpty(this.widgetForm.key)) {
-          this.asideActiveName = 'form-property'
-          callback(flag, '请设置表单Key')
-          return
-        }
-        if (this.widgetForm.mode === 'bo' &&
-            this.$utils.isEmpty(this.widgetForm.code)) {
-          callback(flag, '未绑定业务对象,请检查数据是否正确')
-          return
+    data () {
+        return {
+            widgetForm: {},
+            boData: [],
+            asideActiveName: 'form-property',
+            widgetFormSelect: null,
+            formrenderDialogVisible: false,
+            codeDialogVisible: false,
+            widgetFormData: {},
+            bindField: {},
+            bindFlowField: {},
+            bindBpmLink: {},
+            vueTemplate: '',
+
+            formRules: {
+                dictionary: [
+                    { required: true, name: 'dictionary', message: '请绑定数据字典' }
+                ],
+                autoNumber: [
+                    { required: true, name: 'identity', message: '请绑定流水号' }
+                ],
+                customDialog: [
+                    { required: true, name: 'dialog', message: '请绑定流水号' }
+                ],
+                linkdata: [
+                    { required: true, name: 'linkdata', message: '请绑定关联数据' }
+                ]
+            }
         }
-      }
-
-      if (this.widgetForm.fields.length <= 0) {
-        callback(flag, '请从左侧拖拽字段')
-        return
-      }
-      // console.error(this.widgetForm.fields)
-      this.checkFields(callback)
     },
-    checkFields(callback) {
-      const fields = this.widgetForm.fields
-      this.bindField = {}
-      this.bindFlowField = {}
-      this.bindBpmLink = {}
-      const code = this.widgetForm.code
-      let flag = false
-      const msg = this.checkNestedFields(fields, code, callback)
-      if (msg) {
-        return msg
-      }
-      flag = true
-      callback(flag)
-    },
-    checkNestedFields(fields, code, callback) {
-      for (let i = 0; i < fields.length; i++) {
-        const field = fields[i]
-        const flag = false
-        const fieldType = field.field_type
-        // 判断是否嵌套布局字段
-        if (nestedFieldTypes.includes(fieldType)) { // 嵌套布局
-          const columns = field.field_options.columns
-          // 判断是否有字段
-          const msg = this.checkNestedHasFields(columns, field)
-          if (msg) {
-            this.selectField(field, code)
-            callback(flag, msg)
-            return msg
-          }
-          for (let j = 0; j < columns.length; j++) {
-            const column = columns[j]
-            const msg = this.checkNestedFields(column.fields, code, callback)
-            if (msg) {
-              callback(flag, msg)
-              return msg
+    watch: {
+        widgetForm: {
+            deep: true,
+            handler: function (val) {
+                // console.log(this.$refs.widgetForm)
             }
-          }
-        } else if (fieldType === 'table') { // 子表单
-          // 检查子表单
-          let msg = this.checkField(field)
-          if (msg) {
-            this.selectField(field, code)
-            callback(flag, msg)
-            return msg
-          }
-          const columns = field.field_options.columns
-          // 判断是否有字段
-          msg = this.checkTableHasFields(columns, field)
-          if (msg) {
-            this.selectField(field, code)
-            callback(flag, msg)
-            return msg
-          }
-          if (this.$utils.isNotEmpty(columns)) {
-            const msg = this.checkNestedFields(columns, field.name, callback)
-            if (msg) {
-              return msg
+        },
+        widgetFormSelect: {
+            deep: true,
+            handler: function (val) {
+                this.selectField(val)
             }
-          }
-        } else {
-          const msg = this.checkField(field, code)
-          if (msg) {
-            this.selectField(field)
-            callback(flag, msg)
-            return msg
-          }
+        },
+        data: {
+            handler: function (val, oldVal) {
+                this.widgetForm = JSON.parse(JSON.stringify(val))
+            },
+            immediate: true,
+            deep: true
+        },
+        bo: {
+            handler: function (val, oldVal) {
+                this.boData = val
+            },
+            deep: true
         }
-      }
     },
-    /**
-     *   判断嵌套布局是否有字段
-     */
-    checkNestedHasFields(columns, field) {
-      for (let j = 0; j < columns.length; j++) {
-        const column = columns[j]
-        if (this.$utils.isNotEmpty(column.fields)) {
-          return
-        }
-      }
-      return '[' + field.label + ']下至少要有一个字段'
-    },
-    checkTableHasFields(fields, field) {
-      if (this.$utils.isNotEmpty(fields)) {
-        return
-      }
-      return '[' + field.label + ']下至少要有一个字段'
-    },
-    /**
-     * 检查字段
-     */
-    checkField(field, code) {
-      // 只读字段不需要绑定
-      const name = field.name
-      const fieldType = field.field_type
-      if (fieldType === 'flow_diagram' || fieldType === 'approval_history') {
-        if (this.$utils.isNotEmpty(this.bindFlowField[fieldType])) {
-          const label = FieldTypes[fieldType].label
-          return `一个表单只能存在一个${label},请删除一个`
-        }
-        this.bindFlowField[fieldType] = field
-      }
-      if (fieldType === 'selector') {
-        const options = field.field_options
-        if (options.store === 'bind' && this.$utils.isEmpty(options.bindFiled)) {
-          const label = field.label
-          return `${label}控件的参数设置存储字段不能为空,请选择一个`
-        }
-      }
-
-      if (fieldType === 'bpmLink') {
-        const key = fieldType + field.field_options.bpmLinkType
-        if (this.$utils.isNotEmpty(this.bindBpmLink[key])) {
-          const label = FieldTypes[fieldType].label
-          return `${label}控件同种关联类型只能存在一个`
-        }
-        this.bindBpmLink[key] = field
-      }
-      if (FormOptions.t.NON_INPUT_FIELD_TYPES.includes(fieldType)) {
-        return
-      }
-      if (this.$utils.isEmpty(name)) {
-        let tip = '请绑定业务对象属性'
-        if (FormOptions.t.NEED_MODEL_FIELD_TYPES.includes(fieldType)) {
-          tip = '请输入属性key'
-        }
-        return tip
-      }
-      // 检查是否重复绑定
-      const key = code + '.' + name
-      if (this.$utils.isNotEmpty(this.bindField[key])) {
-        const label = this.bindField[key].label
-        return `属性重复绑定字段,请检查[${label}]和[${field.label}]`
-      }
-      this.bindField[key] = field
-
-      // 不能为空的判断,选项重复
-      if (fieldType === 'radio' || fieldType === 'checkbox' || fieldType === 'select') {
-        if (field.field_options.datasource === 'custom') {
-          const options = field.field_options.options
-          if (options.length === 0) {
-            return `请至少添加一个选项`
-          }
-          // 重复选项
-          const optionKey = {}
-          for (let i = 0; i < options.length; i++) {
-            const option = options[i]
-            const optionVal = option.val
-            if (this.$utils.isEmpty(optionVal)) {
-              return `有选项值为空`
+    methods: {
+        setField (data) {
+            if (data.parentId === '0') { return }
+            if (!this.widgetFormSelect) {
+                ActionUtils.warning('请选择字段')
+                return
             }
-            // 汉字、数字、字母、下划线
-            // if (!/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/.test(optionVal)) {
-            //   return `选项中的选项值[${optionVal}]含有非法字符`
-            // }
-
-            if (optionKey[optionVal]) {
-              return `重复的选项值[${optionVal}]`
+            if (this.widgetFormSelect.field_type === 'table' && data.attrType !== 'subTable') {
+                ActionUtils.warning('请选择子表')
+                return
             }
-            optionKey[optionVal] = true
-          }
-        }
-      }
-      if (this.formRules[fieldType]) {
-        const rules = this.formRules[fieldType]
-        for (let i = 0; i < rules.length; i++) {
-          const rule = rules[i]
-          if (rule.required) {
-            if (this.$utils.isEmpty(field.field_options[rule.name])) {
-              return rule.message || '请绑定数据'
+            if (this.widgetFormSelect.code !== data.tableName) {
+                ActionUtils.warning('请选择相同业务对象的字段')
+                return
             }
-          }
-        }
-      }
-    },
-    /**
-     * 保存表单
-     */
-    handleSaveForm() {
-      this.validateForm((valid, errorMsg) => {
-        if (!valid) {
-          if (errorMsg) {
-            ActionUtils.warning(errorMsg)
-          }
-          return
-        }
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        save({
-          data: JSON.stringify(this.widgetForm)
-        }).then(response => {
-          loading.close()
-          this.$emit('callback', this)
-          ActionUtils.saveSuccessMessage(response.message, (rtn) => {
-            if (rtn) {
-              this.closeDialog()
+
+            this.widgetFormSelect.label = data.name
+            this.widgetFormSelect.name = data.key
+        },
+        // 选择字段
+        selectField (field) {
+            if (field) {
+                this.asideActiveName = 'field-config'
+                this.widgetFormSelect = field
             } else {
-              if (this.$utils.isEmpty(this.widgetForm.id)) {
-                this.widgetForm.id = response.variables.id
-              }
+                this.asideActiveName = 'form-property'
             }
-          })
-        }).catch((err) => {
-          loading.close()
-          console.error(err)
-        })
-      })
-    },
-    /**
-     * 预览表单
-     */
-    handlePreviewForm() {
-      this.validateForm((valid, errorMsg) => {
-        if (!valid) {
-          if (errorMsg) {
-            ActionUtils.warning(errorMsg)
-          } else {
-            ActionUtils.warning('表单验证有误,请检查')
-          }
-          return
-        }
-        this.previewForm()
-      }, false)
-    },
-    previewForm() {
-      this.widgetFormData = JSON.parse(JSON.stringify(this.widgetForm))
-      console.log('FormData', this.widgetFormData)
-      this.formrenderDialogVisible = true
-    },
-    /**
-     * 预览表单回调事件
-     */
-    handlePreviewActionEvent(command, { formData }) {
-      switch (command) {
-        case 'close':
-          this.formrenderDialogVisible = false
-          break
-        case 'preview':
-          this.formPreviewDialogVisible = true
-          this.formData = formData
-          break
-      }
-    },
-    handleGenerateCode() {
-      const data = JSON.parse(JSON.stringify(this.widgetForm))
-      this.vueTemplate = generateCode(data)
-      this.codeDialogVisible = true
-    }
-  }
-}
-</script>
-<style lang="scss">
-.formbuilder-container {
-  overflow: hidden;
-  height: 100%;
-  .el-aside{
-    overflow: hidden;
-  }
-  .formbuilder-tab-container{
-    .el-tabs__header {
-      margin: 0;
-    }
-    .el-tabs__content,
-    .el-tabs--border-card > .el-tabs__content{
-      position: absolute;
-      padding: 0;
-      height: calc(100% - 45px);
-    }
-    .el-tab-pane {
-      overflow:auto;
-      height: 100%;
-      width: 100%;
-      border-left: 1px solid #E4E7ED;
-      border-right: 1px solid #E4E7ED;
-    }
-  }
-
-  .panel-heading {
-    padding: 10px 10px 10px;
-    font-weight: bold;
-  }
-
-  $primary-color: #409EFF;
-  $primary-background-color: #ecf5ff;
-  //==============字段列表============
-  .field-type-container{
-    width: 100%;
-    height: 100%;
-    .panel-body{
-      padding: 10px 0 0 0;
-    }
-    ul{
-      position: relative;
-      overflow: hidden;
-      padding: 0 5px 10px;
-      margin: 0;
-    }
-
-    .form-edit-widget-label{
-      font-size: 12px;
-      display: block;
-      width: 45%;
-      line-height: 26px;
-      position: relative;
-      float: left;
-      left: 0;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-      margin: 1%;
-      color: #333;
-      border: 1px solid #F4F6FC;
-
-      &:hover{
-        color: $primary-color;
-        border: 1px dashed $primary-color;
-      }
-
-      &>a{
-        display: block;
-        cursor: move;
-        background: #F4F6FC;
-        border: 1px solid #F4F6FC;
-
-        .ibps-icon{
-          margin-right: 6px;
-          margin-left: 8px;
-          font-size: 14px;
-          display: inline-block;
-          vertical-align: middle;
-        }
-
-        span{
-          display: inline-block;
-          vertical-align: middle;
-        }
-      }
-    }
-  }
-    .fr-signature-outer {
-      border: 1px dashed #bbb;
-      .fr-signature-header {
-        font-size: 12px;
-        cursor: pointer;
-        border-bottom: 1px dotted #ccc;
-        height: 32px;
-        background-color: #f6f6f6;
-        .fr-signature-label {
-          float: left;
-          padding: 0 7px 5px 7px;
-        }
-        .fr-signature-toolbar {
-          text-align: right;
-          float: right;
-          padding: 0 7px 5px 7px;
-          a{
-            text-decoration: none;
-            cursor: pointer;
-            color: #409eff;
-          }
-        }
-      }
-      .fr-signature-div{
-        height: 100px;
-      }
-    }
-
-.form-main {
-  padding: 0;
-
-  //==============顶部布局按钮============
-  .layout-header {
-    background: #f5f7fa;
-    border-bottom: 1px solid #e4e7ed;
-    font-weight: bold;
-    text-align: center;
-    padding: 6px;
-    position: relative;
-    overflow: hidden;
-    .layout-header-title {
-      font-size: 14px;
-      margin: 5px;
-      padding: 0;
-      text-overflow: ellipsis;
-      float: left;
-      color: #676a6c;
-    }
-    .layout-tools {
-      float: right;
-      margin-top: 0;
-      position: relative;
-      padding: 0 10px;
-      .el-button+.el-button {
-        margin-left: 5px;
-      }
-    }
-  }
-
-  //==============表单============
-  .widget-form-container{
-      height: calc(100% - 44px);
-      width: calc(100% - 570px);
-      position: absolute;
-      overflow: auto;
-    //==============表头============
-      .form-header {
-        cursor: pointer;
-        border-bottom: 1px solid  #ddd;
-        margin-bottom: 5px;
-        .title {
-          font-size: 16px;
-          font-weight: bold;
-          color: #222;
-          text-align: left;
-          padding: 8px 10px 10px;
-          margin: 0;
-        }
-        .desc {
-          word-wrap: break-word;
-          word-break: normal;
-          text-indent: 0;
-          line-height: 1.6;
-          margin: 0 0 11px;
-          padding: 3px 30px 8px;
-        }
-      }
-    //==============字段列表============
-    .widget-form-list{
-      background: #fff;
-      min-height: calc(100% - 100px);
-
-      .widget-col-list{
-        min-height: 50px;
-        border: 1px dashed #ccc;
-        background: #fff;
-      }
-
-      .widget-view{
-        padding-bottom: 18px;
-        position: relative;
-        border: 1px dashed rgba(170,170,170,0.7);
-        background-color: rgba(236, 245, 255, .3);
-        margin: 2px;
-
-        .el-form-item__content{
-          position: unset;
-        }
-        //必填
-        &.is_req{
-          .el-form-item__label::before{
-            content: '*';
-            color: #f56c6c;
-            margin-right: 4px;
-          }
-        }
-
-        .widget-view-description{
-          height: 15px;
-          line-height: 15px;
-          font-size:13px;
-          margin-top: 6px;
-          color:#909399;
-        }
-
-        .widget-view-action{
-          position: absolute;
-          right: 0;
-          bottom: 0;
-          height: 28px;
-          line-height: 28px;
-          background: $primary-color;
-          z-index: 9999;
-
-          i{
-            font-size: 14px;
-            color: #fff;
-            margin: 0 5px;
-            cursor: pointer;
-
-          }
-        }
-
-        .widget-view-drag{
-          position: absolute;
-          left: -2px;
-          top: -2px;
-          bottom: -18px;
-          height: 28px;
-          line-height: 28px;
-          background: $primary-color;
-          z-index: 9999;
-          // display: none;
-
-          i{
-            font-size: 14px;
-            color: #fff;
-            margin: 0 5px;
-            cursor: move;
-          }
-        }
-
-        &:after{
-          position: absolute;
-          left: 0;
-          right: 0;
-          top: 0;
-          bottom: 0;
-          display: block;
-        }
-
-        &:hover{
-          background: $primary-background-color;
-          outline: 1px solid $primary-color;
-          outline-offset: 0px;
-
-          &.active{
-            outline: 2px solid $primary-color;
-            border: 1px solid $primary-color;
-            outline-offset: 0;
-          }
-
-          .widget-view-drag{
-            display: block;
-          }
-        }
+        },
+        /**
+         * 更新当前表单定义
+         */
+        updateFormDef (data) {
+            this.widgetForm = data
+        },
+        /**
+         * 关闭窗口
+         */
+        closeDialog () {
+            this.$emit('close', false)
+        },
+        validateForm (callback, checkAll = true) {
+            const flag = false
+            if (checkAll) {
+                if (this.$utils.isEmpty(this.widgetForm.name)) {
+                    this.asideActiveName = 'form-property'
+                    callback(flag, '请设置表单标题')
+                    return
+                }
 
-        &.active{
-          outline: 2px solid $primary-color;
-          border: 1px solid $primary-color;
-        }
+                if (this.$utils.isEmpty(this.widgetForm.key)) {
+                    this.asideActiveName = 'form-property'
+                    callback(flag, '请设置表单Key')
+                    return
+                }
+                if (this.widgetForm.mode === 'bo' &&
+            this.$utils.isEmpty(this.widgetForm.code)) {
+                    callback(flag, '未绑定业务对象,请检查数据是否正确')
+                    return
+                }
+            }
 
-        &.ghost{
-          background: #F56C6C;
-          border: 2px solid #F56C6C;
-          outline-width: 0;
-          height: 3px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
-        }
-      }
-
-      /**子表单**/
-      .widget-table{
-        padding-bottom: 0;
-        padding: 5px;
-        background-color: rgba(253,246,236, .3);
-
-        .widget-table-wrapper{
-          min-height: 50px;
-          background: #fff;
-          display: flex;
-          justify-content: flex-start;
-
-          .widget-table-row{
-            td{
-              border-bottom: 0;
+            if (this.widgetForm.fields.length <= 0) {
+                callback(flag, '请从左侧拖拽字段')
+                return
             }
-          }
-
-          .widget-table-view{
-            border: 1px solid #EBEEF5;
-            width: 200px;
-            float: left;
-            height: 98%;
-            position: relative;
-            display: block;
-
-            .el-table{
-              height: 100%;
+            // console.error(this.widgetForm.fields)
+            this.checkFields(callback)
+        },
+        checkFields (callback) {
+            const fields = this.widgetForm.fields
+            this.bindField = {}
+            this.bindFlowField = {}
+            this.bindBpmLink = {}
+            const code = this.widgetForm.code
+            let flag = false
+            const msg = this.checkNestedFields(fields, code, callback)
+            if (msg) {
+                return msg
             }
-
-            &.is_req{
-              .el-form-item__label::before{
-                content: '*';
-                color: #f56c6c;
-                margin-right: 4px;
-              }
+            flag = true
+            callback(flag)
+        },
+        checkNestedFields (fields, code, callback) {
+            for (let i = 0; i < fields.length; i++) {
+                const field = fields[i]
+                const flag = false
+                const fieldType = field.field_type
+                // 判断是否嵌套布局字段
+                if (nestedFieldTypes.includes(fieldType)) { // 嵌套布局
+                    const columns = field.field_options.columns
+                    // 判断是否有字段
+                    const msg = this.checkNestedHasFields(columns, field)
+                    if (msg) {
+                        this.selectField(field, code)
+                        callback(flag, msg)
+                        return msg
+                    }
+                    for (let j = 0; j < columns.length; j++) {
+                        const column = columns[j]
+                        const msg = this.checkNestedFields(column.fields, code, callback)
+                        if (msg) {
+                            callback(flag, msg)
+                            return msg
+                        }
+                    }
+                } else if (fieldType === 'table') { // 子表单
+                    // 检查子表单
+                    let msg = this.checkField(field)
+                    if (msg) {
+                        this.selectField(field, code)
+                        callback(flag, msg)
+                        return msg
+                    }
+                    const columns = field.field_options.columns
+                    // 判断是否有字段
+                    msg = this.checkTableHasFields(columns, field)
+                    if (msg) {
+                        this.selectField(field, code)
+                        callback(flag, msg)
+                        return msg
+                    }
+                    if (this.$utils.isNotEmpty(columns)) {
+                        const msg = this.checkNestedFields(columns, field.name, callback)
+                        if (msg) {
+                            return msg
+                        }
+                    }
+                } else {
+                    const msg = this.checkField(field, code)
+                    if (msg) {
+                        this.selectField(field)
+                        callback(flag, msg)
+                        return msg
+                    }
+                }
             }
-
-            .widget-view-description{
-              height: 15px;
-              line-height: 15px;
-              font-size:13px;
-              margin-top: 6px;
-              color:#909399;
+        },
+        /**
+         *   判断嵌套布局是否有字段
+         */
+        checkNestedHasFields (columns, field) {
+            for (let j = 0; j < columns.length; j++) {
+                const column = columns[j]
+                if (this.$utils.isNotEmpty(column.fields)) {
+                    return
+                }
             }
-
-            .widget-view-action{
-              position: absolute;
-              right: 0;
-              bottom: 0;
-              height: 28px;
-              line-height: 28px;
-              background: $primary-color;
-              z-index: 1000;
-
-              i{
-                font-size: 14px;
-                color: #fff;
-                margin: 0 5px;
-                cursor: pointer;
-
-              }
+            return '[' + field.label + ']下至少要有一个字段'
+        },
+        checkTableHasFields (fields, field) {
+            if (this.$utils.isNotEmpty(fields)) {
+                return
             }
-
-            .widget-view-drag{
-              position: absolute;
-              left: -2px;
-              top: -2px;
-              bottom: -18px;
-              height: 28px;
-              line-height: 28px;
-              background: $primary-color;
-              z-index: 1000;
-              // display: none;
-
-              i{
-                font-size: 14px;
-                color: #fff;
-                margin: 0 5px;
-                cursor: move;
-              }
+            return '[' + field.label + ']下至少要有一个字段'
+        },
+        /**
+         * 检查字段
+         */
+        checkField (field, code) {
+            // 只读字段不需要绑定
+            const name = field.name
+            const fieldType = field.field_type
+            if (fieldType === 'flow_diagram' || fieldType === 'approval_history') {
+                if (this.$utils.isNotEmpty(this.bindFlowField[fieldType])) {
+                    const label = FieldTypes[fieldType].label
+                    return `一个表单只能存在一个${label},请删除一个`
+                }
+                this.bindFlowField[fieldType] = field
             }
-
-            &::after{
-              position: absolute;
-              left: 0;
-              right: 0;
-              top: 0;
-              bottom: 0;
-              display: block;
-              content: '';
+            if (fieldType === 'selector') {
+                const options = field.field_options
+                if (options.store === 'bind' && this.$utils.isEmpty(options.bindFiled)) {
+                    const label = field.label
+                    return `${label}控件的参数设置存储字段不能为空,请选择一个`
+                }
             }
 
-            &::before{
-              display: none;
+            if (fieldType === 'bpmLink') {
+                const key = fieldType + field.field_options.bpmLinkType
+                if (this.$utils.isNotEmpty(this.bindBpmLink[key])) {
+                    const label = FieldTypes[fieldType].label
+                    return `${label}控件同种关联类型只能存在一个`
+                }
+                this.bindBpmLink[key] = field
             }
-
-            &:hover{
-              background: $primary-background-color;
-              outline: 1px solid $primary-color;
-              outline-offset: -1px;
-
-              &.active{
-                // outline: 1px solid $primary-color;
-                border: 1px solid $primary-color;
-                outline: 1px solid $primary-color;
-                outline-offset: -1px;
-              }
-
-              .widget-view-drag{
-                display: block;
-              }
+            if (FormOptions.t.NON_INPUT_FIELD_TYPES.includes(fieldType)) {
+                return
             }
-
-            &.active{
-              outline: 1px solid $primary-color;
-              border: 1px solid $primary-color;
-              outline-offset: -1px;
+            if (this.$utils.isEmpty(name)) {
+                let tip = '请绑定业务对象属性'
+                if (FormOptions.t.NEED_MODEL_FIELD_TYPES.includes(fieldType)) {
+                    tip = '请输入属性key'
+                }
+                return tip
             }
-
-            &.ghost{
-              background: #F56C6C;
-              outline-width: 0;
-              width: 5px !important;
-              box-sizing: border-box;
-              font-size: 0;
-              content: '';
-              overflow: hidden;
-              padding: 0;
-              position: relative;
-              outline: none !important;
-              border: 0 !important;
-
-              &::after{
-                background: #F56C6C;
-                position: absolute;
-                top: 0;
-                left: 0;
-                bottom: 0;
-                right: 0;
-                z-index: 1000;
-                content: '';
-                outline: none;
-              }
+            // 检查是否重复绑定
+            const key = code + '.' + name
+            if (this.$utils.isNotEmpty(this.bindField[key])) {
+                const label = this.bindField[key].label
+                return `属性重复绑定字段,请检查[${label}]和[${field.label}]`
             }
-          }
-
-          .widget-table-content{
-            width:100%;
-            // border: 1px dashed #ccc;
-            outline: 1px dashed #ccc;
-            background: #fff;
-            flex:1;
-            margin: 0 1px;
-            overflow-y: hidden;
-            overflow-x: auto;
-            &>div{
-              height: 100%;
+            this.bindField[key] = field
+
+            // 不能为空的判断,选项重复
+            if (fieldType === 'radio' || fieldType === 'checkbox' || fieldType === 'select') {
+                if (field.field_options.datasource === 'custom') {
+                    const options = field.field_options.options
+                    if (options.length === 0) {
+                        return `请至少添加一个选项`
+                    }
+                    // 重复选项
+                    const optionKey = {}
+                    for (let i = 0; i < options.length; i++) {
+                        const option = options[i]
+                        const optionVal = option.val
+                        if (this.$utils.isEmpty(optionVal)) {
+                            return `有选项值为空`
+                        }
+                        // 汉字、数字、字母、下划线
+                        // if (!/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/.test(optionVal)) {
+                        //   return `选项中的选项值[${optionVal}]含有非法字符`
+                        // }
+
+                        if (optionKey[optionVal]) {
+                            return `重复的选项值[${optionVal}]`
+                        }
+                        optionKey[optionVal] = true
+                    }
+                }
             }
-              .widget-table-list{
-              background: #fff;
-              min-height: 300px;
-              }
-
-            .widget-table-col{
-              height: 100%;
-
-              .ghost{
-                background: #F56C6C;
-                // border: 2px solid #F56C6C;
-                position: relative;
-                content: '';
-                float: left;
-                height: 100%;
-                width: 5px !important;
-                list-style: none;
-                font-size: 0;
-                overflow: hidden;
-                outline: none;
-
-                &::after{
-                  background: #F56C6C;
-                  position: absolute;
-                  top: 0;
-                  left: 0;
-                  bottom: 0;
-                  right: 0;
-                  z-index: 1000;
-                  content: '';
-                  outline: none;
+            if (this.formRules[fieldType]) {
+                const rules = this.formRules[fieldType]
+                for (let i = 0; i < rules.length; i++) {
+                    const rule = rules[i]
+                    if (rule.required) {
+                        if (this.$utils.isEmpty(field.field_options[rule.name])) {
+                            return rule.message || '请绑定数据'
+                        }
+                    }
                 }
-              }
             }
-          }
-        }
-
-        &.active{
-          outline: 2px solid #e6a23c;
-          border: 1px solid #e6a23c;
-        }
-
-        &:hover{
-          background: #fdf6ec;
-          outline: 1px solid #e6a23c;
-          outline-offset: 0px;
-
-          &.active{
-            outline: 2px solid #e6a23c;
-            border: 1px solid #e6a23c;
-            outline-offset: 0;
-          }
-        }
-
-        .widget-view-action.widget-table-action{
-          background: #e6a23c;
-        }
-
-        .widget-view-drag.widget-table-drag{
-          background: #e6a23c;
-        }
-
-        &::after{
-          display: none;
-        }
-
-        &.ghost{
-          background: #F56C6C;
-          outline-width: 0;
-          height: 5px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
-          position: relative;
-          outline: none;
-          border: 0;
-
-          &::after{
-            background: #F56C6C;
-            position: absolute;
-            top:0;
-            left: 0;
-            right: 0;
-            bottom: 0;
-            content: '';
-            display: block;
-            z-index: 1000;
-          }
-        }
-      }
-
-     //============grid(栅格布局)
-
-      .widget-col{
-        padding-bottom: 0;
-        padding: 5px;
-        background-color: rgba(253,246,236, .3);
-
-        &.active{
-          outline: 2px solid #e6a23c;
-          border: 1px solid #e6a23c;
-        }
-
-        &:hover{
-          background: #fdf6ec;
-          outline: 1px solid #e6a23c;
-          outline-offset: 0px;
-
-          &.active{
-            outline: 2px solid #e6a23c;
-            border: 1px solid #e6a23c;
-            outline-offset: 0;
-          }
-        }
-
-        .el-col{
-          min-height: 50px;
-        }
-
-        &.ghost{
-          background: #F56C6C;
-          border: 2px solid #F56C6C;
-          outline-width: 0;
-          height: 3px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
-        }
-
-        .widget-view-action.widget-col-action{
-          background: #e6a23c;
+        },
+        /**
+         * 保存表单
+         */
+        handleSaveForm () {
+            this.validateForm((valid, errorMsg) => {
+                if (!valid) {
+                    if (errorMsg) {
+                        ActionUtils.warning(errorMsg)
+                    }
+                    return
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                save({
+                    data: JSON.stringify(this.widgetForm)
+                }).then(response => {
+                    loading.close()
+                    this.$emit('callback', this)
+                    ActionUtils.saveSuccessMessage(response.message, (rtn) => {
+                        if (rtn) {
+                            this.closeDialog()
+                        } else {
+                            if (this.$utils.isEmpty(this.widgetForm.id)) {
+                                this.widgetForm.id = response.variables.id
+                            }
+                        }
+                    })
+                }).catch((err) => {
+                    loading.close()
+                    console.error(err)
+                })
+            })
+        },
+        /**
+         * 预览表单
+         */
+        handlePreviewForm () {
+            this.validateForm((valid, errorMsg) => {
+                if (!valid) {
+                    if (errorMsg) {
+                        ActionUtils.warning(errorMsg)
+                    } else {
+                        ActionUtils.warning('表单验证有误,请检查')
+                    }
+                    return
+                }
+                this.previewForm()
+            }, false)
+        },
+        previewForm () {
+            this.widgetFormData = JSON.parse(JSON.stringify(this.widgetForm))
+            console.log('FormData', this.widgetFormData)
+            this.formrenderDialogVisible = true
+        },
+        /**
+         * 预览表单回调事件
+         */
+        handlePreviewActionEvent (command, { formData }) {
+            switch (command) {
+                case 'close':
+                    this.formrenderDialogVisible = false
+                    break
+                case 'preview':
+                    this.formPreviewDialogVisible = true
+                    this.formData = formData
+                    break
+            }
+        },
+        handleGenerateCode () {
+            const data = JSON.parse(JSON.stringify(this.widgetForm))
+            this.vueTemplate = generateCode(data)
+            this.codeDialogVisible = true
         }
-
-        .widget-view-drag.widget-col-drag{
-          background: #e6a23c;
+    }
+}
+</script>
+<style lang="scss">
+    .formbuilder-container {
+        overflow: hidden;
+        height: 100%;
+        .el-aside {
+            overflow: hidden;
         }
-
-        &::after{
-          display: none;
+        .formbuilder-tab-container {
+            .el-tabs__header {
+                margin: 0;
+            }
+            .el-tabs__content,
+            .el-tabs--border-card > .el-tabs__content {
+                position: absolute;
+                padding: 0;
+                height: calc(100% - 45px);
+            }
+            .el-tab-pane {
+                overflow: auto;
+                height: 100%;
+                width: 100%;
+                border-left: 1px solid #e4e7ed;
+                border-right: 1px solid #e4e7ed;
+            }
         }
-      }
-
-      //============TABS(标签页)
-      $tabs-color: #67c23a;
-      .widget-tabs{
-        padding-bottom: 0;
-        padding: 5px;
-        // margin-left: 2px !important;
-        // margin-right: 2px !important;
-        background-color: rgba(253,246,236, .3);
-
-        &.active{
-          outline: 2px solid $tabs-color;
-          border: 1px solid $tabs-color;
+        .panel-heading {
+            padding: 10px 10px 10px;
+            font-weight: bold;
         }
 
-        &:hover{
-          background: #fdf6ec;
-          outline: 1px solid $tabs-color;
-          outline-offset: 0px;
+        $primary-color: #409eff;
+        $primary-background-color: #ecf5ff;
+        // 字段列表
+        .field-type-container {
+            width: 100%;
+            height: 100%;
+            .panel-body {
+                padding: 10px 0 0 0;
+            }
+            ul {
+                position: relative;
+                overflow: hidden;
+                padding: 0 5px 10px;
+                margin: 0;
+            }
 
-          &.active{
-            outline: 2px solid $tabs-color;
-            border: 1px solid $tabs-color;
-            outline-offset: 0;
-          }
-        }
+            .form-edit-widget-label {
+                font-size: 12px;
+                display: block;
+                width: 45%;
+                line-height: 26px;
+                position: relative;
+                float: left;
+                left: 0;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+                margin: 1%;
+                color: #333;
+                border: 1px solid #f4f6fc;
+
+                &:hover {
+                    color: $primary-color;
+                    border: 1px dashed $primary-color;
+                }
 
-        // .el-tabs__content{
-        //   min-height: 50px;
-        // }
-
-        &.ghost{
-          background: #F56C6C;
-          border: 2px solid #F56C6C;
-          outline-width: 0;
-          height: 3px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
+                & > a {
+                    display: block;
+                    cursor: move;
+                    background: #f4f6fc;
+                    border: 1px solid #f4f6fc;
+
+                    .ibps-icon {
+                        margin-right: 6px;
+                        margin-left: 8px;
+                        font-size: 14px;
+                        display: inline-block;
+                        vertical-align: middle;
+                    }
+
+                    span {
+                        display: inline-block;
+                        vertical-align: middle;
+                    }
+                }
+            }
         }
-
-        .widget-view-action.widget-tabs-action{
-          background: $tabs-color;
+        .fr-signature-outer {
+            border: 1px dashed #bbb;
+            .fr-signature-header {
+                font-size: 12px;
+                cursor: pointer;
+                border-bottom: 1px dotted #ccc;
+                height: 32px;
+                background-color: #f6f6f6;
+                .fr-signature-label {
+                    float: left;
+                    padding: 0 7px 5px 7px;
+                }
+                .fr-signature-toolbar {
+                    text-align: right;
+                    float: right;
+                    padding: 0 7px 5px 7px;
+                    a {
+                        text-decoration: none;
+                        cursor: pointer;
+                        color: #409eff;
+                    }
+                }
+            }
+            .fr-signature-div {
+                height: 100px;
+            }
         }
 
-        .widget-view-drag.widget-tabs-drag{
-          background: $tabs-color;
-        }
+        .form-main {
+            padding: 0;
+            // 顶部布局按钮
+            .layout-header {
+                background: #f5f7fa;
+                border-bottom: 1px solid #e4e7ed;
+                font-weight: bold;
+                text-align: center;
+                padding: 6px;
+                position: relative;
+                overflow: hidden;
+                .layout-header-title {
+                    font-size: 14px;
+                    margin: 5px;
+                    padding: 0;
+                    text-overflow: ellipsis;
+                    float: left;
+                    color: #676a6c;
+                }
+                .layout-tools {
+                    float: right;
+                    margin-top: 0;
+                    position: relative;
+                    padding: 0 10px;
+                    .el-button + .el-button {
+                        margin-left: 5px;
+                    }
+                }
+            }
 
-        &::after{
-          display: none;
-        }
-      }
-      //============TABS(标签页) end
-      //============STEPS(步骤条)
-      $steps-color: #8c40e2;
-     .widget-steps{
-        padding-bottom: 0;
-        padding: 5px;
-        // margin-left: 2px !important;
-        // margin-right: 2px !important;
-        background-color: rgba(253,246,236, .3);
-
-        &.active{
-          outline: 2px solid $steps-color;
-          border: 1px solid $steps-color;
-        }
+            // 表单
+            .widget-form-container {
+                height: calc(100% - 44px);
+                width: calc(100% - 570px);
+                position: absolute;
+                overflow: auto;
+                // 表头
+                .form-header {
+                    cursor: pointer;
+                    border-bottom: 1px solid #ddd;
+                    margin-bottom: 5px;
+                    .title {
+                        font-size: 16px;
+                        font-weight: bold;
+                        color: #222;
+                        text-align: left;
+                        padding: 8px 10px 10px;
+                        margin: 0;
+                    }
+                    .desc {
+                        word-wrap: break-word;
+                        word-break: normal;
+                        text-indent: 0;
+                        line-height: 1.6;
+                        margin: 0 0 11px;
+                        padding: 3px 30px 8px;
+                    }
+                }
+                // 字段列表
+                .widget-form-list {
+                    background: #fff;
+                    min-height: calc(100% - 100px);
+
+                    .widget-col-list {
+                        min-height: 50px;
+                        border: 1px dashed #ccc;
+                        background: #fff;
+                    }
+
+                    .widget-view {
+                        padding-bottom: 18px;
+                        position: relative;
+                        border: 1px dashed rgba(170, 170, 170, 0.7);
+                        background-color: rgba(236, 245, 255, 0.3);
+                        margin: 2px;
+
+                        .el-form-item__content {
+                            position: unset;
+                        }
+                        //必填
+                        &.is_req {
+                            .el-form-item__label::before {
+                                content: '*';
+                                color: #f56c6c;
+                                margin-right: 4px;
+                            }
+                        }
+
+                        .widget-view-description {
+                            height: 15px;
+                            line-height: 15px;
+                            font-size: 13px;
+                            margin-top: 6px;
+                            color: #909399;
+                        }
+
+                        .widget-view-action {
+                            position: absolute;
+                            right: 0;
+                            bottom: 0;
+                            height: 28px;
+                            line-height: 28px;
+                            background: $primary-color;
+                            z-index: 9999;
+
+                            i {
+                                font-size: 14px;
+                                color: #fff;
+                                margin: 0 5px;
+                                cursor: pointer;
+                            }
+                        }
+
+                        .widget-view-drag {
+                            position: absolute;
+                            left: -2px;
+                            top: -2px;
+                            bottom: -18px;
+                            height: 28px;
+                            line-height: 28px;
+                            background: $primary-color;
+                            z-index: 9999;
+                            // display: none;
+
+                            i {
+                                font-size: 14px;
+                                color: #fff;
+                                margin: 0 5px;
+                                cursor: move;
+                            }
+                        }
+
+                        &:after {
+                            position: absolute;
+                            left: 0;
+                            right: 0;
+                            top: 0;
+                            bottom: 0;
+                            display: block;
+                        }
+
+                        &:hover {
+                            background: $primary-background-color;
+                            outline: 1px solid $primary-color;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid $primary-color;
+                                border: 1px solid $primary-color;
+                                outline-offset: 0;
+                            }
+
+                            .widget-view-drag {
+                                display: block;
+                            }
+                        }
+
+                        &.active {
+                            outline: 2px solid $primary-color;
+                            border: 1px solid $primary-color;
+                        }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            border: 2px solid #f56c6c;
+                            outline-width: 0;
+                            height: 3px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                        }
+                    }
+
+                    /**子表单**/
+                    .widget-table {
+                        padding-bottom: 0;
+                        padding: 5px;
+                        background-color: rgba(253, 246, 236, 0.3);
+
+                        .widget-table-wrapper {
+                            min-height: 50px;
+                            background: #fff;
+                            display: flex;
+                            justify-content: flex-start;
+
+                            .widget-table-row {
+                                td {
+                                    border-bottom: 0;
+                                }
+                            }
+
+                            .widget-table-view {
+                                border: 1px solid #ebeef5;
+                                width: 200px;
+                                float: left;
+                                height: 98%;
+                                position: relative;
+                                display: block;
+
+                                .el-table {
+                                    height: 100%;
+                                }
+
+                                &.is_req {
+                                    .el-form-item__label::before {
+                                        content: '*';
+                                        color: #f56c6c;
+                                        margin-right: 4px;
+                                    }
+                                }
+
+                                .widget-view-description {
+                                    height: 15px;
+                                    line-height: 15px;
+                                    font-size: 13px;
+                                    margin-top: 6px;
+                                    color: #909399;
+                                }
+
+                                .widget-view-action {
+                                    position: absolute;
+                                    right: 0;
+                                    bottom: 0;
+                                    height: 28px;
+                                    line-height: 28px;
+                                    background: $primary-color;
+                                    z-index: 1000;
+
+                                    i {
+                                        font-size: 14px;
+                                        color: #fff;
+                                        margin: 0 5px;
+                                        cursor: pointer;
+                                    }
+                                }
+
+                                .widget-view-drag {
+                                    position: absolute;
+                                    left: -2px;
+                                    top: -2px;
+                                    bottom: -18px;
+                                    height: 28px;
+                                    line-height: 28px;
+                                    background: $primary-color;
+                                    z-index: 1000;
+                                    // display: none;
+
+                                    i {
+                                        font-size: 14px;
+                                        color: #fff;
+                                        margin: 0 5px;
+                                        cursor: move;
+                                    }
+                                }
+
+                                &::after {
+                                    position: absolute;
+                                    left: 0;
+                                    right: 0;
+                                    top: 0;
+                                    bottom: 0;
+                                    display: block;
+                                    content: '';
+                                }
+
+                                &::before {
+                                    display: none;
+                                }
+
+                                &:hover {
+                                    background: $primary-background-color;
+                                    outline: 1px solid $primary-color;
+                                    outline-offset: -1px;
+
+                                    &.active {
+                                        // outline: 1px solid $primary-color;
+                                        border: 1px solid $primary-color;
+                                        outline: 1px solid $primary-color;
+                                        outline-offset: -1px;
+                                    }
+
+                                    .widget-view-drag {
+                                        display: block;
+                                    }
+                                }
+
+                                &.active {
+                                    outline: 1px solid $primary-color;
+                                    border: 1px solid $primary-color;
+                                    outline-offset: -1px;
+                                }
+
+                                &.ghost {
+                                    background: #f56c6c;
+                                    outline-width: 0;
+                                    width: 5px !important;
+                                    box-sizing: border-box;
+                                    font-size: 0;
+                                    content: '';
+                                    overflow: hidden;
+                                    padding: 0;
+                                    position: relative;
+                                    outline: none !important;
+                                    border: 0 !important;
+
+                                    &::after {
+                                        background: #f56c6c;
+                                        position: absolute;
+                                        top: 0;
+                                        left: 0;
+                                        bottom: 0;
+                                        right: 0;
+                                        z-index: 1000;
+                                        content: '';
+                                        outline: none;
+                                    }
+                                }
+                            }
+
+                            .widget-table-content {
+                                width: 100%;
+                                // border: 1px dashed #ccc;
+                                outline: 1px dashed #ccc;
+                                background: #fff;
+                                flex: 1;
+                                margin: 0 1px;
+                                overflow-y: hidden;
+                                overflow-x: auto;
+                                & > div {
+                                    height: 100%;
+                                }
+                                .widget-table-list {
+                                    background: #fff;
+                                    min-height: 300px;
+                                }
+
+                                .widget-table-col {
+                                    height: 100%;
+
+                                    .ghost {
+                                        background: #f56c6c;
+                                        // border: 2px solid #F56C6C;
+                                        position: relative;
+                                        content: '';
+                                        float: left;
+                                        height: 100%;
+                                        width: 5px !important;
+                                        list-style: none;
+                                        font-size: 0;
+                                        overflow: hidden;
+                                        outline: none;
+
+                                        &::after {
+                                            background: #f56c6c;
+                                            position: absolute;
+                                            top: 0;
+                                            left: 0;
+                                            bottom: 0;
+                                            right: 0;
+                                            z-index: 1000;
+                                            content: '';
+                                            outline: none;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+
+                        &.active {
+                            outline: 2px solid #e6a23c;
+                            border: 1px solid #e6a23c;
+                        }
+
+                        &:hover {
+                            background: #fdf6ec;
+                            outline: 1px solid #e6a23c;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid #e6a23c;
+                                border: 1px solid #e6a23c;
+                                outline-offset: 0;
+                            }
+                        }
+
+                        .widget-view-action.widget-table-action {
+                            background: #e6a23c;
+                        }
+
+                        .widget-view-drag.widget-table-drag {
+                            background: #e6a23c;
+                        }
+
+                        &::after {
+                            display: none;
+                        }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            outline-width: 0;
+                            height: 5px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                            position: relative;
+                            outline: none;
+                            border: 0;
+
+                            &::after {
+                                background: #f56c6c;
+                                position: absolute;
+                                top: 0;
+                                left: 0;
+                                right: 0;
+                                bottom: 0;
+                                content: '';
+                                display: block;
+                                z-index: 1000;
+                            }
+                        }
+                    }
+
+                    //============grid(栅格布局)
+
+                    .widget-col {
+                        padding-bottom: 0;
+                        padding: 5px;
+                        background-color: rgba(253, 246, 236, 0.3);
+
+                        &.active {
+                            outline: 2px solid #e6a23c;
+                            border: 1px solid #e6a23c;
+                        }
+
+                        &:hover {
+                            background: #fdf6ec;
+                            outline: 1px solid #e6a23c;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid #e6a23c;
+                                border: 1px solid #e6a23c;
+                                outline-offset: 0;
+                            }
+                        }
+
+                        .el-col {
+                            min-height: 50px;
+                        }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            border: 2px solid #f56c6c;
+                            outline-width: 0;
+                            height: 3px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                        }
+
+                        .widget-view-action.widget-col-action {
+                            background: #e6a23c;
+                        }
+
+                        .widget-view-drag.widget-col-drag {
+                            background: #e6a23c;
+                        }
+
+                        &::after {
+                            display: none;
+                        }
+                    }
+
+                    //============TABS(标签页)
+                    $tabs-color: #67c23a;
+                    .widget-tabs {
+                        padding-bottom: 0;
+                        padding: 5px;
+                        // margin-left: 2px !important;
+                        // margin-right: 2px !important;
+                        background-color: rgba(253, 246, 236, 0.3);
+
+                        &.active {
+                            outline: 2px solid $tabs-color;
+                            border: 1px solid $tabs-color;
+                        }
+
+                        &:hover {
+                            background: #fdf6ec;
+                            outline: 1px solid $tabs-color;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid $tabs-color;
+                                border: 1px solid $tabs-color;
+                                outline-offset: 0;
+                            }
+                        }
+
+                        // .el-tabs__content{
+                        //   min-height: 50px;
+                        // }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            border: 2px solid #f56c6c;
+                            outline-width: 0;
+                            height: 3px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                        }
+
+                        .widget-view-action.widget-tabs-action {
+                            background: $tabs-color;
+                        }
+
+                        .widget-view-drag.widget-tabs-drag {
+                            background: $tabs-color;
+                        }
+
+                        &::after {
+                            display: none;
+                        }
+                    }
+                    //============TABS(标签页) end
+                    //============STEPS(步骤条)
+                    $steps-color: #8c40e2;
+                    .widget-steps {
+                        padding-bottom: 0;
+                        padding: 5px;
+                        // margin-left: 2px !important;
+                        // margin-right: 2px !important;
+                        background-color: rgba(253, 246, 236, 0.3);
+
+                        &.active {
+                            outline: 2px solid $steps-color;
+                            border: 1px solid $steps-color;
+                        }
+
+                        &:hover {
+                            background: #fdf6ec;
+                            outline: 1px solid $steps-color;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid $steps-color;
+                                border: 1px solid $steps-color;
+                                outline-offset: 0;
+                            }
+                        }
+
+                        .el-step__head.is-process {
+                            outline: 2px solid #67c23a;
+                            border: 1px solid #67c23a;
+                            color: #67c23a;
+                            background: #67c23a26;
+                        }
+
+                        // .el-tabs__content{
+                        //   min-height: 50px;
+                        // }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            border: 2px solid #f56c6c;
+                            outline-width: 0;
+                            height: 3px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                        }
+
+                        .widget-view-action.widget-steps-action {
+                            background: $steps-color;
+                        }
+
+                        .widget-view-drag.widget-steps-drag {
+                            background: $steps-color;
+                        }
+
+                        &::after {
+                            display: none;
+                        }
+                    }
+                    //============STEPS(步骤条)end
+
+                    //============collapse(折叠面板)
+                    $collapse-color: #293849;
+                    .widget-collapse {
+                        padding-bottom: 0;
+                        padding: 5px;
+                        // margin-left: 2px !important;
+                        // margin-right: 2px !important;
+                        background-color: rgba(253, 246, 236, 0.3);
+
+                        &.active {
+                            outline: 2px solid $collapse-color;
+                            border: 1px solid $collapse-color;
+                        }
+
+                        &:hover {
+                            background: #fdf6ec;
+                            outline: 1px solid $collapse-color;
+                            outline-offset: 0px;
+
+                            &.active {
+                                outline: 2px solid $collapse-color;
+                                border: 1px solid $collapse-color;
+                                outline-offset: 0;
+                            }
+                        }
+
+                        // .el-tabs__content{
+                        //   min-height: 50px;
+                        // }
+
+                        &.ghost {
+                            background: #f56c6c;
+                            border: 2px solid #f56c6c;
+                            outline-width: 0;
+                            height: 3px;
+                            box-sizing: border-box;
+                            font-size: 0;
+                            content: '';
+                            overflow: hidden;
+                            padding: 0;
+                        }
+
+                        .widget-view-action.widget-collapse-action {
+                            background: $collapse-color;
+                        }
+
+                        .widget-view-drag.widget-collapse-drag {
+                            background: $collapse-color;
+                        }
+
+                        &::after {
+                            display: none;
+                        }
+                    }
+                    //============collapse(折叠面板)end
+
+                    .ghost {
+                        background: #f56c6c;
+                        border: 2px solid #f56c6c;
+                        outline-width: 0;
+                        height: 3px;
+                        box-sizing: border-box;
+                        font-size: 0;
+                        content: '';
+                        overflow: hidden;
+                        padding: 0;
+                    }
+                }
 
-        &:hover{
-          background: #fdf6ec;
-          outline: 1px solid $steps-color;
-          outline-offset: 0px;
+                .ghost {
+                    background: #f56c6c;
+                    border: 2px solid #f56c6c;
+                    position: relative;
 
-          &.active{
-            outline: 2px solid $steps-color;
-            border: 1px solid $steps-color;
-            outline-offset: 0;
-          }
-        }
+                    &::after {
+                        background: #f56c6c;
+                    }
+                }
 
-        .el-step__head.is-process{
-           outline: 2px solid #67C23A;
-           border: 1px solid #67C23A;
-           color:  #67C23A;
-           background: #67c23a26;
-        }
+                li.ghost {
+                    height: 5px;
+                    list-style: none;
+                    font-size: 0;
+                    overflow: hidden;
+                }
 
-        // .el-tabs__content{
-        //   min-height: 50px;
-        // }
-
-        &.ghost{
-          background: #F56C6C;
-          border: 2px solid #F56C6C;
-          outline-width: 0;
-          height: 3px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
-        }
+                .widget-grid {
+                    background: #f4f6fc;
+                    position: relative;
+                    border-left: 5px solid transparent;
+                    padding: 5px;
+                    margin: 0 !important;
+
+                    &.active {
+                        border-left: 5px solid $primary-color;
+                        background: #b3d8ff;
+                    }
+                }
 
-        .widget-view-action.widget-steps-action{
-          background: $steps-color;
-        }
+                .widget-grid-container {
+                    &.ghost {
+                        background: #f56c6c;
+                        border: 2px solid #f56c6c;
+                        outline-width: 0;
+                        height: 3px;
+                        box-sizing: border-box;
+                        font-size: 0;
+                        content: '';
+                        overflow: hidden;
+                        padding: 0;
+                    }
+                }
 
-        .widget-view-drag.widget-steps-drag{
-          background: $steps-color;
-        }
+                .ghost {
+                    background: #f56c6c;
+                    border: 2px solid #f56c6c;
+                    position: relative;
 
-        &::after{
-          display: none;
-        }
-      }
-      //============STEPS(步骤条)end
-
-       //============collapse(折叠面板)
-      $collapse-color: #293849;
-     .widget-collapse{
-        padding-bottom: 0;
-        padding: 5px;
-        // margin-left: 2px !important;
-        // margin-right: 2px !important;
-        background-color: rgba(253,246,236, .3);
-
-        &.active{
-          outline: 2px solid $collapse-color;
-          border: 1px solid $collapse-color;
-        }
+                    &::after {
+                        background: #f56c6c;
+                    }
+                }
 
-        &:hover{
-          background: #fdf6ec;
-          outline: 1px solid $collapse-color;
-          outline-offset: 0px;
+                li.ghost {
+                    height: 5px;
+                    list-style: none;
+                    font-size: 0;
+                    overflow: hidden;
+                }
+            }
 
-          &.active{
-            outline: 2px solid $collapse-color;
-            border: 1px solid $collapse-color;
-            outline-offset: 0;
-          }
-        }
+            .ghost {
+                background: #fff;
+                border: 1px dashed $primary-color;
+
+                &::after {
+                    background: #fff;
+                    display: block;
+                    content: '';
+                    position: absolute;
+                    top: 0;
+                    left: 0;
+                    right: 0;
+                    bottom: 0;
+                }
+            }
 
-        // .el-tabs__content{
-        //   min-height: 50px;
-        // }
-
-        &.ghost{
-          background: #F56C6C;
-          border: 2px solid #F56C6C;
-          outline-width: 0;
-          height: 3px;
-          box-sizing: border-box;
-          font-size: 0;
-          content: '';
-          overflow: hidden;
-          padding: 0;
-        }
+            ul {
+                margin: 0;
+                padding: 0;
+            }
 
-        .widget-view-action.widget-collapse-action{
-          background: $collapse-color;
+            li.ghost {
+                list-style: none;
+                font-size: 0;
+                display: block;
+                position: relative;
+            }
         }
 
-        .widget-view-drag.widget-collapse-drag{
-          background: $collapse-color;
+        .viewer-container {
+            z-index: 99999 !important;
         }
 
-        &::after{
-          display: none;
+        .form-empty {
+            position: absolute;
+            text-align: center;
+            font-size: 20px;
+            top: 200px;
+            left: 50%;
+            margin-left: -150px;
+            color: #ccc;
         }
-      }
-      //============collapse(折叠面板)end
-
-      .ghost{
-        background: #F56C6C;
-        border: 2px solid #F56C6C;
-        outline-width: 0;
-        height: 3px;
-        box-sizing: border-box;
-        font-size: 0;
-        content: '';
-        overflow: hidden;
-        padding: 0;
-      }
     }
-
-    .ghost{
-      background: #F56C6C;
-      border: 2px solid #F56C6C;
-      position: relative;
-
-      &::after{
-        background: #F56C6C;
-      }
-    }
-
-    li.ghost{
-      height: 5px;
-      list-style: none;
-      font-size: 0;
-      overflow: hidden;
-    }
-
-    .widget-grid{
-      background: #F4F6FC;
-      position: relative;
-      border-left: 5px solid transparent;
-      padding: 5px;
-      margin: 0 !important;
-
-      &.active{
-        border-left: 5px solid $primary-color;
-        background: #b3d8ff;
-      }
-    }
-
-    .widget-grid-container{
-      &.ghost{
-        background: #F56C6C;
-        border: 2px solid #F56C6C;
-        outline-width: 0;
-        height: 3px;
-        box-sizing: border-box;
-        font-size: 0;
-        content: '';
-        overflow: hidden;
-        padding: 0;
-      }
-    }
-
-    .ghost{
-      background: #F56C6C;
-      border: 2px solid #F56C6C;
-      position: relative;
-
-      &::after{
-        background: #F56C6C;
-      }
-    }
-
-    li.ghost{
-      height: 5px;
-      list-style: none;
-      font-size: 0;
-      overflow: hidden;
-    }
-  }
-
-  .ghost{
-    background: #fff;
-    border: 1px dashed $primary-color;
-
-    &::after{
-      background: #fff;
-      display: block;
-      content: '';
-      position: absolute;
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-    }
-  }
-
-  ul{
-    margin: 0;
-    padding: 0;
-  }
-
-  li.ghost{
-    list-style: none;
-    font-size: 0;
-    display: block;
-    position: relative;
-  }
-}
-
-.viewer-container{
-  z-index: 99999 !important;
-}
-
-.form-empty{
-  position: absolute;
-  text-align: center;
-  font-size: 20px;
-  top: 200px;
-  left: 50%;
-  margin-left: -150px;
-  color: #ccc;
-}
-
-}
 </style>

+ 1 - 1
src/business/platform/form/formrender/dynamic-form/dynamic-form.vue

@@ -5,7 +5,7 @@
             <!--表头-->
             <div v-if="hasHeader" class="form-header">
                 <div v-if="hasHeader" class="title" style="font-size: 22px; font-family: SimHei" :class="titlePosition">
-                    {{ formDef.processName ? formDef.processName : formDef.name }}
+                    {{ formDef.name }}
                     <span v-if="formDef && formDef.flowName">{{ formDef.flowName }}</span>
                     <relevance-table
                         v-if="titleList.length > 0 && formParams.formAttrs.customClass.includes('true')"

+ 0 - 2
src/store/getters.js

@@ -34,8 +34,6 @@ export default {
   jianCeDuiXiangId: state => state.ibps.jianCeDuiXiangId ? state.ibps.jianCeDuiXiangId : '',
   myform: state => state.ibps.myform ? state.ibps.myform : '',
   jianCeCanShuId: state => state.ibps.jianCeCanShuId ? state.ibps.jianCeCanShuId : '',
-  // 所有检测项目名称及流程key数组
-  testingList: state => state.ibps.param && state.ibps.param.testingList ? state.ibps.param.testingList : [],
   // 获取所有用户信息
   usersList: state => state.ibps.param && state.ibps.param.usersList ? state.ibps.param.usersList : []
 }

+ 0 - 8
src/store/modules/ibps/modules/param.js

@@ -5,8 +5,6 @@ export default {
         jianCeDuiXiangId: '',
         jianCeCanShuId: '',
         myform: '',
-        // 所有检测项目名称及流程key数组
-        testingList: [],
         // 所有用户信息
         usersList: []
     },
@@ -20,17 +18,11 @@ export default {
         jianCeCanShuIdSet(state, jianCeCanShu) {
             state.jianCeCanShuId = jianCeCanShu.jianCeCanShuId || ''
         },
-        testingList(state, data) {
-            state.testingList = data.length ? data : []
-        },
         usersList(state, data) {
             state.usersList = data.length ? data : []
         }
     },
     actions: {
-        setTestingList({ commit }, data){
-            commit('testingList', data)
-        },
         setUsersList({ commit }, data){
             commit('usersList', data)
         }

+ 1 - 0
src/views/onLineEditing/index.vue

@@ -249,6 +249,7 @@ export default {
             repostCurd('add', JSON.stringify(params)).then((res) => {
                 if (res.state == '200') {
                     let dataItem = res.variables.cont[0]
+                    this.id = dataItem.id_
                     this.$emit('addClick', dataItem.id_, dataItem)
                     this.$message({
                         showClose: true,

+ 323 - 323
src/views/platform/bo/boDef/edit/detail/object-attr/index.vue

@@ -1,349 +1,349 @@
 <template>
-  <div class="main-container bo-attr">
-    <ibps-crud
-      ref="crud"
-      :data="listData"
-      :toolbars="!isToolbars&&formData.boType!=='out'?listConfig.toolbars:false"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :selection-row="!isToolbars&&formData.boType!=='out'?selectionRow:false"
-      :index-row="false"
-      :reserve-selection="true"
-      :show-pagination="true"
-      :pagination-options="{layout:'slot'}"
-      selection-type="checkbox"
-      row-key="id"
-      @select="handleSelect"
-      @row-click="handleRowClick"
-      @action-event="handleAction"
-    >
-      <template #footer>
-        <span class="el-pagination__total">{{ '共'+ listData.length }}条</span>
-      </template>
-    </ibps-crud>
-    <edit
-      :id="editId"
-      :datas="editData"
-      :title="title"
-      :clear="clear"
-      :is-create-table="formData.isCreateTable"
-      :visible="dialogFormVisible"
-      :readonly="readonly"
-      @callback="callback"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </div>
+    <div class="main-container bo-attr">
+        <ibps-crud
+            ref="crud"
+            :data="listData"
+            :toolbars="!isToolbars&&formData.boType!=='out'?listConfig.toolbars:false"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :selection-row="!isToolbars&&formData.boType!=='out'?selectionRow:false"
+            :index-row="false"
+            :reserve-selection="true"
+            :show-pagination="true"
+            :pagination-options="{layout:'slot'}"
+            selection-type="checkbox"
+            row-key="id"
+            @select="handleSelect"
+            @row-click="handleRowClick"
+            @action-event="handleAction"
+        >
+            <template #footer>
+                <span class="el-pagination__total">{{ '共'+ listData.length }}条</span>
+            </template>
+        </ibps-crud>
+        <edit
+            :id="editId"
+            :datas="editData"
+            :title="title"
+            :clear="clear"
+            :is-create-table="formData.isCreateTable"
+            :visible="dialogFormVisible"
+            :readonly="readonly"
+            @callback="callback"
+            @close="visible => dialogFormVisible = visible"
+        />
+    </div>
 </template>
 
 <script>
-import { typeOptions, defaultAttrs, subBoDefsAttrs,objectAttrRootData } from '../../../constants'
+import { typeOptions, defaultAttrs, subBoDefsAttrs, objectAttrRootData } from '../../../constants'
 import { checkSameNode } from '@/views/platform/bo/boDef/utils'
 import ActionUtils from '@/utils/action'
 import Edit from './edit'
-const uuid =()=>{
-  return  require('uuid').v1()
+const uuid = () => {
+    return require('uuid').v1()
 }
 export default {
-  components: {
-    Edit
-  },
-  props: {
-    id: String,
-    attrs: {
-      type: Array,
-      default: () => []
+    components: {
+        Edit
     },
-    formData: Object,
-    treeData: Array,
-    review: Object,
-    isMain: {
-      type: String,
-      default: 'Y'
+    props: {
+        id: String,
+        attrs: {
+            type: Array,
+            default: () => []
+        },
+        formData: Object,
+        treeData: Array,
+        review: Object,
+        isMain: {
+            type: String,
+            default: 'Y'
+        },
+        toolbars: {
+            type: Boolean,
+            default: false
+        },
+        readonly: {
+            type: Boolean,
+            default: false
+        },
+        height: [String, Number]
     },
-    toolbars: {
-      type: Boolean,
-      default: false
-    },
-    readonly: {
-      type: Boolean,
-      default: false
+    data () {
+        return {
+            dialogFormVisible: false, // 弹窗
+            editId: '', // 编辑dialog需要使用
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            editData: {},
+            defaultData: [],
+            title: '',
+            clear: false,
+            isSame: false,
+            selection: [],
+            selectionRow: {
+                'reserveSelectione': true
+            },
+            listData: this.attrs,
+            pagination: {},
+            isRadio: true,
+            listConfig: {
+                toolbars: [
+                    {
+                        key: 'add'
+                    },
+                    {
+                        key: 'edit'
+                    },
+                    {
+                        key: 'moveUp',
+                        label: '上移',
+                        icon: 'ibps-icon-arrow-circle-up'
+                    },
+                    {
+                        key: 'moveDown',
+                        label: '下移',
+                        icon: 'ibps-icon-arrow-circle-down'
+                    },
+                    {
+                        key: 'remove'
+                    },
+                    {
+                        key: 'reset',
+                        label: '重置',
+                        icon: 'ibps-icon-undo'
+                    }
+                ],
+                searchForm: {},
+                // 表格字段配置
+                columns: [
+                    { prop: 'name', label: '名称', minWidth: 150 },
+                    { prop: 'code', label: '编码', width: 140 },
+                    { prop: 'fieldName', label: '字段', width: 140 },
+                    { prop: 'desc', label: '字段描述', width: 200 },
+                    { prop: 'dataType', label: '属性类型', tags: typeOptions, width: 120 }
+                ]
+            }
+        }
     },
-    height: [String, Number]
-  },
-  data() {
-    return {
-      dialogFormVisible: false, // 弹窗
-      editId: '', // 编辑dialog需要使用
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      editData: {},
-      defaultData: [],
-      title: '',
-      clear: false,
-      isSame: false,
-      selection: [],
-      selectionRow: {
-        'reserveSelectione': true
-      },
-      listData: this.attrs,
-      pagination: {},
-      isRadio: true,
-      listConfig: {
-        toolbars: [
-          {
-            key: 'add'
-          },
-          {
-            key: 'edit'
-          },
-          {
-            key: 'moveUp',
-            label: '上移',
-            icon: 'ibps-icon-arrow-circle-up'
-          },
-          {
-            key: 'moveDown',
-            label: '下移',
-            icon: 'ibps-icon-arrow-circle-down'
-          },
-          {
-            key: 'remove'
-          },
-          {
-            key: 'reset',
-            label: '重置',
-            icon: 'ibps-icon-undo'
-          }
-        ],
-        searchForm: {},
-        // 表格字段配置
-        columns: [
-          { prop: 'name', label: '名称' },
-          { prop: 'code', label: '编码' },
-          { prop: 'fieldName', label: '字段' },
-          { prop: 'dataType', label: '属性类型', tags: typeOptions }
-        ]
-      }
-    }
-  },
-  computed: {
-    isToolbars() {
-      return this.toolbars
+    computed: {
+        isToolbars () {
+            return this.toolbars
+        },
+        reviewData () {
+            return this.review
+        }
     },
-    reviewData() {
-      return this.review
-    }
-  },
-  watch: {
-    attrs: {
-      handler: function(val, oldVal) {
-        if (this.$utils.isNotEmpty(this.attrs)) {
-          this.listData = this.attrs
+    watch: {
+        attrs: {
+            handler (val, oldVal) {
+                if (this.$utils.isNotEmpty(this.attrs)) {
+                    this.listData = this.attrs
+                }
+            },
+            deep: true
+        },
+        listData: {
+            handler (val, oldVal) {
+                this.checkNode(this.reviewData, this.treeData)
+                this.$emit('change', this.listData)
+            },
+            deep: true
         }
-      },
-      deep: true
     },
-    listData: {
-      handler: function(val, oldVal) {
-        this.checkNode(this.reviewData, this.treeData)
-        this.$emit('change', this.listData)
-      },
-      deep: true
-    }
-  },
-  methods: {
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'add':// 添加
-          this.handleEdit()
-          this.title = '添加对象属性'
-          break
-        case 'edit':// 编辑
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id)
-            this.title = '编辑对象属性'
-          }).catch(() => { })
-          break
-        case 'moveUp':// 上移
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.moveUp(ids)
-          }).catch(() => { })
-          break
-        case 'moveDown':// 下移
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.moveDown(ids)
-          }).catch(() => { })
-          break
-        case 'remove':// 删除
-          ActionUtils.removeRecord(selection, '此操作将删除该数据, 是否确定?').then((id) => {
-            this.handleRemove(id)
-          }).catch(() => {})
-          break
-        case 'reset':// 重置
-          this.$confirm('是否重置到初始属性?', '信息', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
+    methods: {
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'add':// 添加
+                    this.handleEdit()
+                    this.title = '添加对象属性'
+                    break
+                case 'edit':// 编辑
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id)
+                        this.title = '编辑对象属性'
+                    }).catch(() => { })
+                    break
+                case 'moveUp':// 上移
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.moveUp(ids)
+                    }).catch(() => { })
+                    break
+                case 'moveDown':// 下移
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.moveDown(ids)
+                    }).catch(() => { })
+                    break
+                case 'remove':// 删除
+                    ActionUtils.removeRecord(selection, '此操作将删除该数据, 是否确定?').then((id) => {
+                        this.handleRemove(id)
+                    }).catch(() => {})
+                    break
+                case 'reset':// 重置
+                    this.$confirm('是否重置到初始属性?', '信息', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                        type: 'warning'
+                    }).then(() => {
+                        this.$refs['crud'].clearSelection()
+                        if (this.isMain !== 'Y') {
+                            this.defaultData = JSON.parse(JSON.stringify(defaultAttrs))
+                            this.defaultData.splice(1, 0, subBoDefsAttrs)
+                        } else {
+                            this.defaultData = JSON.parse(JSON.stringify(defaultAttrs))
+                        }
+                        this.listData = JSON.parse(JSON.stringify(this.defaultData))
+                        ActionUtils.success('重置成功!')
+                    }).catch(() => {})
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 编辑回传
+         */
+        handleRowClick (row) {
+            this.editData = row
+        },
+        handleSelect (selection, row) {
+            this.editData = row
+        },
+        /**
+         * 处理添加||编辑
+         */
+        handleEdit (id = '', readonly = false) {
+            this.editId = id
+            const index = this.listData.findIndex(l => this.editId === l.id)
+            this.editData = this.listData[index]
+            this.readonly = readonly
+            this.dialogFormVisible = true
             this.$refs['crud'].clearSelection()
-            if (this.isMain !== 'Y') {
-              this.defaultData = JSON.parse(JSON.stringify(defaultAttrs))
-              this.defaultData.splice(1, 0, subBoDefsAttrs)
+        },
+        // 添加||编辑 数据返回
+        callback (value, buttonKey) {
+            const codeIndex = this.listData.findIndex(i => i.code === value.code)
+            const fieldNameIndex = this.listData.findIndex(i => i.fieldName === value.fieldName)
+            const curIndex = this.listData.findIndex(i => i.id === value.id)
+            this.clear = !!((codeIndex > -1 || fieldNameIndex > -1) && this.editId === '')
+            if (curIndex > -1) {
+                this.listData.splice(curIndex, 1, value)
             } else {
-              this.defaultData = JSON.parse(JSON.stringify(defaultAttrs))
+                if (codeIndex > -1 && this.editId === '') {
+                    ActionUtils.warning('编码【' + value.code + '】已存在')
+                    return
+                }
+                if (fieldNameIndex > -1 && this.editId === '') {
+                    ActionUtils.warning('字段【' + value.fieldName + '】已存在')
+                    return
+                }
+                value.id = uuid()
+                value.sn = this.listData.length + 1
+                this.listData.push(value)
             }
-            this.listData = JSON.parse(JSON.stringify(this.defaultData))
-            ActionUtils.success('重置成功!')
-          }).catch(() => {})
-          break
-        default:
-          break
-      }
-    },
-    /**
-     * 编辑回传
-     */
-    handleRowClick(row) {
-      this.editData = row
-    },
-    handleSelect(selection, row) {
-      this.editData = row
-    },
-    /**
-     * 处理添加||编辑
-     */
-    handleEdit(id = '', readonly = false) {
-      this.editId = id
-      const index = this.listData.findIndex(l => this.editId === l.id)
-      this.editData = this.listData[index]
-      this.readonly = readonly
-      this.dialogFormVisible = true
-      this.$refs['crud'].clearSelection()
-    },
-    // 添加||编辑 数据返回
-    callback(value, buttonKey) {
-      const codeIndex = this.listData.findIndex(i => i.code === value.code)
-      const fieldNameIndex = this.listData.findIndex(i => i.fieldName === value.fieldName)
-      const curIndex = this.listData.findIndex(i => i.id === value.id)
-      this.clear = !!((codeIndex > -1 || fieldNameIndex > -1) && this.editId === '')
-      if (curIndex > -1) {
-        this.listData.splice(curIndex, 1, value)
-      } else {
-        if (codeIndex > -1 && this.editId === '') {
-          ActionUtils.warning('编码【' + value.code + '】已存在')
-          return
-        }
-        if (fieldNameIndex > -1 && this.editId === '') {
-          ActionUtils.warning('字段【' + value.fieldName + '】已存在')
-          return
-        }
-        value.id = uuid()
-        value.sn = this.listData.length + 1
-        this.listData.push(value)
-      }
-      this.$emit('change', this.listData)
-    },
-    filtrationIndex(arr, move) {
-      let indexs = []
-      arr.forEach(a => {
-        this.listData.forEach((l, index) => {
-          if (a === l.id) {
-            indexs.push(index)
-          }
-        })
-      })
-      const compare = function(a, b) {
-        return move === 'moveUp' ? a - b : b - a
-      }
-      indexs = indexs.sort(compare)
-      return indexs
-    },
-    // 上移
-    moveUp(ids) {
-      const arr = ids.split(',')
-      const indexs = this.filtrationIndex(arr, 'moveUp')
-      try {
-        indexs.forEach(i => {
-          if (i === 0) {
-            throw new Error('EndIterative')
-          } else {
-            const upDate = this.listData[i - 1]
-            this.listData.splice(i - 1, 1)
-            this.listData.splice(i, 0, upDate)
-          }
-        })
-      } catch (e) {
-        if (e.message !== 'EndIterative') throw e
-      }
-    },
-    // 下移
-    moveDown(ids) {
-      const arr = ids.split(',')
-      const indexs = this.filtrationIndex(arr, 'moveDown')
-      try {
-        indexs.forEach(i => {
-          if (i === this.listData.length - 1) {
-            throw new Error('EndIterative')
-          } else {
-            const upDate = this.listData[i + 1]
-            this.listData.splice(i + 1, 1)
-            this.listData.splice(i, 0, upDate)
-          }
-        })
-      } catch (e) {
-        if (e.message !== 'EndIterative') throw e
-      }
-    },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      const arr = ids.split(',')
-      arr.forEach(a => {
-        this.listData.forEach((i, index) => {
-          if (a === i.id && i.code !== 'createTime') {
-            this.listData.splice(index, 1)
-          } else if (a === i.id && i.code === 'createTime') {
-            this.$message({
-              message: '创建时间不可删除!',
-              type: 'warning'
+            this.$emit('change', this.listData)
+        },
+        filtrationIndex (arr, move) {
+            let indexs = []
+            arr.forEach(a => {
+                this.listData.forEach((l, index) => {
+                    if (a === l.id) {
+                        indexs.push(index)
+                    }
+                })
             })
-          }
-        })
-      })
-      this.clearSelection()
-    },
-    clearSelection() {
-      this.$refs['crud'] ? this.$refs['crud'].clearSelection() : null
-    },
-    callbackListData() {
-      return this.listData
-    },
-    getListData(value) {
-      this.listData = value
-    },
-    checkNode(review, treeData) {
-      this.isSame = checkSameNode(review, treeData)
-      this.$emit('checkNode', this.isSame)
+            const compare = function (a, b) {
+                return move === 'moveUp' ? a - b : b - a
+            }
+            indexs = indexs.sort(compare)
+            return indexs
+        },
+        // 上移
+        moveUp (ids) {
+            const arr = ids.split(',')
+            const indexs = this.filtrationIndex(arr, 'moveUp')
+            try {
+                indexs.forEach(i => {
+                    if (i === 0) {
+                        throw new Error('EndIterative')
+                    } else {
+                        const upDate = this.listData[i - 1]
+                        this.listData.splice(i - 1, 1)
+                        this.listData.splice(i, 0, upDate)
+                    }
+                })
+            } catch (e) {
+                if (e.message !== 'EndIterative') throw e
+            }
+        },
+        // 下移
+        moveDown (ids) {
+            const arr = ids.split(',')
+            const indexs = this.filtrationIndex(arr, 'moveDown')
+            try {
+                indexs.forEach(i => {
+                    if (i === this.listData.length - 1) {
+                        throw new Error('EndIterative')
+                    } else {
+                        const upDate = this.listData[i + 1]
+                        this.listData.splice(i + 1, 1)
+                        this.listData.splice(i, 0, upDate)
+                    }
+                })
+            } catch (e) {
+                if (e.message !== 'EndIterative') throw e
+            }
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove (ids) {
+            const arr = ids.split(',')
+            arr.forEach(a => {
+                this.listData.forEach((i, index) => {
+                    if (a === i.id && i.code !== 'createTime') {
+                        this.listData.splice(index, 1)
+                    } else if (a === i.id && i.code === 'createTime') {
+                        this.$message({
+                            message: '创建时间不可删除!',
+                            type: 'warning'
+                        })
+                    }
+                })
+            })
+            this.clearSelection()
+        },
+        clearSelection () {
+            this.$refs['crud'] ? this.$refs['crud'].clearSelection() : null
+        },
+        callbackListData () {
+            return this.listData
+        },
+        getListData (value) {
+            this.listData = value
+        },
+        checkNode (review, treeData) {
+            this.isSame = checkSameNode(review, treeData)
+            this.$emit('checkNode', this.isSame)
+        }
     }
-  }
 }
 </script>
 <style lang="scss">
 .bo-attr{
-  .el-table{
-    height:  calc(75vh + 12px ) !important;
-  }
-  .toolbar-box{
-    display: none;
-  }
-  .ibps-container-crud__footer{
-    padding-top: 5px;
-    text-align: right;
-  }
+    .el-table{
+        height:  calc(75vh + 12px ) !important;
+    }
+    .toolbar-box{
+        display: none;
+    }
+    .ibps-container-crud__footer{
+        padding-top: 5px;
+        text-align: right;
+    }
 }
-
 </style>

+ 36 - 36
src/views/platform/bo/boDef/list.vue

@@ -30,7 +30,7 @@
             @sort-change="handleSortChange"
             @pagination-change="handlePaginationChange"
         >
-            <!--    @column-link-click="handleLinkClick"-->
+            <!-- @column-link-click="handleLinkClick"-->
             <div slot="versionCount" slot-scope="scope">
                 默认:
                 <el-link type="primary" @click="handleVersion(scope.row.id)">版本({{ scope.row.version }})</el-link>
@@ -158,21 +158,21 @@ export default {
                     forms: [
                         { prop: 'Q^NAME_^SL', label: '名称' },
                         { prop: 'Q^CODE_^SL', label: '编码' }
-                        /* {
-              prop: 'Q^IS_CREATE_TABLE_^S',
-              label: '是否生成表',
-              fieldType: 'select',
-              options: createTabelOptions
-            } */
+                        // {
+                        //     prop: 'Q^IS_CREATE_TABLE_^S',
+                        //     label: '是否生成表',
+                        //     fieldType: 'select',
+                        //     options: createTabelOptions
+                        // }
                     ]
                 },
                 // 表格字段配置
                 columns: [
-                    { prop: 'name', label: '名称', sortable: true, minWidth: 250 },
+                    { prop: 'name', label: '名称', sortable: true, minWidth: 200 },
                     { prop: 'code', label: '编码', sortable: true, width: 100 },
                     { prop: 'versionCount', label: '版本信息', fieldType: 'slot', slotName: 'versionCount', width: 180 },
                     { prop: 'typeId', label: '归分类型', sortable: true, width: 120 },
-                    { prop: 'status', label: '状态', sortable: true, width: 100, tags: statusOptions },
+                    { prop: 'status', label: '状态', sortable: true, width: 80, tags: statusOptions },
                     { prop: 'boType', label: '对象类型', sortable: true, width: 100, tags: boTypeOptions },
                     { prop: 'isCreateTable', label: '生成表', sortable: true, tags: createTabelOptions, width: 80 },
                     { prop: 'createTime', label: '创建时间', sortable: true, width: 150 }
@@ -219,9 +219,9 @@ export default {
         this.loadData()
     },
     methods: {
-    /**
-     * 加载数据
-     */
+        /**
+         * 加载数据
+         */
         loadData (id = '') {
             this.loading = true
             queryPageList(this.getFormatParams(id)).then(response => {
@@ -230,7 +230,7 @@ export default {
                         const temp = this.typeFiler.find(i => i.id === item.typeId)
                         item.typeId = temp ? temp.name : '未分类'
                     } else {
-                        item.typeId = item.typeId ? 'a0分类被删除' : 'z9未分类'
+                        item.typeId = item.typeId ? '分类被删除' : '未分类'
                     }
                 })
                 ActionUtils.handleListData(this, response.data)
@@ -240,8 +240,8 @@ export default {
             })
         },
         /**
-     * 获取格式化参数
-     */
+         * 获取格式化参数
+         */
         getFormatParams () {
             const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
             params['Q^TYPE_ID_^S'] = this.typeId
@@ -251,15 +251,15 @@ export default {
                 this.sorts)
         },
         /**
-     * 处理分页事件
-     */
+         * 处理分页事件
+         */
         handlePaginationChange (page) {
             ActionUtils.setPagination(this.pagination, page)
             this.loadData()
         },
         /**
-     * 处理排序
-     */
+         * 处理排序
+         */
         handleSortChange (sort) {
             ActionUtils.setSorts(this.sorts, sort)
             this.loadData()
@@ -268,15 +268,15 @@ export default {
             this.loadData()
         },
         /**
-     * 设置分类
-     */
+         * 设置分类
+         */
         handleSetCategory (editId) {
             this.editId = editId || ''
             this.settingTypeFormVisible = true
         },
         /**
-     * 保存分类
-     */
+         * 保存分类
+         */
         saveSettingType (typeId) {
             setCategory({
                 boDefIds: this.editId,
@@ -290,16 +290,16 @@ export default {
             })
         },
         /**
-     * 添加
-     */
+         * 添加
+         */
         handleEdit (editId = '', readonly = false) {
             this.editId = editId || ''
             this.readonly = readonly
             this.dialogFormVisible = true
         },
         /**
-     * 更多版本
-     */
+         * 更多版本
+         */
         handleVersions (code = '') {
             this.code = code || ''
             this.versionsFormVisible = true
@@ -309,14 +309,14 @@ export default {
             this.code = row.code
         },
         /**
-     * 点击表格
-     */
-        /* handleLinkClick(data, columns) {
-      console.log(data.id)
-    }, */
+         * 点击表格
+         */
+        // handleLinkClick (data, columns) {
+        //     console.log(data.id)
+        // },
         /**
-     * 复制
-     */
+         * 复制
+         */
         handleCopy (editId = '') {
             this.editId = editId || ''
             this.copyFormVisible = true
@@ -326,8 +326,8 @@ export default {
             this.typeFiler = data
         },
         /**
-     * 处理按钮事件
-     */
+         * 处理按钮事件
+         */
         handleAction (command, position, selection, data) {
             switch (command) {
                 case 'search':// 查询

+ 0 - 12
src/views/platform/bpmn/bpmTask/list.vue

@@ -52,7 +52,6 @@
             :visible="bpmnFormrenderDialogVisible"
             :task-id="editId"
             :title="flowName"
-            :processName="processName"
             @callback="search"
             @close="visible => (bpmnFormrenderDialogVisible = visible)"
         />
@@ -84,7 +83,6 @@
                 action: 'agree', // 打开弹窗的动作
                 pkKey: 'id', // 主键  如果主键不是pk需要传主键
                 flowName: '',
-                processName: '',
                 selectorVisible: false,
                 ids: '',
                 title: '',
@@ -367,8 +365,6 @@
                 // 打开表单前获取flowName和processName,避免流程节点状态bug
                 let selected = this.listData.find(item => item.id === id)
                 this.flowName = selected.name
-                this.processName = this.getProjectName(selected.procDefKey, selected.subject)
-
                 request({
                     url: BUSINESS_BASE_URL() + '/getFormData/flag',
                     method: 'post',
@@ -401,15 +397,7 @@
             },
             handleLinkClick(data, columns) {
                 this.flowName = data.name
-                this.processName = this.getProjectName(data.procDefKey, data.subject)
                 this.handleApprove(data[this.pkKey])
-            },
-            // 判断是否为检测项目流程,是则截取流程标题为表单名称
-            getProjectName(key, subject) {
-                // 从store中获取保存的检测流程信息数组,默认设置已知的四个流程key(三非通用一通用),流程key有变化需修改此处默认值
-                const { testingList = ['Process_0idt26n', 'Process_1rwhy1r', 'Process_05lkhio', 'Process_140upmu'] } = this.$store.getters
-                let res = testingList.includes(key)
-                return res ? subject.includes('#') ? subject.split('#')[0] : '' : ''
             }
         }
     }

+ 335 - 336
src/views/platform/data/dataTemplate/list.vue

@@ -1,134 +1,133 @@
 <template>
-  <div>
-    <ibps-card-list
-      ref="crud"
-      :title="title"
-      :height="height"
-      :data="listData"
-      :pagination="pagination"
-      :pk-key="pkKey"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :loading="loading"
-      :create-text="createText"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="east">
-        <ibps-type-tree
-          :width="width"
-          :height="treeHeight"
-          :has-contextmenu="true"
-          :category-key="categoryKey"
-          title="数据模版分类"
-          position="east"
-          @node-click="handleNodeClick"
-          @expand-collapse="handleExpandCollapse"
-        />
-      </template>
-      <template slot="searchForm">
-        <el-form class="search-form" inline @keyup.enter.native.stop="search">
-          <el-form-item>
-            <el-input v-model="searchField" placeholder="请输入" clearable class="input-with-select">
-              <el-select slot="prepend" v-model="searchName" placeholder="请选择">
-                <el-option label="模版名称" value="Q^name_^SL" />
-                <el-option label="模版key" value="Q^key_^SL" />
-                <el-option label="数据表名" value="Q^dataset_key_^SL" />
-
-              </el-select>
-              <el-button slot="append" icon="el-icon-search" @click="search" />
-            </el-input>
-          </el-form-item>
-          <el-form-item>
-            <ibps-toolbar
-              :actions="listConfig.toolbars"
-              @action-event="handleActionEvent"
-            />
-          </el-form-item>
-        </el-form>
-      </template>
+    <div>
+        <ibps-card-list
+            ref="crud"
+            :title="title"
+            :height="height"
+            :data="listData"
+            :pagination="pagination"
+            :pk-key="pkKey"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :loading="loading"
+            :create-text="createText"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="east">
+                <ibps-type-tree
+                    :width="width"
+                    :height="treeHeight"
+                    :has-contextmenu="true"
+                    :category-key="categoryKey"
+                    title="数据模版分类"
+                    position="east"
+                    @node-click="handleNodeClick"
+                    @expand-collapse="handleExpandCollapse"
+                />
+            </template>
+            <template slot="searchForm">
+                <el-form class="search-form" inline @keyup.enter.native.stop="search">
+                    <el-form-item>
+                        <el-input v-model="searchField" placeholder="请输入" clearable class="input-with-select">
+                            <el-select slot="prepend" v-model="searchName" placeholder="请选择">
+                                <el-option label="模版名称" value="Q^name_^SL" />
+                                <el-option label="模版key" value="Q^key_^SL" />
+                                <el-option label="数据集key" value="Q^dataset_key_^SL" />
+                            </el-select>
+                            <el-button slot="append" icon="el-icon-search" @click="search" />
+                        </el-input>
+                    </el-form-item>
+                    <el-form-item>
+                        <ibps-toolbar
+                            :actions="listConfig.toolbars"
+                            @action-event="handleActionEvent"
+                        />
+                    </el-form-item>
+                </el-form>
+            </template>
 
-      <template slot="item-symbol" slot-scope="scope">
-        <template v-if="scope.data.type === 'default'">
-          <i
-            class="symbol-icon "
-            :class="scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
-          />
-        </template>
-        <template v-else-if="scope.data.type === 'dialog'">
-          <span class="ibps-icon-stack symbol-icon " style="font-size:0.55em;">
+            <template slot="item-symbol" slot-scope="scope">
+                <template v-if="scope.data.type === 'default'">
+                    <i
+                        class="symbol-icon "
+                        :class="scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
+                    />
+                </template>
+                <template v-else-if="scope.data.type === 'dialog'">
+                    <span class="ibps-icon-stack symbol-icon " style="font-size:0.55em;">
 
-            <i class="ibps-icon-window-maximize ibps-icon-stack-2x" />
-            <i
-              :class=" scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
-              class="ibps-icon-stack-1x"
-              style="top: 5px;"
-            />
-          </span>
-        </template>
-        <template v-else>
-          <i class="symbol-icon ibps-icon-database" />
-        </template>
+                        <i class="ibps-icon-window-maximize ibps-icon-stack-2x" />
+                        <i
+                            :class=" scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
+                            class="ibps-icon-stack-1x"
+                            style="top: 5px;"
+                        />
+                    </span>
+                </template>
+                <template v-else>
+                    <i class="symbol-icon ibps-icon-database" />
+                </template>
 
-      </template>
-    </ibps-card-list>
-    <!-- 导入数据 -->
-    <import-data
-      :id="editId"
-      :visible="importFormVisible"
-      @callback="search"
-      @close="visible => importFormVisible = visible"
-    />
-    <!-- 复制数据模版 -->
-    <copy
-      :id="editId"
-      :visible="copyDialogFormVisible"
-      @close="visible => copyDialogFormVisible = visible"
-    />
-    <!--创建数据模版-->
-    <create
-      :title="createText"
-      :type-id="typeId"
-      :visible="dialogFormVisible"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <template-builder
-      :id="editId"
-      :visible="templatebuilderDialogVisible"
-      @callback="search"
-      @close="visible => templatebuilderDialogVisible = visible"
-    />
+            </template>
+        </ibps-card-list>
+        <!-- 导入数据 -->
+        <import-data
+            :id="editId"
+            :visible="importFormVisible"
+            @callback="search"
+            @close="visible => importFormVisible = visible"
+        />
+        <!-- 复制数据模版 -->
+        <copy
+            :id="editId"
+            :visible="copyDialogFormVisible"
+            @close="visible => copyDialogFormVisible = visible"
+        />
+        <!--创建数据模版-->
+        <create
+            :title="createText"
+            :type-id="typeId"
+            :visible="dialogFormVisible"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+        <template-builder
+            :id="editId"
+            :visible="templatebuilderDialogVisible"
+            @callback="search"
+            @close="visible => templatebuilderDialogVisible = visible"
+        />
 
-    <!--数据模版预览-动态参数-->
-    <dynamic-params-preview
-      :visible="dynamicParamsDialogVisible"
-      :conditions="conditions"
-      @close="visible => dynamicParamsDialogVisible = visible"
-      @callback="handleDynamicParams"
-    />
-    <!--数据模版预览-->
-    <data-template-render-preview
-      :visible="templateRendererDialogVisible"
-      :data="dataTemplate"
-      :value="selectedValue"
-      :multiple="multiple"
-      :label-key="labelKey"
-      :dynamic-params="dynamicParams"
-      preview
-      @close="visible => templateRendererDialogVisible = visible"
-      @action-event="handleTemplaterenderActionEvent"
-    />
-    <!--数据模版预览-数据-->
-    <data-template-render-preview-data
-      :visible="previewDialogVisible"
-      :data="previewFormData"
-      @close="visible => previewDialogVisible = visible"
-    />
-  </div>
+        <!--数据模版预览-动态参数-->
+        <dynamic-params-preview
+            :visible="dynamicParamsDialogVisible"
+            :conditions="conditions"
+            @close="visible => dynamicParamsDialogVisible = visible"
+            @callback="handleDynamicParams"
+        />
+        <!--数据模版预览-->
+        <data-template-render-preview
+            :visible="templateRendererDialogVisible"
+            :data="dataTemplate"
+            :value="selectedValue"
+            :multiple="multiple"
+            :label-key="labelKey"
+            :dynamic-params="dynamicParams"
+            preview
+            @close="visible => templateRendererDialogVisible = visible"
+            @action-event="handleTemplaterenderActionEvent"
+        />
+        <!--数据模版预览-数据-->
+        <data-template-render-preview-data
+            :visible="previewDialogVisible"
+            :data="previewFormData"
+            @close="visible => previewDialogVisible = visible"
+        />
+    </div>
 </template>
 <script>
 import { queryPageList, remove, exportFile, getByKey } from '@/api/platform/data/dataTemplate'
@@ -147,225 +146,225 @@ import DataTemplateRenderPreview from '@/business/platform/data/templaterender/p
 import DataTemplateRenderPreviewData from '@/business/platform/data/templaterender/preview/preview-data'
 
 export default {
-  components: {
-    IbpsTypeTree,
-    IbpsCardList,
-    Create,
-    Copy,
-    ImportData,
-    TemplateBuilder,
-    DynamicParamsPreview,
-    DataTemplateRenderPreview,
-    DataTemplateRenderPreviewData
-  },
-  mixins: [FixHeight, PreviewMixin],
-  data() {
-    return {
-      width: 220,
-      height: 500,
-      title: '创建页面、对话框管理',
-      createText: '创建数据模版',
-      categoryKey: 'BO_TYPE',
-      typeId: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      loading: false,
-      dialogFormVisible: false,
-      templatebuilderDialogVisible: false,
-      importFormVisible: false,
-      copyDialogFormVisible: false,
+    components: {
+        IbpsTypeTree,
+        IbpsCardList,
+        Create,
+        Copy,
+        ImportData,
+        TemplateBuilder,
+        DynamicParamsPreview,
+        DataTemplateRenderPreview,
+        DataTemplateRenderPreviewData
+    },
+    mixins: [FixHeight, PreviewMixin],
+    data () {
+        return {
+            width: 220,
+            height: 500,
+            title: '创建页面、对话框管理',
+            createText: '创建数据模版',
+            categoryKey: 'BO_TYPE',
+            typeId: '',
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            loading: false,
+            dialogFormVisible: false,
+            templatebuilderDialogVisible: false,
+            importFormVisible: false,
+            copyDialogFormVisible: false,
 
-      dataTemplate: {},
+            dataTemplate: {},
 
-      searchField: '',
-      searchName: 'Q^name_^SL',
+            searchField: '',
+            searchName: 'Q^name_^SL',
 
-      editId: '',
-      listData: [],
-      listConfig: {
-        // 查询条件
-        searchForm: { prop: 'Q^name_^SL', label: '模版名称' },
-        // 工具栏
-        toolbars: [
-          { key: 'import' },
-          { key: 'export' }
-        ],
+            editId: '',
+            listData: [],
+            listConfig: {
+                // 查询条件
+                searchForm: { prop: 'Q^name_^SL', label: '模版名称' },
+                // 工具栏
+                toolbars: [
+                    { key: 'import' },
+                    { key: 'export' }
+                ],
 
-        // 表格字段配置
-        columns: [
-          { prop: 'name', label: '表单名称' }
-        ],
-        // 管理列
-        rowHandle: {
-          actions: [
-            { key: 'preview', label: '预览', icon: 'el-icon-view' },
-            { key: 'edit', label: '编辑', icon: 'ibps-icon-edit' },
-            { key: 'remove', label: '删除', icon: 'ibps-icon-remove' }
-          ]
+                // 表格字段配置
+                columns: [
+                    { prop: 'name', label: '表单名称' }
+                ],
+                // 管理列
+                rowHandle: {
+                    actions: [
+                        { key: 'preview', label: '预览', icon: 'el-icon-view' },
+                        { key: 'edit', label: '编辑', icon: 'ibps-icon-edit' },
+                        { key: 'remove', label: '删除', icon: 'ibps-icon-remove' }
+                    ]
+                }
+            },
+            pagination: {},
+            sorts: {}
         }
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  computed: {
-    treeHeight() {
-      return this.height - 75
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    // 加载数据
-    loadData() {
-      this.loading = true
-      queryPageList(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = {}
-      if (this.$utils.isNotEmpty(this.searchField)) {
-        params[this.searchName] = this.searchField
-      }
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
     },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadData()
-    },
-    /**
-     * @description 处理按钮的事件 【包含增删改查】
-     * @param {*} buttonKey
-     * @param {*} position
-     * @param {*} data
-     */
-    handleActionEvent(action, position, data, index) {
-      const buttonKey = action.key
-      let selection = []
-      if (this.$refs.crud) {
-        selection = this.$refs.crud.getSelectedIds()
-      }
-      this.handleAction(buttonKey, position, selection, data)
-    },
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add':// 添加
-          this.dialogFormVisible = true
-          break
-        case 'edit':// 编辑
-          this.handleEdit(selection)
-          break
-        case 'remove':// 删除
-          ActionUtils.removeRecord(selection).then((ids) => {
-            this.handleRemove(ids)
-          }).catch(() => { })
-          break
-        case 'import':// 导入
-          this.handleImport()
-          break
-        case 'export':// 导出
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleExport(ids)
-          }).catch(() => { })
-          break
-        case 'preview':// 预览
-          this.handlePreview(data.key)
-          break
-        case 'copy':// 复制
-          this.handleCopy(data.id)
-          break
-      }
-    },
-    handleImport() {
-      this.importFormVisible = true
-    },
-    handleExport(ids) {
-      exportFile({ templateIds: ids }).then((response) => {
-        if (!response) {
-          return
+    computed: {
+        treeHeight () {
+            return this.height - 75
         }
-        ActionUtils.exportFile(
-          response.data,
-          'dataTemplate_' + fecha.formatDate('yyyyMMddHHmmss') + '.zip'
-        )
-      }).catch(() => {
-
-      })
     },
-    handleEdit(id) {
-      this.templatebuilderDialogVisible = true
-      this.editId = id
+    created () {
+        this.loadData()
     },
-    handleCopy(id) {
-      this.copyDialogFormVisible = true
-      this.editId = id
-    },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      remove({ dataTemplateIds: ids }).then(response => {
-        ActionUtils.removeSuccessMessage()
-        this.search()
-      }).catch(() => {})
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 200 : 30
-    },
-    // 预览
-    handlePreview(key) {
-      // this.dialogLoading = true
-      this.dataTemplate = {}
-      getByKey({
-        dataTemplateKey: key
-      }).then(response => {
-        // 从后台获取数据
-        this.dataTemplate = this.$utils.parseData(response.data)
-        setTimeout(() => {
-          this.previewTemplate()
-        }, 100)
-        // this.dialogLoading = false
-      }).catch(() => {
-        // this.dialogLoading = false
-      })
+    methods: {
+        // 加载数据
+        loadData () {
+            this.loading = true
+            queryPageList(this.getSearcFormData()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData () {
+            const params = {}
+            if (this.$utils.isNotEmpty(this.searchField)) {
+                params[this.searchName] = this.searchField
+            }
+            if (this.$utils.isNotEmpty(this.typeId)) {
+                params['Q^TYPE_ID_^S'] = this.typeId
+            }
+            return ActionUtils.formatParams(
+                params,
+                this.pagination,
+                this.sorts)
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.loadData()
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange (sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
+        },
+        /**
+         * 查询
+         */
+        search () {
+            this.loadData()
+        },
+        /**
+         * @description 处理按钮的事件 【包含增删改查】
+         * @param {*} buttonKey
+         * @param {*} position
+         * @param {*} data
+         */
+        handleActionEvent (action, position, data, index) {
+            const buttonKey = action.key
+            let selection = []
+            if (this.$refs.crud) {
+                selection = this.$refs.crud.getSelectedIds()
+            }
+            this.handleAction(buttonKey, position, selection, data)
+        },
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add':// 添加
+                    this.dialogFormVisible = true
+                    break
+                case 'edit':// 编辑
+                    this.handleEdit(selection)
+                    break
+                case 'remove':// 删除
+                    ActionUtils.removeRecord(selection).then((ids) => {
+                        this.handleRemove(ids)
+                    }).catch(() => { })
+                    break
+                case 'import':// 导入
+                    this.handleImport()
+                    break
+                case 'export':// 导出
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleExport(ids)
+                    }).catch(() => { })
+                    break
+                case 'preview':// 预览
+                    this.handlePreview(data.key)
+                    break
+                case 'copy':// 复制
+                    this.handleCopy(data.id)
+                    break
+            }
+        },
+        handleImport () {
+            this.importFormVisible = true
+        },
+        handleExport (ids) {
+            exportFile({ templateIds: ids }).then((response) => {
+                if (!response) {
+                    return
+                }
+                ActionUtils.exportFile(
+                    response.data,
+                    'dataTemplate_' + fecha.formatDate('yyyyMMddHHmmss') + '.zip'
+                )
+            }).catch(() => {
+
+            })
+        },
+        handleEdit (id) {
+            this.templatebuilderDialogVisible = true
+            this.editId = id
+        },
+        handleCopy (id) {
+            this.copyDialogFormVisible = true
+            this.editId = id
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove (ids) {
+            remove({ dataTemplateIds: ids }).then(response => {
+                ActionUtils.removeSuccessMessage()
+                this.search()
+            }).catch(() => {})
+        },
+        handleNodeClick (typeId) {
+            this.typeId = typeId
+            this.loadData()
+        },
+        handleExpandCollapse (isExpand) {
+            this.width = isExpand ? 200 : 30
+        },
+        // 预览
+        handlePreview (key) {
+            // this.dialogLoading = true
+            this.dataTemplate = {}
+            getByKey({
+                dataTemplateKey: key
+            }).then(response => {
+                // 从后台获取数据
+                this.dataTemplate = this.$utils.parseData(response.data)
+                setTimeout(() => {
+                    this.previewTemplate()
+                }, 100)
+                // this.dialogLoading = false
+            }).catch(() => {
+                // this.dialogLoading = false
+            })
+        }
     }
-  }
 }
 </script>

+ 0 - 1
src/views/platform/data/dataset/list.vue

@@ -1,4 +1,3 @@
-y
 <template>
   <ibps-layout ref="layout">
     <div slot="west">

+ 0 - 10
src/views/system/dashboard/components/new-home.vue

@@ -198,7 +198,6 @@
             :def-id="activeTab === 'save' ? defId : null"
             :pro-inst-id="activeTab === 'save' ? proInstId : null"
             :title="['wait', 'save'].includes(activeTab) ? FlowName : null"
-            :processName="processName"
             @callback="getData(activeTab)"
             @close="visible => (dialogFormVisible = visible)"
         />
@@ -333,7 +332,6 @@
                 defaultPagination: { page: 1, limit: 15 },
                 sorts: { CREATE_TIME_: 'DESC' },
                 timer: null,
-                processName: '',
                 userList: [],
                 orgInfo: {},
                 activeTab: 'wait',
@@ -547,7 +545,6 @@
                 this.defId = data.procDefId || ''
                 this.proInstId = data.id || ''
                 this.FlowName = data.name
-                this.processName = this.getProjectName(data.procDefKey, data.subject)
                 this.dialogFormVisible = true
             },
             // 开关右侧栏抽屉
@@ -577,13 +574,6 @@
                 }
                 return result.split('/')
             },
-            // 判断是否为检测项目流程,是则截取流程标题为表单名称
-            getProjectName(key, subject) {
-                // 从store中获取保存的检测流程信息数组,默认设置已知的四个流程key(三非通用一通用),流程key有变化需修改此处默认值
-                const { testingList = ['Process_0idt26n', 'Process_1rwhy1r', 'Process_05lkhio', 'Process_140upmu'] } = this.$store.getters
-                let res = testingList.includes(key)
-                return res ? subject.includes('#') ? subject.split('#')[0] : '' : ''
-            },
             /**
              * 主管提醒
              * 数据处理,将所有待办数据根据是否过期处理为两个数组

+ 42 - 61
src/views/system/dashboard/page.vue

@@ -24,10 +24,10 @@
                 </el-upload>
 
                 <el-upload
+                    v-if="showRepost"
                     style="display: inline-block; margin-left: 10px"
                     class="upload-demo"
                     :action="reportPath"
-                    v-if="showRepost"
                     :headers="headers"
                     :before-upload="ReportBeforeUpload"
                     :show-file-list="false"
@@ -44,9 +44,7 @@
                     style="display: inline-block; margin-left: 10px"
                     icon="el-icon-download"
                     @click="downloadData()"
-                >
-                    下载桌面应用</el-button
-                >
+                >下载桌面应用</el-button>
             </template>
         </newHome>
         <ibps-back-to-top
@@ -154,7 +152,8 @@
 <script>
     import { getMyDesktop } from '@/api/platform/desktop/myLayout'
     import { initColumn, isInit, getComponents } from './components'
-    import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl' //引用导出地址
+    // 引用导出地址
+    import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl'
     //  网格布局组件
     import { GridLayout, GridItem } from 'vue-grid-layout'
     import IbpsBackToTop from '@/components/ibps-back-to-top'
@@ -184,7 +183,7 @@
             'ibps-grid-layout': GridLayout,
             'ibps-grid-item': GridItem
         },
-        data() {
+        data () {
             return {
                 infoMessage: [],
                 uloadPath: BASE_API() + BUSINESS_BASE_URL() + '/ck/task/importExcel',
@@ -216,7 +215,6 @@
 
                 bpmnFormrenderDialogVisible: false, // 流程
                 defId: '',
-                taskId: '',
                 instanceId: '',
                 layoutIndex: '',
                 initInterval: null,
@@ -231,29 +229,31 @@
             }
         },
         computed: {
-            system() {
+            system () {
                 return this.$store.getters.system ? this.$store.getters.system : null
             },
-            systemAlias() {
+            systemAlias () {
                 return this.$store.getters.system ? this.$store.getters.system.alias : ''
             },
-            localSystem() {
+            localSystem () {
                 return this.system.isLocal
             }
         },
-        mounted() {
-            if ('isNormal' == localStorage.getItem('statistic')) this.showRepost = false
+        mounted () {
+            if (localStorage.getItem('statistic') === 'isNormal') {
+                this.showRepost = false
+            }
             this.initLoading = false
             this.initData()
         },
-        created() {
+        created () {
             this.getTestingData()
             this.getUsersList()
             StatisticsData().then(data => {
-                //将参数替换成对应参数
+                // 将参数替换成对应参数
                 if (data.state === 200 && data.variables.data.length > 0) {
-                    let h = this.$createElement,
-                        cont = data.variables.data
+                    const h = this.$createElement
+                    const cont = data.variables.data
                     for (let i = 0; i < cont.length; i++) {
                         window.setTimeout(() => {
                             this.infoMessage[i] = this.$notify.info({
@@ -264,7 +264,7 @@
                                     h('span', null, '任务内容: '),
                                     h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont[i].ding_shi_ren_wu_n),
                                     h('br'),
-                                    h('el-button',{
+                                    h('el-button', {
                                         attrs: {
                                             size: 'mini',
                                             plain: true
@@ -283,13 +283,13 @@
                 }
             })
         },
-        beforeDestroy() {
+        beforeDestroy () {
             for (let i = 0; i < this.infoMessage.length; i++) {
                 this.infoMessage[i].close()
             }
         },
         methods: {
-            cancelInfo(cronId, title, num, processData, taskId) {
+            cancelInfo (cronId, title, num, processData, taskId) {
                 /* 调用流程*/
                 if (taskId) {
                     this.$router.push({
@@ -301,13 +301,13 @@
                 }
                 this.infoMessage[num].close()
             },
-            downloadData() {
+            downloadData () {
                 window.location.href = BASE_API() + BUSINESS_BASE_URL() + '/sys/SysDataContext/downloadData'
             },
-            scrollToTop() {
+            scrollToTop () {
                 this.$refs.dashboardContainer.scrollToTop()
             },
-            initData() {
+            initData () {
                 this.initInterval = setInterval(() => {
                     if (this.$utils.isNotEmpty(this.systemAlias)) {
                         this.initLoading = true
@@ -344,10 +344,10 @@
             //    }
             //    }, 100)
             // },
-            getHeight(h) {
+            getHeight (h) {
                 return (h - 1) * (this.rowHeight + this.margin[1]) + this.margin[1]
             },
-            hasComponent(alias) {
+            hasComponent (alias) {
                 const name = 'ibps-desktop-' + alias
                 const components = getComponents()
                 if (components) {
@@ -356,7 +356,7 @@
                     return false
                 }
             },
-            resizedHandler(i, newH, newW, newHPx, newWPx) {
+            resizedHandler (i, newH, newW, newHPx, newWPx) {
                 if (!this.layout) return
                 this.layout.layout.find(n => {
                     if (i === n.i) {
@@ -365,10 +365,10 @@
                     }
                 })
             },
-            goMyLayout() {
+            goMyLayout () {
                 this.$router.push({ path: '/officeDesk/grzlsw/desktopMyLayout' })
             },
-            handleActionEvent(command, params, index) {
+            handleActionEvent (command, params, index) {
                 this.layoutIndex = index
                 this.alias = params.$alias
                 switch (command) {
@@ -396,31 +396,31 @@
             /**
              * 全屏展示切换
              */
-            handleFullscreen(id) {
+            handleFullscreen (id) {
                 this.dialogPreviewVisible = true
                 this.id = id
             },
             // 处理收缩/展开
-            handleCollapseExpansion(index, isCollapse) {
+            handleCollapseExpansion (index, isCollapse) {
                 this.layout[index].h = isCollapse ? 2 : this.defaultData[index].h
                 this.layout.push({ i: '0' })
                 const deleteIndex = this.layout.findIndex(item => item.i === '0')
                 this.layout.splice(deleteIndex, 1)
             },
 
-            handleApprove(id) {
+            handleApprove (id) {
                 this.ibpsNewsDialogVisible = true
                 this.newsEditId = id
             },
 
-            handleUnreadMessage(id) {
+            handleUnreadMessage (id) {
                 this.ibpsMessageDialogVisible = true
                 this.messageEditId = id
             },
-            fileErr(err, file, fileList) {
+            fileErr (err, file, fileList) {
                 this.$message.error('文件上传失败,请检查格式!')
             },
-            handleFlow(params) {
+            handleFlow (params) {
                 this.defId = params.defId || null
                 this.taskId = params.taskId || null
                 this.instanceId = params.instanceId || null
@@ -430,12 +430,12 @@
 
                 this.bpmnFormrenderDialogVisible = true
             },
-            handleFlowCallback() {
+            handleFlowCallback () {
                 this.$refs[this.alias] ? this.$refs[this.alias][0].refreshData() : null
             },
 
             //
-            initSystemUrl(url) {
+            initSystemUrl (url) {
                 if (url.startsWith('http')) {
                     this.systemUrlType = 'iframe'
                     this.$nextTick(() => {
@@ -452,7 +452,7 @@
                     this.systemUrlName = systemUrlName
                 }
             },
-            urlParse(str) {
+            urlParse (str) {
                 const obj = {}
                 if (str.indexOf('?') !== -1) {
                     const str1 = str.split('?')[1].split('&')
@@ -464,7 +464,7 @@
                 return obj
             },
             /* 文件类型*/
-            beforeUpload(file) {
+            beforeUpload (file) {
                 var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
                 const extension = testmsg === 'xls'
                 const extension2 = testmsg === 'xlsx'
@@ -478,7 +478,7 @@
                 return extension || extension2
             },
             /* 文件类型*/
-            ReportBeforeUpload(file) {
+            ReportBeforeUpload (file) {
                 var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
                 const extension = testmsg === 'rpx'
                 if (!extension) {
@@ -491,7 +491,7 @@
                 return extension
             },
 
-            handleSuccess(res, file, fileList) {
+            handleSuccess (res, file, fileList) {
                 if (res.state === 200) {
                     this.$message({
                         message: '上传数据成功!',
@@ -504,32 +504,13 @@
                     })
                 }
             },
-            // 获取所有检测流程的peocessKey,存储到store中
-            getTestingData() {
-                let testingList = this.$store.getters.testingList
-                if (testingList.length) {
-                    return
-                } else {
-                    // let sql = 'select xiang_mu_ming_ as name, liu_cheng_bian_ha as processKey from t_jcxmlcpzb'
-                    let sql = 'select distinct defkey_ as processKey from t_mjjcnlfw where length(defkey_) > 0'
-                    curdPost('sql', sql).then(res => {
-                        const { data } = res.variables
-                        const testingData = []
-                        data.forEach(item => testingData.push(item.processKey))
-                        this.$store.dispatch('ibps/param/setTestingList', testingData)
-                    }).catch(error => {
-                        this.$message.error('获取检测流程数据失败!')
-                        console.log(error)
-                    })
-                }
-            },
             // 获取所有用户id及姓名存储到store中
-            getUsersList() {
-                let usersList = this.$store.getters.usersList
+            getUsersList () {
+                const usersList = this.$store.getters.usersList
                 if (usersList.length) {
                     return
                 } else {
-                    let sql = 'select id_ as userId, name_ as userName, mobile_ as phone from ibps_party_employee'
+                    const sql = 'select id_ as userId, name_ as userName, mobile_ as phone from ibps_party_employee'
                     curdPost('sql', sql).then(res => {
                         const { data } = res.variables
                         this.$store.dispatch('ibps/param/setUsersList', data)