Przeglądaj źródła

点击流程控制台报错的排查并修改

lidie 2 lat temu
rodzic
commit
0aafa41ee7

+ 1 - 1
src/business/platform/data/data-template/template.vue

@@ -71,7 +71,7 @@
                       <span v-if="i !== 'id_'">{{ item.label }}</span>
                       <span v-if="i !== 'id_'">:</span>
                       <span
-                        v-if="item.fieldType !== 'selector' && i !== 'id_'"
+                        v-if="item && item.fieldType !== 'selector' && i !== 'id_'"
                         >{{ item.val }}</span
                       >
                       <span

+ 295 - 310
src/business/platform/form/components/hyperlink/index.vue

@@ -1,343 +1,328 @@
 <template>
-  <van-field
-    ref="input"
-    class="field-custom-type"
-    :label="label"
-    :name="name"
-    :border="border"
-    :disabled="disabled"
-    :readonly="readonly"
-    :required="required"
-    :clearable="clearable"
-    :clickable="clickable"
-    :is-link="isLink"
-    :error="error"
-    :error-message="errorMessage"
-
-    :arrow-direction="arrowDirection"
-    :label-class="labelClass"
-    :label-width="labelWidth"
-    :label-align="labelAlign"
-    :input-align="inputAlign"
-    :error-message-align="errorMessageAlign"
-    :autosize="autosize"
-    :left-icon="leftIcon"
-    :right-icon="rightIcon"
-    :icon-prefix="iconPrefix"
-    :rules="editable?rules:null"
-  >
+  <van-field ref="input" class="field-custom-type" :label="label" :name="name" :border="border" :disabled="disabled"
+    :readonly="readonly" :required="required" :clearable="clearable" :clickable="clickable" :is-link="isLink"
+    :error="error" :error-message="errorMessage" :arrow-direction="arrowDirection" :label-class="labelClass"
+    :label-width="labelWidth" :label-align="labelAlign" :input-align="inputAlign"
+    :error-message-align="errorMessageAlign" :autosize="autosize" :left-icon="leftIcon" :right-icon="rightIcon"
+    :icon-prefix="iconPrefix" :rules="editable?rules:null">
     <template #label>
-      {{ label }}<van-icon v-if="desc && descPosition==='lableIcon'" name="warning" class="ibps-dialog-icon" @click="$action.descDialog({ title:label, message:desc })" />
+      {{ label }}<van-icon v-if="desc && descPosition==='lableIcon'" name="warning" class="ibps-dialog-icon"
+        @click="$action.descDialog({ title:label, message:desc })" />
     </template>
     <template #input>
-      <ibps-link
-        v-if="showType === 'link'"
-        :underline="underline"
-        :icon="'ibps-icon'+icon"
-        :disabled="disabled"
-        :type="type"
-        @click="handleClick"
-      >{{ showText }}</ibps-link>
-      <van-button
-        v-else
-        :text="showText"
-        :icon="icon"
-        :icon-prefix="iconPrefix"
-        :disabled="disabled"
-        :type="type"
-        size="small"
-        @click="handleClick"
-      />
+      <ibps-link v-if="showType === 'link'" :underline="underline" :icon="'ibps-icon'+icon" :disabled="disabled"
+        :type="type" @click="click">{{ showText }}</ibps-link>
+      <van-button v-else :text="showText" :icon="icon" :icon-prefix="iconPrefix" :disabled="disabled" :type="type"
+        size="small" @click="click" />
       <!-- 弹窗模式 -->
-      <custom-dialog
-        ref="userDialog"
-        :visible="openDialog"
-        :components="customComponents"
-        @close="visible => openDialog = visible"
-      />
+      <custom-dialog ref="userDialog" :visible="openDialog" :components="customComponents"
+        @close="visible => openDialog = visible" />
     </template>
   </van-field>
 </template>
 <script>
-import { getScriptValue } from '@/api/platform/form/common.js'
-import request from '@/utils/request'
-import FieldMixin from '@/mixins/field'
-import IbpsLink from '@/components/ibps-link'
-import customDialog from './dialog'
+  import { getScriptValue } from '@/api/platform/form/common.js'
+  import request from '@/utils/request'
+  import FieldMixin from '@/mixins/field'
+  import IbpsLink from '@/components/ibps-link'
+  import customDialog from './dialog'
 
-export default {
-  name: 'ibps-hyperlink',
-  components: {
-    IbpsLink,
-    customDialog
-  },
-  mixins: [FieldMixin],
-  props: {
-    showType: { // 是按钮还是文本
-      type: String,
-      default: 'link',
-      validator: function(value) {
-        return ['link', 'button'].indexOf(value) !== -1
-      }
-    },
-    text: String,
-    iconPrefix: {
-      type: String,
-      default: 'ibps-icon'
+  export default {
+    name: 'ibps-hyperlink',
+    components: {
+      IbpsLink,
+      customDialog
     },
+    mixins: [FieldMixin],
+    props: {
+      showType: { // 是按钮还是文本
+        type: String,
+        default: 'link',
+        validator: function (value) {
+          return ['link', 'button'].indexOf(value) !== -1
+        }
+      },
+      text: String,
+      iconPrefix: {
+        type: String,
+        default: 'ibps-icon'
+      },
 
-    previewEntrance: {
-      type: Boolean,
-      default: false
-    },
-    formData: {
-      type: Object
-    },
-    textJavascript: {
-      type: String
-    },
-    linkType: { // 打开链接的类型
-      type: String,
-      default: 'fixed',
-      validator: function(value) { // fixed 固定值; dynamic groovy脚本; javascript js 脚本
-        return ['fixed', 'dynamic', 'javascript'].indexOf(value) !== -1
+      previewEntrance: {
+        type: Boolean,
+        default: false
+      },
+      formData: {
+        type: Object
+      },
+      textJavascript: {
+        type: String
+      },
+      linkType: { // 打开链接的类型
+        type: String,
+        default: 'fixed',
+        validator: function (value) { // fixed 固定值; dynamic groovy脚本; javascript js 脚本
+          return ['fixed', 'dynamic', 'javascript'].indexOf(value) !== -1
+        }
+      },
+      textType: { // 文本展示的类型
+        type: String,
+        default: 'fixed',
+        validator: function (value) { // fixed 固定值; dynamic groovy脚本; javascript js 脚本
+          return ['fixed', 'dynamic', 'javascript'].indexOf(value) !== -1
+        }
+      },
+      link: {
+        type: String
+      },
+      type: {
+        type: String,
+        default: 'default'
+      },
+      underline: {
+        type: Boolean,
+        default: false
+      },
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // href: {
+      //   type: String
+      // },
+      icon: {
+        type: String
+      },
+      isNewTab: { // 新开窗口还是弹框显示
+        type: Boolean,
+        default: true
+      },
+      beforeClick: { // 方法参数( linkData, text, cb) cb 是回调函数
+        type: Function
+      },
+      afterClick: {
+        type: Function
       }
     },
-    textType: { // 文本展示的类型
-      type: String,
-      default: 'fixed',
-      validator: function(value) { // fixed 固定值; dynamic groovy脚本; javascript js 脚本
-        return ['fixed', 'dynamic', 'javascript'].indexOf(value) !== -1
+    data() {
+      return {
+        linkData: '',
+        showText: this.text || '暂无数据',
+        openType: '',
+        openDialog: false,
+        show: true,
+        customComponents: {}
       }
     },
-    link: {
-      type: String
-    },
-    type: {
-      type: String,
-      default: 'default'
-    },
-    underline: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    },
-    // href: {
-    //   type: String
-    // },
-    icon: {
-      type: String
-    },
-    isNewTab: { // 新开窗口还是弹框显示
-      type: Boolean,
-      default: true
-    },
-    beforeClick: { // 方法参数( linkData, text, cb) cb 是回调函数
-      type: Function
-    },
-    afterClick: {
-      type: Function
-    }
-  },
-  data() {
-    return {
-      linkData: '',
-      showText: this.text || '暂无数据',
-      openType: '',
-      openDialog: false,
-      show: true,
-      customComponents: {}
-    }
-  },
-  watch: {
-    formData(val, oldVal) {
-      // 提供脚本监听属性。
-      console.info(val)
-    },
-    textType: {
-      handler: function(val) {
-        if (!this.previewEntrance) return
-        // this.showText = ''
-        this.setVal(val, 'text', this.textJavascript)
+    watch: {
+      formData(val, oldVal) {
+        // 提供脚本监听属性。
+        console.info(val)
       },
-      immediate: true
-    },
-    linkType: {
-      handler: function(val) {
-        if (!this.previewEntrance) return
-        this.setVal(val, 'link', this.link)
+      textType: {
+        handler: function (val) {
+          if (!this.previewEntrance) return
+          // this.showText = ''
+          this.setVal(val, 'text', this.textJavascript)
+        },
+        immediate: true
       },
-      immediate: true
-    }
-  },
-  methods: {
-    /**
-     * val 属性的值
-     * prop [link]
-     */
-    setVal(val, prop, script, motion) {
-      if (val === 'fixed') {
-        this.showText = this.text || ''
-      } else if (val === 'dynamic') {
-        this.runGroovy(prop, script)
-      } else if (val === 'javascript') {
-        this.runScript(prop, script, motion)
+      linkType: {
+        handler: function (val) {
+          if (!this.previewEntrance) return
+          this.setVal(val, 'link', this.link)
+        },
+        immediate: true
       }
     },
-    runScript(prop, scrip, motion) {
-      var formData = this.formData
-      const options = {
-        formData: formData,
-        request: request,
-        router: this.$router,
-        message: this.$notify,
-        link: this
-      }
-      if (this.$utils.isEmpty(scrip)) return
-      const promise = new window.Promise((resolve, reject) => {
-        new Function('options', 'resolve', scrip)(options, resolve)
-      })
-      promise.then(result => {
-        if (this.$utils.isEmpty(result)) {
-          this.showText = '暂无数据'
-          return
+    methods: {
+      /**
+       * val 属性的值
+       * prop [link]
+       */
+      setVal(val, prop, script, motion) {
+        if (val === 'fixed') {
+          this.showText = this.text || ''
+        } else if (val === 'dynamic') {
+          this.runGroovy(prop, script)
+        } else if (val === 'javascript') {
+          this.runScript(prop, script, motion)
         }
-        options.result = result
-        if (prop === 'text') {
-          this.showText = result || '暂无数据'
-        } else {
-          result.formData = formData
-          this.linkData = result || ''
-          if (result.constructor === Object && result.openType && this.showType === 'link' && motion === 'click') {
-            switch (result.openType) {
-              case 'dialog':
-                this.customComponents = result
-                this.openDialog = true
-                break
-              case 'url':
-                // this.$router.push({ name: 'iframe', meta: { defaultUrl: result.url }})
-                window.open(result.url)
-                break
-              case 'tab':
-                this.$router.push(result.url)
-                break
-              default:
-                break
-            }
-          } else if (this.showType === 'button') {
-            if (result.constructor === Array) {
-              const promise = new window.Promise((resolve, reject) => {
-                result.forEach(item => {
-                  if (item.event === 'beforeSubmit' && motion !== 'click') {
-                    new Function('options', 'resolve', item.logic)(options, resolve)
-                  } else if (item.event === 'afterSubmit' && motion === 'click') {
-                    new Function('options', 'resolve', item.logic)(options, resolve)
-                  }
+      },
+      runScript(prop, scrip, motion) {
+        var formData = this.formData
+        const options = {
+          formData: formData,
+          request: request,
+          router: this.$router,
+          message: this.$notify,
+          link: this,
+          // 本人
+          reportPath: this.$reportPath,
+          reportPaths: this.$reportPaths,
+        }
+        if (this.$utils.isEmpty(scrip)) return
+        const promise = new window.Promise((resolve, reject) => {
+          new Function('options', 'resolve', scrip)(options, resolve)
+        })
+        promise.then(result => {
+          // 本人
+          if (this.showType === 'link') {
+            this.iframeUrl = result[0].logic.split('url:"')[1].split('"')[0]
+            this.iframeShow = true
+            return
+          }
+
+          if (this.$utils.isEmpty(result)) {
+            this.showText = '暂无数据'
+            return
+          }
+          options.result = result
+          if (prop === 'text') {
+            this.showText = result || '暂无数据'
+          } else {
+            result.formData = formData
+            this.linkData = result || ''
+            if (result.constructor === Object && result.openType && this.showType === 'link' && motion === 'click') {
+              switch (result.openType) {
+                case 'dialog':
+                  this.customComponents = result
+                  this.openDialog = true
+                  break
+                case 'url':
+                  // this.$router.push({ name: 'iframe', meta: { defaultUrl: result.url }})
+                  window.open(result.url)
+                  break
+                case 'tab':
+                  this.$router.push(result.url)
+                  break
+                default:
+                  break
+              }
+            } else if (this.showType === 'button') {
+              if (result.constructor === Array) {
+                const promise = new window.Promise((resolve, reject) => {
+                  result.forEach(item => {
+                    if (item.event === 'beforeSubmit' && motion !== 'click') {
+                      new Function('options', 'resolve', item.logic)(options, resolve)
+                    } else if (item.event === 'afterSubmit' && motion === 'click') {
+                      new Function('options', 'resolve', item.logic)(options, resolve)
+                    }
+                  })
+                })
+                promise.then(res => {
+                  this.conditionalExecution(res.constructor === Object && res.openType, res, 'openType')
+                })
+              } else {
+                // this.$notify({
+                //   message: '请按规定脚本格式填写脚本',
+                //   type: 'warning'
+                // })
+                this.$message({
+                  message: '请按规定脚本格式填写脚本',
+                  type: 'warning'
                 })
-              })
-              promise.then(res => {
-                this.conditionalExecution(res.constructor === Object && res.openType, res, 'openType')
-              })
-            } else {
-              this.$notify({
-                message: '请按规定脚本格式填写脚本',
-                type: 'warning'
-              })
+              }
             }
           }
+        })
+      },
+      conditionalExecution(condition, res, key) {
+        if (condition) {
+          switch (res[key]) {
+            case 'dialog':
+              this.customComponents = res
+              this.openDialog = true
+              break
+            case 'url':
+              // this.$router.push({ name: 'iframe', meta: { defaultUrl: res.url }})
+              window.open(res.url)
+              break
+            case 'tab':
+              this.$router.push(res.url)
+              break
+            default:
+              break
+          }
         }
-      })
-    },
-    conditionalExecution(condition, res, key) {
-      if (condition) {
-        switch (res[key]) {
-          case 'dialog':
-            this.customComponents = res
-            this.openDialog = true
-            break
-          case 'url':
-            // this.$router.push({ name: 'iframe', meta: { defaultUrl: res.url }})
-            window.open(res.url)
-            break
-          case 'tab':
-            this.$router.push(res.url)
-            break
-          default:
-            break
-        }
-      }
-    },
-    // TODO: 待完善
-    runGroovy(prop, scrip) {
-      var formData = this.formData
-      const str = JSON.parse(JSON.stringify(scrip))
-      const arr = []
-      const vars = {}
-      for (var i in formData.models) {
-        if (str.indexOf(i) !== -1) {
-          arr.push(str.substring(str.indexOf(i), str.indexOf(i) + i.length))
-        }
-      }
-      arr.forEach(a => {
-        vars[a] = formData.models[a]
-      })
-      if (this.$utils.isNotEmpty(scrip)) {
-        getScriptValue({
-          script: scrip,
-          vars: JSON.stringify(vars) || ''
-        }).then(res => {
-          this[scrip + 'Data'] = res.content
-          if (prop === 'text') {
-            this.showText = res.data || '暂无数据'
+      },
+      // TODO: 待完善
+      runGroovy(prop, scrip) {
+        var formData = this.formData
+        const str = JSON.parse(JSON.stringify(scrip))
+        const arr = []
+        const vars = {}
+        for (var i in formData.models) {
+          if (str.indexOf(i) !== -1) {
+            arr.push(str.substring(str.indexOf(i), str.indexOf(i) + i.length))
           }
-          // this.$notify({
-          //   showClose: true,
-          //   message: '动态脚本执行成功!',
-          //   type: 'success'
-          // })
-        }).catch(err => {
-          console.log(err)
+        }
+        arr.forEach(a => {
+          vars[a] = formData.models[a]
         })
+        if (this.$utils.isNotEmpty(scrip)) {
+          getScriptValue({
+            script: scrip,
+            vars: JSON.stringify(vars) || ''
+          }).then(res => {
+            this[scrip + 'Data'] = res.content
+            if (prop === 'text') {
+              this.showText = res.data || '暂无数据'
+            }
+            // this.$notify({
+            //   showClose: true,
+            //   message: '动态脚本执行成功!',
+            //   type: 'success'
+            // })
+            this.$message({
+              showClose: true,
+              message: '动态脚本执行成功!',
+              type: 'success'
+            })
+          }).catch(err => {
+            console.log(err)
+          })
+        }
+      },
+      click() {
+        this.setVal(this.linkType, 'link', this.link, 'click')
       }
-    },
-    handleClick() {
-      this.setVal(this.linkType, 'link', this.link, 'click')
+      // handleClick(e) {
+      //   this.$emit('click', e)
+      // }
     }
-    // handleClick(e) {
-    //   this.$emit('click', e)
-    // }
   }
-}
 </script>
 <style lang="scss">
-.field-custom-type{
-  .van-button--info{
-    color: #FFF;
-    background-color: #909399;
-    border-color: #909399;
-  }
-  .van-button--success{
-    color: #FFF;
-    background-color: #67C23A;
-    border-color: #67C23A;
-  }
-  .van-button--warning {
-    color: #FFF;
-    background-color: #E6A23C;
-    border-color: #E6A23C;
-  }
-  .van-button--danger {
-    color: #FFF;
-    background-color: #F56C6C;
-    border-color: #F56C6C;
-  }
-  .van-button--primary{
-    color: #FFF;
-    background-color: #409EFF;
-    border-color: #409EFF;
+  .field-custom-type {
+    .van-button--info {
+      color: #FFF;
+      background-color: #909399;
+      border-color: #909399;
+    }
+
+    .van-button--success {
+      color: #FFF;
+      background-color: #67C23A;
+      border-color: #67C23A;
+    }
+
+    .van-button--warning {
+      color: #FFF;
+      background-color: #E6A23C;
+      border-color: #E6A23C;
+    }
+
+    .van-button--danger {
+      color: #FFF;
+      background-color: #F56C6C;
+      border-color: #F56C6C;
+    }
+
+    .van-button--primary {
+      color: #FFF;
+      background-color: #409EFF;
+      border-color: #409EFF;
+    }
   }
-}
-</style>
+</style>

+ 99 - 82
src/business/platform/form/dynamic-form/form.vue

@@ -1,46 +1,38 @@
 <template>
-  <van-form
-    ref="form"
-    :colon="colon"
-    :label-width="labelWidth"
-    :label-align="labelPosition"
-    :input-align="inputAlign"
-  >
+  <van-form ref="form" :colon="colon" :label-width="labelWidth" :label-align="labelPosition" :input-align="inputAlign">
     <template v-for="(field, index) in formDef.fields">
       <!--栅格布局-->
       <ibps-dynamic-form-grid
-        v-if="
+v-if="
           field.field_type === 'grid' ||
             field.field_type === 'tabs' ||
             field.field_type === 'steps' ||
             field.field_type === 'collapse'
         "
-        :key="field.name + index"
-        ref="formItem"
-        :models.sync="models"
-        :rights.sync="rights"
-        :field="field"
+:key="field.name + index"
+ref="formItem"
+:models.sync="models"
+:rights.sync="rights"
+:field="field"
         :code="code"
-        :form-opinion="responseFormOpinionData[field.name]"
-        :desc-position="formDef.attrs.descPosition"
+:form-opinion="responseFormOpinionData[field.name]"
+:desc-position="formDef.attrs.descPosition"
         :params="formParams"
-        :readonly-rights="readonlyRights"
-        @change-form-opinion="handleFormOpinion"
-      />
+:readonly-rights="readonlyRights"
+@change-form-opinion="handleFormOpinion" />
       <ibps-dynamic-form-item
-        v-else
-        ref="formItem"
-        :key="field.name + index"
-        :models.sync="models"
+v-else
+ref="formItem"
+:key="field.name + index"
+:models.sync="models"
         :rights.sync="rights"
-        :field="field"
-        :code="code"
-        :form-opinion="responseFormOpinionData[field.name]"
+:field="field"
+:code="code"
+:form-opinion="responseFormOpinionData[field.name]"
         :desc-position="formDef.attrs.descPosition"
-        :params="formParams"
-        :readonly-rights="readonlyRights"
-        @change-form-opinion="handleFormOpinion"
-      />
+:params="formParams"
+:readonly-rights="readonlyRights"
+        @change-form-opinion="handleFormOpinion" />
     </template>
   </van-form>
 </template>
@@ -113,7 +105,7 @@ export default {
     labelWidth() {
       if (
         this.$utils.isNotEmpty(this.formAttrs.labelWidth) &&
-        this.$utils.isNotEmpty(this.formAttrs.labelWidthUnit)
+          this.$utils.isNotEmpty(this.formAttrs.labelWidthUnit)
       ) {
         return this.formAttrs.labelWidth + this.formAttrs.labelWidthUnit
       } else {
@@ -181,8 +173,8 @@ export default {
         // 延迟验证
         this.$nextTick(() => {
           this.getFormValidator()
-            .then(() => {})
-            .catch(() => {})
+            .then(() => { })
+            .catch(() => { })
         })
       },
       deep: true,
@@ -199,15 +191,15 @@ export default {
     this.$nextTick(() => {
       if (this.validateImmediately) {
         this.getFormValidator()
-          .then(() => {})
-          .catch(() => {})
+          .then(() => { })
+          .catch(() => { })
       }
     })
   },
   methods: {
     /**
-     * 初始化字段
-     */
+       * 初始化字段
+       */
     async initResponseFields() {
       const fields = this.formDef.fields
       if (!fields) {
@@ -220,8 +212,8 @@ export default {
       await this.initResponseOpinionData()
     },
     /**
-     * 生成modles
-     */
+       * 生成modles
+       */
     async generateModles(fields) {
       for (let i = 0; i < fields.length; i++) {
         const field = fields[i]
@@ -233,7 +225,7 @@ export default {
           // 嵌套布局
           if (
             this.$utils.isNotEmpty(fieldOptions) &&
-            this.$utils.isNotEmpty(fieldOptions.columns)
+              this.$utils.isNotEmpty(fieldOptions.columns)
           ) {
             // 循环遍历所有字段
             fieldOptions.columns.forEach(item => {
@@ -281,18 +273,29 @@ export default {
               const data = this.value[fieldName]
               if (this.$utils.isEmpty(data)) {
                 if (defaultValueEmpty) {
-                  this.models[fieldName] = await FormUtils.getFieldDefaultValue(
-                    field
-                  )
+                  // this.models[fieldName] = await FormUtils.getFieldDefaultValue(
+                  //   field
+                  // )
+                  const defaultValue = await FormUtils.getFieldDefaultValue(field)
+                  this.models[fieldName] = defaultValue
                 }
               } else {
                 this.models[fieldName] = await this.getInitData(field, data)
               }
             } else {
               // 默认值
-              this.models[fieldName] = await FormUtils.getFieldDefaultValue(
-                field
-              )
+              // this.models[fieldName] = await FormUtils.getFieldDefaultValue(
+              //   field
+              // )
+              this.models[fieldName] = await FormUtils.getFieldDefaultValue(field)
+              if (this.dynamicParams && this.dynamicParams[field.field_name]) {
+                this.models[fieldName] = this.dynamicParams[field.field_name]
+              }
+            }
+          } else {
+            // 自定义组件单独处理
+            if (fieldType === 'component') {
+              this.models[fieldName] = this.value[fieldName]
             }
           }
           // 初始化表单扩展参数
@@ -313,8 +316,8 @@ export default {
       return data
     },
     /**
-     *  初始化表单扩展参数
-     */
+       *  初始化表单扩展参数
+       */
     initFormFieldParameter(field) {
       // ====== 初始化表单权限
       this.initFormRights(field)
@@ -325,17 +328,17 @@ export default {
     },
     initFormApprovalOpinionRights(field) {
       this.rights[field.name] =
-        FormUtils.getDefaultApprovalOpinionRigths(field, this.params) ||
-        this.getPermissions(this.permissions, field) ||
-        FormUtils.getDefaultRigths(field)
+          FormUtils.getDefaultApprovalOpinionRigths(field, this.params) ||
+          this.getPermissions(this.permissions, field) ||
+          FormUtils.getDefaultRigths(field)
     },
     /**
-     *  初始化表单权限
-     */
+       *  初始化表单权限
+       */
     initFormRights(field) {
       this.rights[field.name] =
-        this.getPermissions(this.permissions, field) ||
-        FormUtils.getDefaultRigths(field)
+          this.getPermissions(this.permissions, field) ||
+          FormUtils.getDefaultRigths(field)
     },
     // 获取权限
     getPermissions(permissions, field) {
@@ -372,9 +375,9 @@ export default {
           rightsValue = FormUtils.getDefaultRigths(field)
         }
         rightsValue =
-          rightsValue !== FormOptions.t.PERMISSIONS.HIDE
-            ? FormOptions.t.PERMISSIONS.READ
-            : rightsValue
+            rightsValue !== FormOptions.t.PERMISSIONS.HIDE
+              ? FormOptions.t.PERMISSIONS.READ
+              : rightsValue
       }
       return rightsValue
     },
@@ -439,8 +442,8 @@ export default {
       this.opinionData = data
     },
     /**
-     * 表单提交校验
-     */
+       * 表单提交校验
+       */
     formSubmitVerify(callback) {
       let flag = true
       const verifys = this.formAttrs ? this.formAttrs.verifys : []
@@ -467,15 +470,15 @@ export default {
       callback(flag)
     },
     /**
-     * 获取表单数据
-     */
+       * 获取表单数据
+       */
     getFormData() {
       const data = {}
       // 去除文本字段,表单意见字段
       for (var key in this.models) {
         if (
           !this.responseOpinionFields[key] &&
-          !this.responseLabelFields[key]
+            !this.responseLabelFields[key]
         ) {
           data[key] = this.models[key]
         }
@@ -483,33 +486,47 @@ export default {
       return data
     },
     /**
-     * 设置表单字段数据
-     */
+       * 设置表单字段数据
+       */
     setFieldData(name, value) {
       this.models[name] = value
     },
     /**
-     * 设置表单权限
-     */
+           * 设置表单权限
+           */
+    getFormRights(name) {
+      return this.rights[name]
+    },
+    /**
+       * 设置表单权限
+       */
     setFormRights(name, value) {
       this.rights[name] = value
     },
+    // 表单关联
+    getTableList(list) {
+      this.titleList = list
+    },
+    // 将对象参数传入, 进行渲染
+    getStatisOrRecord(type) {
+      this.record = type
+    },
     /**
-     *  是否有审批意见字段
-     */
+       *  是否有审批意见字段
+       */
     hasFormOpinion() {
       return this.$utils.isNotEmpty(this.responseOpinionFields)
     },
     /**
-     * 获取审批意见数据
-     */
+       * 获取审批意见数据
+       */
     getFormOpinionData() {
       const data = {}
       for (var key in this.models) {
         if (
           this.responseOpinionFields[key] &&
-          (this.$utils.isEmpty(this.rights[key]) ||
-            this.rights[key] ===
+            (this.$utils.isEmpty(this.rights[key]) ||
+              this.rights[key] ===
               (FormOptions.t.PERMISSIONS.EDIT ||
                 FormOptions.t.PERMISSIONS.REQUIRED))
         ) {
@@ -519,8 +536,8 @@ export default {
       return data
     },
     /**
-     * 获取审批意见验证
-     */
+       * 获取审批意见验证
+       */
     formOpinionValidate(callback, flag = false) {
       if (this.$utils.isEmpty(this.responseOpinionFields)) {
         callback(true)
@@ -531,9 +548,9 @@ export default {
         for (const key in this.responseOpinionFields) {
           if (
             this.$utils.isEmpty(this.models[key]) &&
-            (this.$utils.isEmpty(this.rights[key]) ||
-              this.rights[key] === FormOptions.t.PERMISSIONS.EDIT ||
-              this.rights[key] === FormOptions.t.PERMISSIONS.REQUIRED)
+              (this.$utils.isEmpty(this.rights[key]) ||
+                this.rights[key] === FormOptions.t.PERMISSIONS.EDIT ||
+                this.rights[key] === FormOptions.t.PERMISSIONS.REQUIRED)
           ) {
             i++
           }
@@ -542,7 +559,7 @@ export default {
         for (const key in this.responseOpinionFields) {
           if (
             this.$utils.isEmpty(this.models[key]) &&
-            this.rights[key] === FormOptions.t.PERMISSIONS.REQUIRED
+              this.rights[key] === FormOptions.t.PERMISSIONS.REQUIRED
           ) {
             i++
           }
@@ -556,15 +573,15 @@ export default {
       }
     },
     /**
-     * 表单验证
-     */
+       * 表单验证
+       */
     getFormValidator() {
       this.$refs.form.resetValidation()
       return this.$refs.form.validate()
     },
     /**
-     * 表单验证错误信息
-     */
+       * 表单验证错误信息
+       */
     scrollToField(name) {
       return this.$refs.form.scrollToField(name)
     }

+ 70 - 47
src/business/platform/form/formrender/formrender.vue

@@ -12,27 +12,25 @@
     <!-- fr-header  表单内容-->
     <div :style="bodyStyle" class="van-fr-body">
       <ibps-dynamic-form
-        ref="dynamicForm"
-        v-model="formData"
-        :form-def="formDefData"
-        :permissions="permissions"
+ref="dynamicForm"
+v-model="formData"
+:form-def="formDefData"
+:permissions="permissions"
         :readonly="readonly"
-        :params="params"
-        :input-align="inputAlign"
-        :initialization="initialization"
+:params="params"
+:input-align="inputAlign"
+:initialization="initialization"
         :cur-active-step.sync="curActiveStep"
-        @load-script="loadScript"
-      />
+@load-script="loadScript" />
     </div>
     <!-- fr-toolbar  表单操作按钮-->
     <slot name="fr-toolbar">
       <ibps-toolbar
-        v-if="hasActions"
-        ref="frToolbar"
-        :actions="actions"
-        :more-actions="moreActions"
-        icon-prefix="ibps-icon"
-      />
+v-if="hasActions"
+ref="frToolbar"
+:actions="actions"
+:more-actions="moreActions"
+        icon-prefix="ibps-icon" />
     </slot>
     <slot ref="frExt" name="fr-ext" />
   </div>
@@ -43,7 +41,6 @@ import ActionUtils from '@/utils/action'
 import JForm from '../utils/JForm' // 自定义脚本
 import '../dynamic-form' // 动态表单
 import IbpsToolbar from '@/components/ibps-toolbar' // 工具栏
-
 const JFormId = 'JForm'
 
 export default {
@@ -59,26 +56,26 @@ export default {
       type: Object
     },
     /**
-     * @description 工具栏
-     */
+       * @description 工具栏
+       */
     buttons: {
       type: Array
     },
     /**
-     * 是否只读 (流程实例时候控制)
-     */
+       * 是否只读 (流程实例时候控制)
+       */
     readonly: {
       type: Boolean,
       default: false
     },
     /**
-     *  @description 扩展参数 比如流程id等
-     *流程相关信息:
-     * taskId:任务id
-     * instId:流程实例
-     * defId:定义Id
-     * formOpinionData: 流程意见配置及已经审批的意见数据
-     */
+       *  @description 扩展参数 比如流程id等
+       *流程相关信息:
+       * taskId:任务id
+       * instId:流程实例
+       * defId:定义Id
+       * formOpinionData: 流程意见配置及已经审批的意见数据
+       */
     params: {
       type: Object
     },
@@ -366,8 +363,8 @@ export default {
       return this.getForm().getFormValidator()
     },
     /**
-     * 获取表单验证
-     */
+       * 获取表单验证
+       */
     validate(callback) {
       this.getFormValidator()
         .then(() => {
@@ -404,33 +401,33 @@ export default {
     },
 
     /**
-     * 获取表单数据
-     */
+       * 获取表单数据
+       */
     getFormData() {
       return this.getForm().getFormData()
     },
     /**
-     * 获取字段数据
-     */
+       * 获取字段数据
+       */
     getData(name) {
       const data = this.getFormData()
       return data[name]
     },
     /**
-     * 设置字段数据
-     */
+       * 设置字段数据
+       */
     setData(name, value) {
       return this.getForm().setFieldData(name, value)
     },
     /**
-     * 设置表单权限
-     */
+       * 设置表单权限
+       */
     getFormRights(name) {
       return this.getForm().getFormRights(name)
     },
     /**
-     * 设置表单权限
-     */
+       * 设置表单权限
+       */
     setFormRights(name, value) {
       return this.getForm().setFormRights(name, value)
     },
@@ -438,20 +435,46 @@ export default {
       return this.getForm().hasFormOpinion()
     },
     /**
-     * 表单意见数据
-     */
+       * 表单意见数据
+       */
     getFormOpinionData() {
       return this.getForm().getFormOpinionData()
     },
     /**
-     * 获取审批意见验证
-     */
+       * 获取审批意见验证
+       */
     formOpinionValidate(calback, flag) {
       this.getForm().formOpinionValidate(calback, flag)
     },
+
+    /**
+           * 获取表单字段组件实例
+           */
+    getRefs(fieldName) {
+      return this.getForm().getRefs(fieldName)
+    },
+    /**
+       * 获取表单字段的具体控件组件实例
+       */
+    getRefsField(fieldName) {
+      return this.getForm().getRefsField(fieldName)
+    },
+    /* 给与表头赋值关联对话框及数据*/
+    getTableList(list) {
+      return this.getForm().getTableList(list)
+    },
+    /* 获取统计页面或记录页面*/
+    getStatisOrRecord(type) {
+      return this.getForm().getStatisOrRecord(type)
+    },
+    /* 表头点击事件*/
+    clickTableHeand(a) {
+      return this.getForm().clickTableHeand(a)
+    },
+
     /**
-     * 初始化脚本
-     */
+       * 初始化脚本
+       */
     initJForm() {
       let script = document.getElementById(JFormId)
       if (script) {
@@ -459,10 +482,10 @@ export default {
       }
       if (
         this.formDef.attrs &&
-        (this.formDef.attrs.mobile_script || this.formDef.attrs.script)
+          (this.formDef.attrs.mobile_script || this.formDef.attrs.script)
       ) {
         const codeScript =
-          this.formDef.attrs.mobile_script || this.formDef.attrs.script
+            this.formDef.attrs.mobile_script || this.formDef.attrs.script
         script = document.createElement('script')
         script.type = 'text/javascript'
         script.id = JFormId

+ 50 - 34
src/business/platform/form/utils/JForm.js

@@ -8,76 +8,89 @@
  * 版权:广州流辰信息技术有限公司
  * </pre>
  */
-import _ from "lodash";
-import request from "@/utils/request";
+import _ from 'lodash'
+import Vue from 'vue'
+import request from '@/utils/request'
 import common from '@/utils/common'
-
+import store from '@/store'
+const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
+import router from '@/router'
 // 定义全局
-var JForm;
+var JForm
 if (!window.JForm) {
-  JForm = window.JForm = {};
+  JForm = window.JForm = {}
 } else {
-  JForm = window.JForm;
+  JForm = window.JForm
 }
 /**
  * 封装自定义代码扩展接口
  */
 _.extend(JForm, {
   // 已经初始化
-  _request: request,
+  // _request: request,
   _isInitialization: false,
   _isLoadJavaScriptFile: false,
   // 初始化表单
   _init: function(form) {
-    if (this._isInitialization) return;
-    this.$form = form;
-    this.$request = request;
-    this._isInitialization = true;
+    if (this._isInitialization) return
+    this.$form = form
+    this.$vue = Vue
+    this.$request = request
     this.$common = common
+    this.$router = router
+    this.$store = store
+    this.$import = _import
+    this._ = _
+    this._isInitialization = true
+    this.$loading = Vue.prototype.$loading
   },
 
   // 表单加载
   _onLoad: function(form) {
-    this._init(form);
+    this._init(form)
     if (_.isFunction(this.onLoad)) {
-      this.onLoad(form);
+      this.onLoad(form)
     }
   },
 
   // 加载按钮
-  _onLoadActions: function(form, actions) {
+  _onLoadActions: function(form, actions, button, type) {
     if (_.isFunction(this.onLoadActions)) {
-      this.onLoadActions(form, actions);
+      this.onLoadActions(form, actions, button, type)
     }
   },
 
   // 表单校验
   _onValidate: function(form, callback) {
     if (_.isFunction(this.onValidate)) {
-      return this.onValidate(form, callback);
+      return this.onValidate(form, callback)
     }
     if (_.isFunction(callback)) {
-      callback(true);
+      callback(true)
     }
   },
 
   // 按钮提交前事件
   _beforeSubmit: function(form, action, postValue, callback) {
     if (_.isFunction(this.beforeSubmit)) {
-      return this.beforeSubmit(form, action, postValue, callback);
+      try {
+        return this.beforeSubmit(form, action, postValue, callback)
+      } catch (e) {
+        return callback(true)
+      }
     }
     if (_.isFunction(callback)) {
-      callback(true);
+      callback(true)
     }
   },
 
   // 按钮提交后事件
   _afterSubmit: function(form, action, postValue, callback) {
     if (_.isFunction(this.afterSubmit)) {
-      return this.afterSubmit(form, action, postValue, callback);
+      return this.afterSubmit(form, action, postValue, callback)
     }
     if (_.isFunction(callback)) {
-      callback(true);
+      callback(true)
     }
   },
   // 子表按钮的提交前事件
@@ -89,36 +102,39 @@ _.extend(JForm, {
         position,
         params,
         callback
-      );
+      )
     }
     if (_.isFunction(callback)) {
-      callback(true);
+      callback(true)
     }
   },
   // 子表按钮的提交后事件
   _afterSubButton: function(tableForm, action, position, params, callback) {
     if (_.isFunction(this.afterSubButton)) {
-      return this.afterSubButton(tableForm, action, position, params, callback);
+      return this.afterSubButton(tableForm, action, position, params, callback)
     }
     if (_.isFunction(callback)) {
-      callback(true);
+      callback(true)
     }
   },
   // 子表统计
   _summaryMethod: function(tableForm, tableName, params) {
     if (_.isFunction(this.summaryMethod)) {
-      return this.summaryMethod(tableForm, tableName, params);
+      return this.summaryMethod(tableForm, tableName, params)
     }
   },
   // 清理所有自定义事件
   cleanEvents: function() {
-    this.onLoad = null;
-    this.onLoadActions = null;
-    this.onValidate = null;
-    this.afterSubButton = null;
-    this.beforeSubButton = null;
-    this._isInitialization = false;
+    this.onLoad = null
+    this.onLoadActions = null
+    this.onValidate = null
+    this.afterSubButton = null
+    this.beforeSubButton = null
+    this.summaryMethod = null
+    this.afterSubmit = null
+    this.beforeSubmit = null
+    this._isInitialization = false
   }
-});
+})
 
-export default JForm;
+export default JForm

+ 471 - 566
src/business/platform/org/selector/employee.vue

@@ -1,29 +1,14 @@
 <template>
   <div>
-    <van-popup
-      v-model="showSelectorPopup"
-      class="ibps-fullscreen-popup"
-      position="bottom"
-      get-container="body"
-      @opened="openedDialog"
-    >
+    <van-popup v-model="showSelectorPopup" class="ibps-fullscreen-popup" position="bottom" get-container="body"
+      @opened="openedDialog">
       <template v-if="initPage">
         <van-sticky>
           <!-- 头部 -->
-          <ibps-picker-toolbar
-            :title="title"
-            @cancel="onCancel"
-            @title="onTitle"
-            @confirm="onConfirm"
-          />
+          <ibps-picker-toolbar :title="title" @cancel="onCancel" @title="onTitle" @confirm="onConfirm" />
           <!-- 搜索框 -->
-          <van-search
-            v-model="search"
-            :disabled="currentOrgIdValue===''?false:$store.getters.isSuper?false:!isUseScope"
-            :placeholder="searchPlaceholder"
-            show-action
-            @search="onSearch"
-          >
+          <van-search v-model="search" :disabled="currentOrgIdValue===''?false:$store.getters.isSuper?false:!isUseScope"
+            :placeholder="searchPlaceholder" show-action @search="onSearch">
             <template #left>
               <van-icon name="bars" class="ibps-pr-5" @click="clickTree" />
             </template>
@@ -35,22 +20,11 @@
 
         <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
           <van-list v-model="loading" :finished="finished" @load="loadData">
-            <van-checkbox-group
-              ref="checkboxGroup"
-              v-model="checkbox"
-              :max="multiple?0:1"
-            >
-              <van-cell
-                v-for="(data,index) in listData"
-                :key="data[valueKey]+index"
-                clickable
-                @click="toggle(data,index)"
-              >
+            <van-checkbox-group ref="checkboxGroup" v-model="checkbox" :max="multiple?0:1">
+              <van-cell v-for="(data,index) in listData" :key="data[valueKey]+index" clickable
+                @click="toggle(data,index)">
                 <template #icon>
-                  <van-checkbox
-                    ref="checkboxes"
-                    :name="data[valueKey]"
-                  >
+                  <van-checkbox ref="checkboxes" :name="data[valueKey]">
                     <template v-if="!multiple" #icon="props">
                       <div v-if="props.checked" class="ibps-radio-icon">
                         <div class="ibps-radio-icon_inside" />
@@ -60,605 +34,536 @@
                   </van-checkbox>
                 </template>
                 <template slot="title">
-                  <van-cell
-                    :title="data[labelKey]"
-                    :label="data.account"
-                    clickable
-                    style="padding: 10px 5px;"
-                    class="ibps-flex-c"
-                  >
+                  <van-cell :title="data[labelKey]" :label="data.account" clickable style="padding: 10px 5px;"
+                    class="ibps-flex-c">
                     <template #icon>
-                      <ibps-avatar
-                        :thumb="getPhoto(data['photo'])"
-                        :thumb-error="errorImage"
-                        :text="data[labelKey]"
-                        bg-color="#38f"
-                        width="44"
-                        height="44"
-                        radius="4"
-                        class="ibps-mr-10"
-                      />
+                      <ibps-avatar :thumb="getPhoto(data['photo'])" :thumb-error="errorImage" :text="data[labelKey]"
+                        bg-color="#38f" width="44" height="44" radius="4" class="ibps-mr-10" />
                     </template>
                   </van-cell>
                 </template>
               </van-cell>
             </van-checkbox-group>
           </van-list>
-          <ibps-list-result-page
-            :result-type="resultType"
-            :error-type="errorType"
-            :result-message="resultMessage"
-          />
+          <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
         </van-pull-refresh>
       </template>
     </van-popup>
 
     <!--点击明细 -->
-    <van-popup
-      v-if="multiple"
-      v-model="showDetailPopup"
-      class="ibps-fullscreen-popup"
-      position="right"
-      get-container="body"
-    >
-      <ibps-picker-toolbar
-        title="已选择的选项"
-        @cancel="onDetailCancel"
-        @confirm="onDetailConfirm"
-      />
+    <van-popup v-if="multiple" v-model="showDetailPopup" class="ibps-fullscreen-popup" position="right"
+      get-container="body">
+      <ibps-picker-toolbar title="已选择的选项" @cancel="onDetailCancel" @confirm="onDetailConfirm" />
       <div class="ibps-fixed-navbar">
         <van-cell-group>
-          <van-swipe-cell
-            v-for="(data,index) in selectedData"
-            :key="data[valueKey]+index"
-            :right-width="65"
-            class="ibps-swipe-cell"
-          >
-            <van-cell
-              clickable
-            >
+          <van-swipe-cell v-for="(data,index) in selectedData" :key="data[valueKey]+index" :right-width="65"
+            class="ibps-swipe-cell">
+            <van-cell clickable>
               <template slot="title">
-                <van-cell
-                  :title="data[labelKey]"
-                  :label="data.account"
-                  clickable
-                  style="padding: 10px 5px;"
-                >
+                <van-cell :title="data[labelKey]" :label="data.account" clickable style="padding: 10px 5px;">
                   <template slot="icon">
-                    <ibps-avatar
-                      :thumb="getPhoto(data['photo'])"
-                      :thumb-error="errorImage"
-                      :text="data[labelKey]"
-                      bg-color="#38f"
-                      round
-                      class="ibps-mr-10"
-                    />
+                    <ibps-avatar :thumb="getPhoto(data['photo'])" :thumb-error="errorImage" :text="data[labelKey]"
+                      bg-color="#38f" round class="ibps-mr-10" />
                   </template>
                 </van-cell>
               </template>
               <template #right-icon>
-                <van-icon
-                  name="clear"
-                  class="van-field__clear ibps-pt-15"
-                  @click.stop="removeSelected(index)"
-                />
+                <van-icon name="clear" class="van-field__clear ibps-pt-15" @click.stop="removeSelected(index)" />
               </template>
             </van-cell>
-            <van-button
-              slot="right"
-              type="danger"
-              :text="$t('delete')"
-              class="ibps-swipe-button"
-              @click="removeSelected(index)"
-            />
+            <van-button slot="right" type="danger" :text="$t('delete')" class="ibps-swipe-button"
+              @click="removeSelected(index)" />
           </van-swipe-cell>
         </van-cell-group>
       </div>
     </van-popup>
     <!--高级查询-->
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="visible => moreSearchPopup = visible"
-      @reset-form="resetForm"
-    />
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="visible => moreSearchPopup = visible" @reset-form="resetForm" />
     <!--左树-->
-    <tree-popup
-      ref="elTree"
-      :visible="treeVisible"
-      :range.sync="partyType"
-      :script="script"
-      :is-use-scope="isUseScope"
-      :party-type-id="partyTypeId"
-      :party-type-scope="partyTypeScope"
-      :custom-party-type-options="currentFilterOption"
-      :current-org-id="currentOrgId"
-
-      @close="visible => treeVisible = visible"
-      @node-click="handleNodeClck"
-      @change-party-type="changePartyType"
-    />
+    <tree-popup ref="elTree" :visible="treeVisible" :range.sync="partyType" :script="script" :is-use-scope="isUseScope"
+      :party-type-id="partyTypeId" :party-type-scope="partyTypeScope" :custom-party-type-options="currentFilterOption"
+      :current-org-id="currentOrgId" @close="visible => treeVisible = visible" @node-click="handleNodeClck"
+      @change-party-type="changePartyType" />
   </div>
 </template>
 <script>
-import { query } from '@/api/platform/org/user'
-import { queryWoutOrg, queryPageList, queryWithOrg4Position } from '@/api/platform/org/employee'
-import { get as getUserById } from '@/api/platform/org/employee'
-import panelTree from './popup-tree/mixins/otherTreeEven'
-// import { getScriptValue as getTreeDataByScriptValue } from '@/api/platform/form/common'
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n' // Internationalization 国际化
-import { genderOptions } from './constants'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import TreePopup from './popup-tree/index.vue'
-import IbpsPickerToolbar from '@/components/ibps-picker-toolbar'
+  import { query } from '@/api/platform/org/user'
+  import { queryWoutOrg, queryPageList, queryWithOrg4Position } from '@/api/platform/org/employee'
+  import { get as getUserById } from '@/api/platform/org/employee'
+  import panelTree from './popup-tree/mixins/otherTreeEven'
+  // import { getScriptValue as getTreeDataByScriptValue } from '@/api/platform/form/common'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n' // Internationalization 国际化
+  import { genderOptions } from './constants'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import TreePopup from './popup-tree/index.vue'
+  import IbpsPickerToolbar from '@/components/ibps-picker-toolbar'
 
-export default {
-  components: {
-    IbpsPickerToolbar,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsMoreSearch,
-    TreePopup
-  },
-  mixins: [panelTree],
-  props: {
-    showPopup: Boolean,
-    multiple: Boolean,
-    value: {
-      type: [String, Array]
-    },
-    leftText: {
-      type: String,
-      default: i18n.t('cancel')
-    },
-    searchPlaceholder: {
-      type: String,
-      default: i18n.t('common.input')
-    },
-    valueKey: {
-      type: String,
-      default: 'id'
-    },
-    labelKey: {
-      type: String,
-      default: 'name'
-    },
-    idKey: {
-      type: String,
-      default: 'id'
-    },
-    parentIdKey: {
-      type: String,
-      default: 'parentId'
-    },
-    childrenKey: {
-      type: String,
-      default: 'children'
-    },
-    filter: [Object, Array],
+  export default {
+    components: {
+      IbpsPickerToolbar,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsMoreSearch,
+      TreePopup
+    },
+    mixins: [panelTree],
+    props: {
+      showPopup: Boolean,
+      multiple: Boolean,
+      value: {
+        type: [String, Array]
+      },
+      leftText: {
+        type: String,
+        default: i18n.t('cancel')
+      },
+      searchPlaceholder: {
+        type: String,
+        default: i18n.t('common.input')
+      },
+      valueKey: {
+        type: String,
+        default: 'id'
+      },
+      labelKey: {
+        type: String,
+        default: 'name'
+      },
+      idKey: {
+        type: String,
+        default: 'id'
+      },
+      parentIdKey: {
+        type: String,
+        default: 'parentId'
+      },
+      childrenKey: {
+        type: String,
+        default: 'children'
+      },
+      filter: [Object, Array],
 
-    isUseScope: { // 是否启用范围
-      type: Boolean,
-      default: false
-    },
-    seetingSearchPartyType: String, // 设置查询用户类型
-    partyTypeScope: String,
-    script: String,
-    partyTypeId: [String, Number],
-    currentOrgId: [String, Number],
-    customPartyTypeOptions: {
-      type: [Object, Array],
-      default: () => {}
-    }
+      isUseScope: { // 是否启用范围
+        type: Boolean,
+        default: false
+      },
+      seetingSearchPartyType: String, // 设置查询用户类型
+      partyTypeScope: String,
+      script: String,
+      partyTypeId: [String, Number],
+      currentOrgId: [String, Number, Array],
+      customPartyTypeOptions: {
+        type: [Object, Array],
+        default: () => { }
+      }
 
-  },
-  data() {
-    const { first = '', second = '' } = this.$store.getters.level
-    const { isSuper = false } = this.$store.getters
-    let level = second || first
-    if (isSuper) {
-      level = null
-    }
-    return {
-      level,
-      search: '',
-      partyId: '',
-      moreParams: {},
-      moreSearchPopup: false,
-      treeVisible: false,
-      partyType: 'position',
+    },
+    data() {
+      const { first = '', second = '' } = this.$store.getters.level
+      const { isSuper = false } = this.$store.getters
+      let level = second || first
+      if (isSuper) {
+        level = null
+      }
+      return {
+        level,
+        search: '',
+        partyId: '',
+        moreParams: {},
+        moreSearchPopup: false,
+        treeVisible: false,
+        partyType: 'position',
 
-      listData: [],
-      pagination: {},
-      sorts: {},
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      errorImage: this.$baseUrl + 'images/user/default.png',
+        errorImage: this.$baseUrl + 'images/user/default.png',
 
-      searchForms: {
-        forms: [
-          { prop: 'Q^ACCOUNT_^SL', label: '账号' },
-          // { prop: 'Q^PARTY_ALIAS_^SL', label: ''}
-          // { prop: 'Q^EMAIL_^SL', label: '邮箱' },
-          // { prop: 'Q^WC_ACCOUNT_^SL', label: '微信账户' },
-          // { prop: 'Q^QQ_^SL', label: 'QQ' },
-          // { prop: 'Q^MOBILE_^SL', label: '电话' },
-          {
-            prop: 'Q^GENDER_^S',
-            label: '性别',
-            fieldType: 'select',
-            valueKey: 'value',
-            options: genderOptions
-          }
-        ]
-      },
+        searchForms: {
+          forms: [
+            { prop: 'Q^ACCOUNT_^SL', label: '账号' },
+            // { prop: 'Q^PARTY_ALIAS_^SL', label: ''}
+            // { prop: 'Q^EMAIL_^SL', label: '邮箱' },
+            // { prop: 'Q^WC_ACCOUNT_^SL', label: '微信账户' },
+            // { prop: 'Q^QQ_^SL', label: 'QQ' },
+            // { prop: 'Q^MOBILE_^SL', label: '电话' },
+            {
+              prop: 'Q^GENDER_^S',
+              label: '性别',
+              fieldType: 'select',
+              valueKey: 'value',
+              options: genderOptions
+            }
+          ]
+        },
 
-      checkbox: [],
-      cacheData: {},
+        checkbox: [],
+        cacheData: {},
 
-      initPage: false,
-      showSelectorPopup: false,
-      showDetailPopup: false,
-      partyTypeIdValue: '',
-      currentOrgIdValue: '',
-      scriptValue: '',
-      moreSearchParams: {},
-      currentFilterOption: []
+        initPage: false,
+        showSelectorPopup: false,
+        showDetailPopup: false,
+        partyTypeIdValue: '',
+        currentOrgIdValue: '',
+        scriptValue: '',
+        moreSearchParams: {},
+        currentFilterOption: []
 
-    }
-  },
-  computed: {
-    title() {
-      if (this.multiple) {
-        const length = this.checkbox.length
-        return length > 0 ? i18n.t('components.checkbox.title', { length: length }) : ''
-      } else {
-        if (this.$utils.isEmpty(this.checkbox)) {
-          return ''
-        }
-        const checked = this.checkbox[0]
-        const cuser = this.listData.find(i => i.id === checked)
-        return this.$utils.isNotEmpty(checked) ? this.cacheData[checked] ? this.cacheData[checked][this.labelKey] ? this.cacheData[checked][this.labelKey] : '' : cuser.name : ''
       }
     },
-    selectedData() {
-      return this.checkbox.map((d) => {
-        return this.cacheData[d] || {}
-      })
-    },
-    listDatas() {
-      return this.listData
-    }
-    // changeParams() {
-    //   const { partyTypeId, currentOrgId, isUseScope, script, partyTypeScope } = this
-    //   return {
-    //     partyTypeId,
-    //     currentOrgId,
-    //     isUseScope,
-    //     script,
-    //     partyTypeScope
-    //   }
-    // }
-  },
-  watch: {
-    value(val, oldVal) {
-      this.initData(val)
-    },
-    showPopup(val, oldVal) {
-      this.showSelectorPopup = val
-      if (!val) {
-        this.initDefault()
-      }
-      this.transitionPartyTypeOptions()
-    }
-  },
-  methods: {
-    transitionPartyTypeOptions() {
-      if (this.$utils.isNotEmpty(this.customPartyTypeOptions)) {
-        this.currentFilterOption = this.customPartyTypeOptions.map(c => {
-          return {
-            text: c.label,
-            value: c.value
+    computed: {
+      title() {
+        if (this.multiple) {
+          const length = this.checkbox.length
+          return length > 0 ? i18n.t('components.checkbox.title', { length: length }) : ''
+        } else {
+          if (this.$utils.isEmpty(this.checkbox)) {
+            return ''
           }
+          const checked = this.checkbox[0]
+          const cuser = this.listData.find(i => i.id === checked)
+          return this.$utils.isNotEmpty(checked) ? this.cacheData[checked] ? this.cacheData[checked][this.labelKey] ? this.cacheData[checked][this.labelKey] : '' : cuser.name : ''
+        }
+      },
+      selectedData() {
+        return this.checkbox.map((d) => {
+          return this.cacheData[d] || {}
         })
+      },
+      listDatas() {
+        return this.listData
       }
+      // changeParams() {
+      //   const { partyTypeId, currentOrgId, isUseScope, script, partyTypeScope } = this
+      //   return {
+      //     partyTypeId,
+      //     currentOrgId,
+      //     isUseScope,
+      //     script,
+      //     partyTypeScope
+      //   }
+      // }
     },
-    initDefault() {
-      this.search = ''
-      this.partyId = ''
-      this.moreParams = {}
-      this.pagination = {}
-      this.listData = []
-      this.initPage = false
-    },
-    // =============初始化数据==================
-    initData(data) {
-      this.checkedValue = []
-      if (this.$utils.isEmpty(data)) {
-        this.emitInitData([])
-        return
-      }
-      data.forEach(v => {
-        if (this.cacheData[v]) {
-          this.checkedValue.push(v)
-        } else {
-          this.getDataInfo(v)
+    watch: {
+      value(val, oldVal) {
+        this.initData(val)
+      },
+      showPopup(val, oldVal) {
+        this.showSelectorPopup = val
+        if (!val) {
+          this.initDefault()
         }
-      })
-      this.checkbox = data
+        this.transitionPartyTypeOptions()
+      }
     },
-    /**
-     * 获取数据信息
-     */
-    getDataInfo(id) {
-      getUserById({ employeeId: id }).then(response => {
-        const data = response.data
+    methods: {
+      transitionPartyTypeOptions() {
+        if (this.$utils.isNotEmpty(this.customPartyTypeOptions)) {
+          this.currentFilterOption = this.customPartyTypeOptions.map(c => {
+            return {
+              text: c.label,
+              value: c.value
+            }
+          })
+        }
+      },
+      initDefault() {
+        this.search = ''
+        this.partyId = ''
+        this.moreParams = {}
+        this.pagination = {}
+        this.listData = []
+        this.initPage = false
+      },
+      // =============初始化数据==================
+      initData(data) {
+        this.checkedValue = []
         if (this.$utils.isEmpty(data)) {
+          this.emitInitData([])
           return
         }
-        data[this.labelKey] = data['name']
-        this.cacheData[data[this.idKey]] = data
-        this.checkedValue.push(data[this.idKey])
-        this.emitInitData(this.getSelectedData(this.checkedValue))
-      }).catch((e) => {
-        console.error(e)
-      })
-    },
-    emitInitData(data) {
-      this.$emit('init-data', data)
-    },
-    // =============初始化数据end==================
-    clickTree() {
-      this.treeVisible = true
-    },
-    handleNodeClck(id) {
-      this.partyId = id
-      this.onSearch()
-    },
-    changePartyType(value) {
-      this.$emit('change-party-type', value)
-      this.partyType = value
-      this.refreshing = true
-      this.loadData()
-    },
-    openedDialog() {
-      this.initPage = true
-      this.onSearch()
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      let type = this.partyType
-      // query(partyType, this.getFormatParams()).then(response => {
-      //   ActionUtils.handleListData(this, response.data)
-      //   console.log(response.data, 'response.dataresponse.dataresponse.data')
-      //   // 缓存
-      //   if (this.$utils.isNotEmpty(this.listData
-      //     this.listData.forEach((d) => {
-      //       this.cacheData[d[this.valueKey]] = d
-      //     })
-      //   }
-      // }).catch((e) => {
-      //   ActionUtils.handleErrorData(this, e)
-      // })
-      console.log(this.treeVisible, '|', this.partyType, '|', this.partyId, '|', this.isUseScope, '|', this.currentOrgIdValue, '|', this.partyTypeIdValue, '|', this.seetingSearchPartyType, 'dddddddddddddd')
-      if (!this.treeVisible) {
-        if (this.$utils.isNotEmpty(this.partyId) || this.isUseScope) {
-          type = this.partyType
-        } else if (this.currentOrgIdValue && this.currentOrgIdValue !== '') {
-          type = 'org'
-        }
-        let flag = 0
-        if (type === 'position' && !this.partyId && this.partyTypeIdValue === '1') {
-          type = 'user'
-          flag = '1'
-        }
-        query(type, this.getFormatParams(flag)).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
-      } else if (this.seetingSearchPartyType === 'position') {
-        queryWithOrg4Position(this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
-        })
-      } else if (this.$utils.isNotEmpty(this.currentOrgIdValue)) {
-        queryWoutOrg(this.getFormatParams()).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
+        data.forEach(v => {
+          if (this.cacheData[v]) {
+            this.checkedValue.push(v)
+          } else {
+            this.getDataInfo(v)
+          }
         })
-      } else {
-        queryPageList(this.getFormatParams('1')).then(response => {
-          this.loading = false
-          ActionUtils.handleListData(this, response.data)
-          this.setSelectRow()
-        }).catch(() => {
-          this.loading = false
+        this.checkbox = data
+      },
+      /**
+       * 获取数据信息
+       */
+      getDataInfo(id) {
+        getUserById({ employeeId: id }).then(response => {
+          const data = response.data
+          if (this.$utils.isEmpty(data)) {
+            return
+          }
+          data[this.labelKey] = data['name']
+          this.cacheData[data[this.idKey]] = data
+          this.checkedValue.push(data[this.idKey])
+          this.emitInitData(this.getSelectedData(this.checkedValue))
+        }).catch((e) => {
+          console.error(e)
         })
-      }
-    },
-    /**
-     * 获取查询条件格式化参数
-     */
-    getFormatParams(flag = '0') {
-      const storeGetters = this.$store.getters
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      const key = this.partyType === 'org' ? 'orgId' : this.partyType === 'position' ? 'positionId' : this.partyType === 'role' ? 'roleId' : this.partyType === 'group' ? 'groupId' : ''
-      const deptLists = storeGetters.deptList.map((m) => {
-        return m.positionId
-      })
-      if (!this.treeVisible) {
-        if (this.$utils.isNotEmpty(this.partyId) || this.currentOrgIdValue !== '') {
-          if (this.partyId !== 0 && this.partyId !== '0') {
-            params[key] = this.partyId === '' ? this.currentOrgIdValue : this.partyId
+      },
+      emitInitData(data) {
+        this.$emit('init-data', data)
+      },
+      // =============初始化数据end==================
+      clickTree() {
+        this.treeVisible = true
+      },
+      handleNodeClck(id) {
+        this.partyId = id
+        this.onSearch()
+      },
+      changePartyType(value) {
+        this.$emit('change-party-type', value)
+        this.partyType = value
+        this.refreshing = true
+        this.loadData()
+      },
+      openedDialog() {
+        this.initPage = true
+        this.onSearch()
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        let type = this.partyType
+        // query(partyType, this.getFormatParams()).then(response => {
+        //   ActionUtils.handleListData(this, response.data)
+        //   console.log(response.data, 'response.dataresponse.dataresponse.data')
+        //   // 缓存
+        //   if (this.$utils.isNotEmpty(this.listData
+        //     this.listData.forEach((d) => {
+        //       this.cacheData[d[this.valueKey]] = d
+        //     })
+        //   }
+        // }).catch((e) => {
+        //   ActionUtils.handleErrorData(this, e)
+        // })
+        console.log(this.treeVisible, '|', this.partyType, '|', this.partyId, '|', this.isUseScope, '|', this.currentOrgIdValue, '|', this.partyTypeIdValue, '|', this.seetingSearchPartyType, 'dddddddddddddd')
+        if (!this.treeVisible) {
+          if (this.$utils.isNotEmpty(this.partyId) || this.isUseScope) {
+            type = this.partyType
+          } else if (this.currentOrgIdValue && this.currentOrgIdValue !== '') {
+            type = 'org'
           }
-          if (!this.partyId && this.partyTypeId === '2' && this.partyType === 'position') {
-            const position = storeGetters.userInfo.employee.positions
-            params.positionId = position
+          let flag = 0
+          if (type === 'position' && !this.partyId && this.partyTypeIdValue === '1') {
+            type = 'user'
+            flag = '1'
           }
+          query(type, this.getFormatParams(flag)).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
+        } else if (this.seetingSearchPartyType === 'position') {
+          queryWithOrg4Position(this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
+        } else if (this.$utils.isNotEmpty(this.currentOrgIdValue)) {
+          queryWoutOrg(this.getFormatParams()).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
         } else {
-          if (this.partyType === 'position') {
-            params[key] = this.partyTypeId ? (this.partyTypeId === '1' ? '' : this.partyTypeId) : deptLists.join(',')
+          queryPageList(this.getFormatParams('1')).then(response => {
+            this.loading = false
+            ActionUtils.handleListData(this, response.data)
+            this.setSelectRow()
+          }).catch(() => {
+            this.loading = false
+          })
+        }
+      },
+      /**
+       * 获取查询条件格式化参数
+       */
+      getFormatParams(flag = '0') {
+        const storeGetters = this.$store.getters
+        const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+        const key = this.partyType === 'org' ? 'orgId' : this.partyType === 'position' ? 'positionId' : this.partyType === 'role' ? 'roleId' : this.partyType === 'group' ? 'groupId' : ''
+        const deptLists = storeGetters.deptList.map((m) => {
+          return m.positionId
+        })
+        if (!this.treeVisible) {
+          if (this.$utils.isNotEmpty(this.partyId) || this.currentOrgIdValue !== '') {
+            if (this.partyId !== 0 && this.partyId !== '0') {
+              params[key] = this.partyId === '' ? this.currentOrgIdValue : this.partyId
+            }
+            if (!this.partyId && this.partyTypeId === '2' && this.partyType === 'position') {
+              const position = storeGetters.userInfo.employee.positions
+              params.positionId = position
+            }
           } else {
-            params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+            if (this.partyType === 'position') {
+              params[key] = this.partyTypeId ? (this.partyTypeId === '1' ? '' : this.partyTypeId) : deptLists.join(',')
+            } else {
+              params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+            }
           }
         }
-      }
-      if (this.seetingSearchPartyType === 'position') {
-        params['positionId'] = this.partyTypeId
-      }
-      if (this.moreSearchParams && Object.keys(this.moreSearchParams).length !== 0) {
-        Object.assign(params, this.moreSearchParams)
-      }
-      // if (this.$utils.isNotEmpty(this.currentOrgId)) {
-      //   params['orgId'] = this.partyId || this.currentOrgId
-      // }
-      const res = ActionUtils.formatParams(params, this.pagination, this.sorts)
-      // 数据过滤
-      if (this.level && (flag === '1' || this.partyType === 'role')) {
-        res.customs = {
-          position: this.level
+        if (this.seetingSearchPartyType === 'position') {
+          params['positionId'] = this.partyTypeId
         }
-      }
-      return res
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      this.moreSearchParams = this.search === '' ? {} : { 'Q^NAME_^SL': this.search }
-      if (this.moreParams && Object.keys(this.moreParams).length !== 0) {
-        Object.keys(this.moreParams).forEach(key => {
-          this.moreSearchParams[key] = this.moreParams[key]
-        })
-      }
-      ActionUtils.initListData(this)
-      this.loadData()
-    },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      this.moreParams = params
-      console.log(params, '.....params,,,,,')
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
-      }
-    },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    /**
-     * 重置表单
-     */
-    resetForm() {
+        if (this.moreSearchParams && Object.keys(this.moreSearchParams).length !== 0) {
+          Object.assign(params, this.moreSearchParams)
+        }
+        // if (this.$utils.isNotEmpty(this.currentOrgId)) {
+        //   params['orgId'] = this.partyId || this.currentOrgId
+        // }
+        const res = ActionUtils.formatParams(params, this.pagination, this.sorts)
+        // 数据过滤
+        if (this.level && (flag === '1' || this.partyType === 'role')) {
+          res.customs = {
+            position: this.level
+          }
+        }
+        return res
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        this.moreSearchParams = this.search === '' ? {} : { 'Q^NAME_^SL': this.search }
+        if (this.moreParams && Object.keys(this.moreParams).length !== 0) {
+          Object.keys(this.moreParams).forEach(key => {
+            this.moreSearchParams[key] = this.moreParams[key]
+          })
+        }
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        this.moreParams = params
+        console.log(params, '.....params,,,,,')
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
 
-    },
-    getPhoto(photo) {
-      if (this.$utils.isNotEmpty(photo)) {
-        return photo.split('=')[1]
-      } else {
-        return
-      }
-    },
-    toggle(data, index) {
-      console.log(this.multiple, '2222222222')
-      if (!this.multiple) {
-        this.$refs.checkboxGroup.toggleAll(false)
-      }
-      this.$refs.checkboxes[index].toggle()
-    },
-    getSelectedData(data) {
-      const result = []
-      data.forEach((d) => {
-        if (this.cacheData[d]) {
-          result.push(this.cacheData[d])
+      },
+      getPhoto(photo) {
+        if (this.$utils.isNotEmpty(photo)) {
+          return photo.split('=')[1]
+        } else {
+          return
         }
-      })
-      return result
-    },
-    // //////////////明细处理///////////////////
-    onTitle() {
-      if (!this.multiple) { return }
-      this.showDetailPopup = true
-    },
-    onDetailCancel() {
-      this.showDetailPopup = false
-    },
-    onDetailConfirm() {
-      this.showDetailPopup = false
-    },
-    removeSelected(index) {
-      this.checkbox.splice(index, 1)
-    },
-    // //////////////////////
-    onCancel() {
-      this.$emit('cancel')
-    },
-    onConfirm() {
-      // const data = this.multiple ? this.checkbox : [this.radio]
-      const data = this.checkbox
+      },
+      toggle(data, index) {
+        console.log(this.multiple, '2222222222')
+        if (!this.multiple) {
+          this.$refs.checkboxGroup.toggleAll(false)
+        }
+        this.$refs.checkboxes[index].toggle()
+      },
+      getSelectedData(data) {
+        const result = []
+        data.forEach((d) => {
+          if (this.cacheData[d]) {
+            result.push(this.cacheData[d])
+          }
+        })
+        return result
+      },
+      // //////////////明细处理///////////////////
+      onTitle() {
+        if (!this.multiple) { return }
+        this.showDetailPopup = true
+      },
+      onDetailCancel() {
+        this.showDetailPopup = false
+      },
+      onDetailConfirm() {
+        this.showDetailPopup = false
+      },
+      removeSelected(index) {
+        this.checkbox.splice(index, 1)
+      },
+      // //////////////////////
+      onCancel() {
+        this.$emit('cancel')
+      },
+      onConfirm() {
+        // const data = this.multiple ? this.checkbox : [this.radio]
+        const data = this.checkbox
 
-      console.log(this.multiple, this.listData, this.checkbox, data, this.radio, 'this.multiplethis.multiple')
-      const arr = []
-      if (this.multiple) {
-        for (let i = 0; i < this.listData.length; i++) {
-          for (let l = 0; l < data.length; l++) {
-            if (this.listData[i].id === data[l]) {
-              arr.push(this.listData[i])
-              break
+        console.log(this.multiple, this.listData, this.checkbox, data, this.radio, 'this.multiplethis.multiple')
+        const arr = []
+        if (this.multiple) {
+          for (let i = 0; i < this.listData.length; i++) {
+            for (let l = 0; l < data.length; l++) {
+              if (this.listData[i].id === data[l]) {
+                arr.push(this.listData[i])
+                break
+              }
             }
           }
-        }
-      } else {
-        for (let j = 0; j < this.listData.length; j++) {
-          if (data.length > 0 && this.listData[j].id === data[0]) {
-            arr.push(this.listData[j])
-            break
+        } else {
+          for (let j = 0; j < this.listData.length; j++) {
+            if (data.length > 0 && this.listData[j].id === data[0]) {
+              arr.push(this.listData[j])
+              break
+            }
           }
+          console.log(arr, 'arrrrrrrr')
         }
-        console.log(arr, 'arrrrrrrr')
+        this.$emit('confirm', arr)
+        this.$emit('callbackData', arr)
       }
-      this.$emit('confirm', arr)
-      this.$emit('callbackData', arr)
     }
   }
-}
-</script>
-
+</script>

+ 25 - 36
src/business/platform/org/selector/popup-tree/index.vue

@@ -1,48 +1,39 @@
 <template>
   <van-popup
-    v-model="dialogVisible"
-    closeable
-    position="left"
-    :style="{ height: '100%',width:'60%'}"
+v-model="dialogVisible"
+closeable
+position="left"
+:style="{ height: '100%',width:'60%'}"
     get-container="body"
-    @close="handleClose"
-  >
-    <van-nav-bar
-      fixed
-      class="employee-tree"
-    >
+@close="handleClose">
+    <van-nav-bar fixed class="employee-tree">
       <template #title>
         <van-dropdown-menu>
           <van-dropdown-item
-            v-model="partyType"
-            get-containe="body"
-            :options="partyOptions"
-            @change="changePartyType"
-          />
+v-model="partyType"
+get-containe="body"
+:options="partyOptions"
+            @change="changePartyType" />
         </van-dropdown-menu>
       </template>
     </van-nav-bar>
     <div class="ibps-fixed-navbar ibps-fixed-top">
-      <van-loading
-        v-if="dialogLoading"
-        vertical
-      >加载中...</van-loading>
+      <van-loading v-if="dialogLoading" vertical>加载中...</van-loading>
       <div v-else>
         <ibps-tree
-          v-if="!isUseScope||!hiddenTree"
-          ref="ibpsTree"
-          :tree-data="treeData"
-          :expand-on-click-node="false"
+v-if="!isUseScope||!hiddenTree"
+ref="ibpsTree"
+:tree-data="treeData"
+:expand-on-click-node="false"
           :props="props"
-          :default-expanded-keys="defaultExpandedKeys"
-          :default-expand-all="defaultExpandAll"
+:default-expanded-keys="defaultExpandedKeys"
+:default-expand-all="defaultExpandAll"
           :load="lazyTree?partyType==='org'&&partyTypeId==='3'?loadOrgTreeNode3:partyType==='position'?partyTypeId==='3'?loadPosTreeNode3:loadPosTreeNode:loadOrgTreeNode:null"
           :lazy="lazyTree"
-          node-key="id"
-          pid-key="parentId"
-          highlight-current
-          @node-click="handleNodeClick"
-        />
+node-key="id"
+pid-key="parentId"
+highlight-current
+@node-click="handleNodeClick" />
       </div>
     </div>
 
@@ -90,13 +81,13 @@ export default {
     },
     partyTypeScope: String,
     currentOrgId: { // 当前用户组ID
-      type: [String, Number],
+      type: [String, Number, Array],
       default: ''
     },
     script: String,
     customPartyTypeOptions: {
       type: [Object, Array],
-      default: () => {}
+      default: () => { }
     },
     isUseScope: { // 是否启用范围
       type: Boolean,
@@ -210,11 +201,9 @@ export default {
 }
 </script>
 <style lang="scss">
-  .employee-tree{
-    .van-nav-bar__title{
+  .employee-tree {
+    .van-nav-bar__title {
       width: 100%;
     }
   }
-
 </style>
-

+ 0 - 0
src/views/component/deviceSubtableDialog.vue


+ 0 - 0
src/views/component/qrcodeedDialog.vue


+ 0 - 0
src/views/component/selectFileTypeToShenCha.vue


+ 0 - 0
src/views/component/selectType.vue


+ 0 - 0
src/views/component/trainingManage/barcodeDialog.vue


+ 15 - 62
src/views/platform/bpmn/addiInspect/index.vue

@@ -42,7 +42,7 @@
             </template>
           </van-cell>
         </van-checkbox-group>
-        <!-- <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" /> -->
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
 
@@ -155,8 +155,6 @@
         </div>
       </van-popup>
     </template>
-    <van-divider v-if="footText">到底了</van-divider>
-    <van-empty v-if="noData" description="暂无数据" />
     <!-- <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :pro-inst-id="proInstId"
       :def-id="defId" @close="visible => formrenderVisible = visible" @callback="onSearch" /> -->
   </div>
@@ -192,9 +190,10 @@
     mixins: [random, bpmnStatus],
     data() {
       return {
+        page: 0,
         id: '',
-        footText: false,
-        noData: false,
+        // footText: false,
+        // noData: false,
         oralPopup: '',
         ReachBottomShow: false,
         stateActive: false,
@@ -259,35 +258,19 @@
        * 加载数据
        * 
       */
-      async loadData() {
+      async loadData(j) {
         this.loading = true
         await this.getPositionobj()
-        let page = 0
-        if (this.current === 0) {
-          page = 0
-        } else {
-          page = this.current * 10
+        let params = await this.getSearcFormData()
+        if (j == "search") {
+          this.page = 0
         }
-        const key = this.subject
-        let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%` + key + `%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${page},10`
+        // let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%` + key + `%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${page},10`
+        let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%${this.subject}%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit} `
         this.$common.request('sql', sql).then(res => {
-          if (this.current == 0 && res.variables.data.length == 0) {
-            this.finished = true;
-            this.noData = true
-            this.footText = false
-          }
-          // console.log("res获取到的数据", res);
-          ActionUtils.handleListData(this, res.variables)
-          let data = res.variables.data
-          this.listData.push(...data)
-          if (this.listData.length != 0 && (this.listData.length) % 10 != 0) {
-            this.footText = true
-            this.finished = true;
-            return
-          } else {
-            this.current++
-          }
-          this.loading = false
+          ActionUtils.handleListDataCommon(this, res.variables)
+        }).catch(e => {
+          ActionUtils.handleErrorData(this, e)
         })
       },
       // 获取positionobj数据
@@ -356,7 +339,7 @@
        * 下拉刷新
        */
       onRefresh() {
-        this.footText = false
+        // this.footText = false
         this.refreshing = true
         this.finished = false
         this.loading = true
@@ -368,7 +351,7 @@
       onSearch() {
         this.stateActive = false
         ActionUtils.initListData(this)
-        this.loadData()
+        this.loadData('search')
       },
       /**
        * 高级查询
@@ -456,36 +439,6 @@
       onClose() {
         this.ReachBottomShow = false
       },
-
-      //   lookPosition(str) {
-      //     return new Promise((resolve, reject) => {
-      //       let sql = `select * from ibps_party_entity where find_in_set(ID_,'${str}') order by DEPTH_`
-      //       this.$getCommon.getRepust('sql', sql).then(res => {
-      //         const data = res.data.variables.data
-      //         if (data.length > 0) {
-      //           data.forEach(item => {
-      //             item.id = item.ID_
-      //             item.name = item.NAME_
-      //             item.path = item.PATH_
-      //             item.text = item.NAME_
-      //           })
-      //           uni.setStorageSync('mainPosition', data[0])
-      //           uni.setStorageSync('positionList', data)
-      //           this.getPosition(data).then(res => {
-      //             console.log("获得什么数据啊data", data);
-      //             resolve(data)
-      //           })
-
-      //         } else {
-      //           resolve(data)
-      //         }
-
-      //       }).catch(err => {
-      //         reject(err)
-      //       })
-      //     })
-
-      //   },
     }
 
   }

+ 197 - 251
src/views/platform/bpmn/new-process/index.vue

@@ -1,28 +1,16 @@
 <template>
   <div class="new-process">
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-      />
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" left-arrow @click-left="$router.push({ name: 'dashboard' })" />
 
       <van-tabs v-model="tabActive" color="#3396FB" @click="onClickTab">
-        <van-tab
-          v-for="data in tabDatas"
-          :key="data.name"
-          :name="data.name"
-          :title="data.title"
-        />
+        <van-tab v-for="data in tabDatas" :key="data.name" :name="data.name" :title="data.title" />
       </van-tabs>
-      <van-search
-        v-model="subject"
-        placeholder="请输入搜索关键词"
-        @search="onSearch"
-      >
+      <van-search v-model="subject" placeholder="请输入搜索关键词" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
@@ -30,66 +18,31 @@
       </van-search>
     </van-sticky>
 
-    <van-pull-refresh
-      v-model="refreshing"
-      @refresh="onRefresh"
-    >
-      <van-list
-        v-model="loading"
-        :finished="finished"
-        @load="loadData"
-      >
-        <van-swipe-cell
-          v-for="(item,index) in listData"
-          :key="item.id+index"
-          :right-width="65"
-        >
-          <van-cell
-            :key="item.id+index"
-            :title="item.name"
-            :value="item.createTime|formatRelativeTime"
-            :label="item.desc"
-            @click="onClick(item,index)"
-          >
+    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+      <van-list v-model="loading" :finished="finished" @load="loadData">
+        <van-swipe-cell v-for="(item,index) in listData" :key="item.id+index" :right-width="65">
+          <van-cell :key="item.id+index" :title="item.name" :value="item.createTime|formatRelativeTime"
+            :label="item.desc" @click="onClick(item,index)">
             <template slot="icon">
-              <ibps-avatar
-                :icon="_randomIcon(index)"
-                :text="item.name"
-                :bg-color="_randomColor(index)"
-                width="24"
-                height="24"
-                radius="8"
-                icon-prefix="new-process_size ibps-icon"
-                class="ibps-mr-10"
-              />
+              <ibps-avatar :icon="_randomIcon(index)" :text="item.name" :bg-color="_randomColor(index)" width="24"
+                height="24" radius="8" icon-prefix="new-process_size ibps-icon" class="ibps-mr-10" />
             </template>
             <div v-if="tabActive===1">
               <div>{{ item.createTime|formatRelativeTime }}</div>
               <!-- <van-tag plain :type="item.favorites | optionsFilter(bpmnStatusOptions,'type')">{{ item.favorites | optionsFilter(bpmnStatusOptions) }}</van-tag> -->
-              <van-tag
-                size="medium"
+              <van-tag size="medium"
                 :color="item.favorites | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'color','type')"
-                :text-color="item.favorites | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')"
-              >
+                :text-color="item.favorites | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')">
                 {{ item.favorites| optionsFilter(bpmnStatusOptions) }}</van-tag>
             </div>
           </van-cell>
 
-          <van-button
-            slot="right"
-            :name="item.favorites?'star-o':'star'"
-            :type="item.favorites?'danger':'info'"
-            :text="item.favorites?'取消':'收藏'"
-            class="ibps-swipe-button"
-            @click="onFavorites(item.defId,item.favorites)"
-          />
+          <van-button slot="right" :name="item.favorites?'star-o':'star'" :type="item.favorites?'danger':'info'"
+            :text="item.favorites?'取消':'收藏'" class="ibps-swipe-button"
+            @click="onFavorites(item.defId,item.favorites)" />
 
         </van-swipe-cell>
-        <ibps-list-result-page
-          :result-type="resultType"
-          :error-type="errorType"
-          :result-message="resultMessage"
-        />
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
 
@@ -101,215 +54,208 @@
       @reset-form="resetForm"
     /> -->
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :def-id="defId"
-      @close="visible => formrenderVisible = visible"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :def-id="defId"
+      @close="visible => formrenderVisible = visible" />
   </div>
 </template>
 <script>
-import { newProcess, favorited, saveFavorites, removeFavorites } from '@/api/platform/office/bpmInitiated'
+  import { newProcess, favorited, saveFavorites, removeFavorites } from '@/api/platform/office/bpmInitiated'
 
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
 
-// import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  // import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-export default {
-  name: 'new-process',
-  components: {
-    // IbpsMoreSearch,
-    IbpsTypeTree,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      tabActive: 0,
-      tabDatas: [{
-        name: 0,
-        title: '收藏的流程'
-      }, {
-        name: 1,
-        title: '发布的流程'
-      }],
-      stateActive: false,
-      moreSearchPopup: false,
-      typeTreePopup: false,
-      searchForms: {
-        forms: [
-          { prop: 'Q^name_^SL', label: '流程名称', fieldType: 'text' }
-        ]
-      },
-      subject: '',
-      typeId: '',
-      moreParams: {},
-
-      listData: [],
-      pagination: {},
-      sorts: {},
-
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+  export default {
+    name: 'new-process',
+    components: {
+      // IbpsMoreSearch,
+      IbpsTypeTree,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        tabActive: 0,
+        tabDatas: [{
+          name: 0,
+          title: '收藏的流程'
+        }, {
+          name: 1,
+          title: '发布的流程'
+        }],
+        stateActive: false,
+        moreSearchPopup: false,
+        typeTreePopup: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^name_^SL', label: '流程名称', fieldType: 'text' }
+          ]
+        },
+        subject: '',
+        typeId: '',
+        moreParams: {},
 
-      defId: '',
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-  created() {
-    this.loadData()
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    onClickTab(index) {
-      // 清空查询条件
-      this.subject = ''
-      this.typeId = ''
-      this.moreParams = {}
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      this.onSearch()
-    },
-    loadData() {
-      this.loading = true
-      if (this.tabActive === 0) {
-        this.loadFavoritesListData()
-      } else {
-        this.loadDefineListData()
+        defId: '',
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
     },
-    loadFavoritesListData() {
-      favorited(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    loadDefineListData() {
-      newProcess(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = {}
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^name_^SL'] = this.subject
-      }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
 
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    onRefresh() {
-      this.refreshing = true
-      this.onSearch()
-    },
-
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
+    created() {
       this.loadData()
     },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^type_id_^SL'] = this.typeId
-      }
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      onClickTab(index) {
+        // 清空查询条件
+        this.subject = ''
+        this.typeId = ''
+        this.moreParams = {}
 
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
-      }
-    },
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    resetForm() {
-      this.typeId = ''
-    },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    onFavorites(defId, type) {
-      if (type === true) {
-        removeFavorites({ defIds: defId }).then(response => {
-          this.$notify({
-            type: 'success',
-            message: '取消收藏成功!'
-          })
-          this.onSearch()
+        this.onSearch()
+      },
+      loadData() {
+        this.loading = true
+        if (this.tabActive === 0) {
+          this.loadFavoritesListData()
+        } else {
+          this.loadDefineListData()
+        }
+      },
+      loadFavoritesListData() {
+        favorited(this.getSearcFormData()).then(response => {
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
         })
-      } else {
-        saveFavorites({ defIds: defId }).then(response => {
-          this.$notify({
-            type: 'success',
-            message: '收藏成功!'
-          })
-          this.onSearch()
+      },
+      loadDefineListData() {
+        newProcess(this.getSearcFormData()).then(response => {
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
         })
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = {}
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^name_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
+
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      onRefresh() {
+        this.refreshing = true
+        this.onSearch()
+      },
+
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^type_id_^SL'] = this.typeId
+        }
+
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      resetForm() {
+        this.typeId = ''
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      onFavorites(defId, type) {
+        if (type === true) {
+          removeFavorites({ defIds: defId }).then(response => {
+            this.$notify({
+              type: 'success',
+              message: '取消收藏成功!'
+            })
+            this.onSearch()
+          })
+        } else {
+          saveFavorites({ defIds: defId }).then(response => {
+            this.$notify({
+              type: 'success',
+              message: '收藏成功!'
+            })
+            this.onSearch()
+          })
+        }
+      },
+      // 启动流程
+      onClick(item) {
+        this.defId = item.id
+        this.formrenderTitle = item.name
+        this.formrenderVisible = true
       }
-    },
-    // 启动流程
-    onClick(item) {
-      this.defId = item.id
-      this.formrenderTitle = item.name
-      this.formrenderVisible = true
     }
   }
-}
 </script>
 <style lang="scss" scoped>
-  .new-process_size{
-    font-size: 14px!important;
+  .new-process_size {
+    font-size: 14px !important;
   }
-  ::v-deep .van-cell__title{
+
+  ::v-deep .van-cell__title {
     width: 65%;
-    .van-cell__label{
+
+    .van-cell__label {
       overflow-wrap: break-word;
     }
   }
-</style>
+</style>

+ 14 - 0
src/views/platform/data/custom-dialog/dialog.vue

@@ -0,0 +1,14 @@
+<template>
+  <div>
+
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+
+      }
+    }
+  }
+</script>

+ 14 - 0
src/views/platform/data/dataTemplate/template-list.vue

@@ -0,0 +1,14 @@
+<template>
+  <div>
+
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+
+      }
+    }
+  }
+</script>