Browse Source

修改项目

lex-xin 4 years ago
parent
commit
aaf59b79e9

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@
 node_modules/
 dist/
 dist.tar.gz
+web/
 web.tar.gz
 npm-debug.log*
 yarn-debug.log*

+ 1 - 1
public/index.html

@@ -9,7 +9,7 @@
   <link rel="icon" href="<%= BASE_URL %>favicon.ico">
   <title><%= webpackConfig.name %> - ferry</title>
   <meta name="keywords" content="ferry,vue,gin,go">
-  <meta name="description" content="FERRY 管理平台">
+  <meta name="description" content="OA 管理平台">
   <style>
     html,
     body,

+ 20 - 9
src/components/VueFormMaking/components/GenerateForm.vue

@@ -10,7 +10,6 @@
       :label-width="data.config.labelWidth + 'px'"
     >
       <template v-for="item in data.list">
-
         <template v-if="item.type == 'grid'">
           <el-row
             :key="item.key"
@@ -20,7 +19,6 @@
             :align="item.options.align"
           >
             <el-col v-for="(col, colIndex) in item.columns" :key="colIndex" :span="col.span">
-
               <template v-for="citem in col.list">
                 <el-form-item v-if="citem.type=='blank'" :key="citem.key" :label="citem.name" :prop="citem.model">
                   <slot :name="citem.model" :model="models" />
@@ -31,9 +29,9 @@
                   :preview="preview"
                   :models.sync="models"
                   :remote="remote"
-                  :rules="rules"
                   :widget="citem"
                   :data="data"
+                  :prop-value="citem.model"
                   @input-change="onInputChange"
                 />
               </template>
@@ -47,18 +45,18 @@
           </el-form-item>
         </template>
         <!-- 子表单 -->
-        <template v-if="item.type === 'subform'">
+        <template v-else-if="item.type === 'subform'">
           <el-form-item
             :key="item.key"
             :label-width="!item.options.labelWidthStatus?'0px': item.options.labelWidth + 'px'"
             :label="!item.options.labelWidthStatus?'':item.name"
-            :prop="item.model"
           >
             <el-table
               :data="models[item.model]"
               border
               style="width: 100%"
               :header-cell-style="{padding: '5px 0'}"
+              size="mini"
             >
               <el-table-column
                 v-if="!preview"
@@ -71,22 +69,21 @@
                 <template slot-scope="scope">
                   <i style="font-size: 25px; color: red" class="el-icon-remove" @click="delSubformCol(item, scope.$index)" />
                 </template>
-
               </el-table-column>
               <template v-for="(c, i) in item.columns">
                 <div :key="i">
                   <el-table-column
                     v-for="v in c.list"
                     :key="v.key"
-                    :prop="v.modal"
+                    :prop="v.model"
                     :label="v.name"
                     min-width="250"
                   >
                     <template slot-scope="scope">
                       <genetate-form-item
+                        :prop-value="item.model + '.' + scope.$index + '.' + v.model"
                         :preview="preview"
                         :models.sync="models"
-                        :rules="rules"
                         :widget="v"
                         :remote="remote"
                         :data="data"
@@ -106,9 +103,9 @@
         <template v-else>
           <genetate-form-item
             :key="item.key"
+            :prop-value="item.model"
             :preview="preview"
             :models.sync="models"
-            :rules="rules"
             :widget="item"
             :remote="remote"
             :data="data"
@@ -169,6 +166,20 @@ export default {
           } else {
             subformFields[l.model] = ""
           }
+
+          if (this.rules[item.model] === undefined) {
+            this.rules[item.model] = []
+          }
+          if (this.rules[item.model][this.models[item.model].length] === undefined) {
+            this.rules[item.model][this.models[item.model].length] = {}
+          }
+          this.rules[item.model][this.models[item.model].length][l.model] = [...l.rules.map(item => {
+            if (item.pattern) {
+              return { ...item, pattern: eval(item.pattern) }
+            } else {
+              return { ...item }
+            }
+          })]
         }
       }
       this.models[item.model].push(subformFields)

+ 3 - 3
src/components/VueFormMaking/components/GenerateFormItem.vue

@@ -3,7 +3,7 @@
     v-if="showStatus"
     :label-width="isLabel===false||!widget.options.labelWidthStatus?'0px': widgetLabelWidth + 'px'"
     :label="isLabel===false||widget.type==='divider' || !widget.options.labelWidthStatus?'':widget.name"
-    :prop="widget.model"
+    :prop="propValue"
     :style="subformIndex !== undefined?{'margin-bottom': '0'}: {}"
   >
     <template v-if="preview">
@@ -335,7 +335,7 @@ export default {
     FileUpload
   },
   /* eslint-disable */
-  props: ['widget', 'models', 'rules', 'remote', 'data', 'disabled', 'preview', 'isLabel', 'subformIndex', 'subformModel'],
+  props: ['widget', 'models', 'propValue', 'remote', 'data', 'disabled', 'preview', 'isLabel', 'subformIndex', 'subformModel'],
   data() {
     return {
       showStatus: true,
@@ -396,7 +396,7 @@ export default {
         })
       })
     }
-    
+
     if (this.widget.type === 'imgupload' && this.widget.options.isQiniu) {
       this.remote[this.widget.options.tokenFunc]((data) => {
         this.widget.options.token = data

+ 0 - 1
src/components/VueFormMaking/components/WidgetConfig.vue

@@ -605,7 +605,6 @@ export default {
   },
   created() {
     this.handleInitHeaders()
-    console.log(this.data)
   },
   methods: {
     addDisplayVerifiy() {

+ 150 - 150
src/components/VueFormMaking/components/componentsConfig.js

@@ -152,28 +152,28 @@ export const basicComponents = [
       }
     }
   },
-  {
-    type: 'time',
-    icon: 'icon-time',
-    options: {
-      defaultValue: '21:19:56',
-      readonly: false,
-      disabled: false,
-      editable: true,
-      clearable: true,
-      placeholder: '',
-      startPlaceholder: '',
-      endPlaceholder: '',
-      isRange: false,
-      arrowControl: true,
-      format: 'HH:mm:ss',
-      required: false,
-      width: '',
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true
-    }
-  },
+  // {
+  //   type: 'time',
+  //   icon: 'icon-time',
+  //   options: {
+  //     defaultValue: '21:19:56',
+  //     readonly: false,
+  //     disabled: false,
+  //     editable: true,
+  //     clearable: true,
+  //     placeholder: '',
+  //     startPlaceholder: '',
+  //     endPlaceholder: '',
+  //     isRange: false,
+  //     arrowControl: true,
+  //     format: 'HH:mm:ss',
+  //     required: false,
+  //     width: '',
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true
+  //   }
+  // },
   {
     type: 'date',
     icon: 'icon-date',
@@ -217,26 +217,26 @@ export const basicComponents = [
       }
     }
   },
-  {
-    type: 'color',
-    icon: 'icon-color',
-    options: {
-      defaultValue: '',
-      disabled: false,
-      showAlpha: false,
-      required: false,
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true,
-      displayVerifiy: {
-        type: 'hide',
-        list: [{
-          model: '字段标识',
-          value: '字段值'
-        }]
-      }
-    }
-  },
+  // {
+  //   type: 'color',
+  //   icon: 'icon-color',
+  //   options: {
+  //     defaultValue: '',
+  //     disabled: false,
+  //     showAlpha: false,
+  //     required: false,
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true,
+  //     displayVerifiy: {
+  //       type: 'hide',
+  //       list: [{
+  //         model: '字段标识',
+  //         value: '字段值'
+  //       }]
+  //     }
+  //   }
+  // },
   {
     type: 'select',
     icon: 'icon-select',
@@ -279,50 +279,50 @@ export const basicComponents = [
       }
     }
   },
-  {
-    type: 'switch',
-    icon: 'icon-switch',
-    options: {
-      defaultValue: false,
-      required: false,
-      disabled: false,
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true,
-      displayVerifiy: {
-        type: 'hide',
-        list: [{
-          model: '字段标识',
-          value: '字段值'
-        }]
-      }
-    }
-  },
-  {
-    type: 'slider',
-    icon: 'icon-slider',
-    options: {
-      defaultValue: 0,
-      disabled: false,
-      required: false,
-      min: 0,
-      max: 100,
-      step: 1,
-      showInput: false,
-      range: false,
-      width: '',
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true,
-      displayVerifiy: {
-        type: 'hide',
-        list: [{
-          model: '字段标识',
-          value: '字段值'
-        }]
-      }
-    }
-  },
+  // {
+  //   type: 'switch',
+  //   icon: 'icon-switch',
+  //   options: {
+  //     defaultValue: false,
+  //     required: false,
+  //     disabled: false,
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true,
+  //     displayVerifiy: {
+  //       type: 'hide',
+  //       list: [{
+  //         model: '字段标识',
+  //         value: '字段值'
+  //       }]
+  //     }
+  //   }
+  // },
+  // {
+  //   type: 'slider',
+  //   icon: 'icon-slider',
+  //   options: {
+  //     defaultValue: 0,
+  //     disabled: false,
+  //     required: false,
+  //     min: 0,
+  //     max: 100,
+  //     step: 1,
+  //     showInput: false,
+  //     range: false,
+  //     width: '',
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true,
+  //     displayVerifiy: {
+  //       type: 'hide',
+  //       list: [{
+  //         model: '字段标识',
+  //         value: '字段值'
+  //       }]
+  //     }
+  //   }
+  // },
   {
     type: 'text',
     icon: 'icon-wenzishezhi-',
@@ -398,51 +398,51 @@ export const advanceComponents = [
       }
     }
   },
-  {
-    type: 'file',
-    icon: 'icon-wenjianshangchuan',
-    options: {
-      defaultValue: [],
-      width: '',
-      tokenFunc: 'funcGetToken',
-      token: '',
-      domain: 'http://pfp81ptt6.bkt.clouddn.com/',
-      disabled: false,
-      length: 9,
-      headers: {},
-      // isQiniu: false,
-      tip: '', // 提示说明
-      action: 'http://ipaddress:port/api/v1/public/uploadFile',
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true,
-      displayVerifiy: {
-        type: 'hide',
-        list: [{
-          model: '字段标识',
-          value: '字段值'
-        }]
-      }
-    }
-  },
-  {
-    type: 'editor',
-    icon: 'icon-fuwenbenkuang',
-    options: {
-      defaultValue: '',
-      width: '',
-      labelWidth: 100,
-      labelWidthDisabled: false,
-      labelWidthStatus: true,
-      displayVerifiy: {
-        type: 'hide',
-        list: [{
-          model: '字段标识',
-          value: '字段值'
-        }]
-      }
-    }
-  },
+  // {
+  //   type: 'file',
+  //   icon: 'icon-wenjianshangchuan',
+  //   options: {
+  //     defaultValue: [],
+  //     width: '',
+  //     tokenFunc: 'funcGetToken',
+  //     token: '',
+  //     domain: 'http://pfp81ptt6.bkt.clouddn.com/',
+  //     disabled: false,
+  //     length: 9,
+  //     headers: {},
+  //     // isQiniu: false,
+  //     tip: '', // 提示说明
+  //     action: 'http://ipaddress:port/api/v1/public/uploadFile',
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true,
+  //     displayVerifiy: {
+  //       type: 'hide',
+  //       list: [{
+  //         model: '字段标识',
+  //         value: '字段值'
+  //       }]
+  //     }
+  //   }
+  // },
+  // {
+  //   type: 'editor',
+  //   icon: 'icon-fuwenbenkuang',
+  //   options: {
+  //     defaultValue: '',
+  //     width: '',
+  //     labelWidth: 100,
+  //     labelWidthDisabled: false,
+  //     labelWidthStatus: true,
+  //     displayVerifiy: {
+  //       type: 'hide',
+  //       list: [{
+  //         model: '字段标识',
+  //         value: '字段值'
+  //       }]
+  //     }
+  //   }
+  // },
   {
     type: 'cascader',
     icon: 'icon-jilianxuanze',
@@ -524,25 +524,25 @@ export const advanceComponents = [
 ]
 
 export const layoutComponents = [
-  {
-    type: 'grid',
-    icon: 'icon-grid-',
-    columns: [
-      {
-        span: 12,
-        list: []
-      },
-      {
-        span: 12,
-        list: []
-      }
-    ],
-    options: {
-      gutter: 0,
-      justify: 'start',
-      align: 'top'
-    }
-  },
+  // {
+  //   type: 'grid',
+  //   icon: 'icon-grid-',
+  //   columns: [
+  //     {
+  //       span: 12,
+  //       list: []
+  //     },
+  //     {
+  //       span: 12,
+  //       list: []
+  //     }
+  //   ],
+  //   options: {
+  //     gutter: 0,
+  //     justify: 'start',
+  //     align: 'top'
+  //   }
+  // },
   {
     type: 'divider',
     icon: 'icon-input',

+ 4 - 0
src/components/wfd/components/DetailPanel/DefaultDetail.vue

@@ -6,12 +6,14 @@
         style="width:90%; font-size:12px"
         :disabled="readOnly"
         :value="model.label"
+        size="small"
         @input="(value) => {onChange('label', value)}"
       />
     </div>
     <div class="panelRow">
       <div><span style="color: red">*</span> 顺序:</div>
       <el-input
+        size="small"
         style="width:90%; font-size:12px"
         :disabled="readOnly"
         :value="model.sort"
@@ -20,11 +22,13 @@
     </div>
     <div class="panelRow">
       <el-checkbox
+        size="small"
         :disabled="readOnly"
         :value="!!model.isHideNode"
         @change="(value) => onChange('isHideNode', value)"
       >隐藏节点</el-checkbox>
       <el-checkbox
+        size="small"
         :disabled="readOnly"
         :value="!!model.hideIcon"
         @change="(value) => onChange('hideIcon', value)"

+ 2 - 0
src/components/wfd/components/DetailPanel/EndEventDetail.vue

@@ -6,6 +6,7 @@
       <div class="panelRow">
         <div>之后任务:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           placeholder="选择任务"
           :disabled="readOnly"
@@ -25,6 +26,7 @@
         :templates-base="templatesBase"
         :write-preview="false"
         :readonly-preview="false"
+        :cc-preview="false"
       />
     </div>
   </div>

+ 10 - 0
src/components/wfd/components/DetailPanel/HandleNodeDetail.vue

@@ -6,6 +6,7 @@
       <div class="panelRow">
         <div>之后任务:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           placeholder="选择任务"
           :disabled="readOnly"
@@ -20,6 +21,7 @@
       <div class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['handleNode.assignType'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size: 12px"
           :placeholder="i18n['handleNode.assignType.placeholder']"
           :value="model.assignType"
@@ -36,6 +38,7 @@
       <div v-if="model.assignType === 'person'" class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['handleNode.assignType.person.title'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['handleNode.assignType.person.placeholder']"
           :disabled="readOnly"
@@ -51,6 +54,7 @@
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.role.title'] }}:</div>
         <el-select
           v-model.number="model.assignValue"
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.role.placeholder']"
           :disabled="readOnly"
@@ -77,6 +81,7 @@
       <div v-else-if="model.assignType === 'department'" class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.department.title'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.department.placeholder']"
           :value="model.assignValue"
@@ -92,6 +97,7 @@
         <div><span style="color: red">*</span> {{ i18n['handleNode.assignType.variable.title'] }}:</div>
         <el-select
           v-model.number="model.assignValue"
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['handleNode.assignType.variable.placeholder']"
           :disabled="readOnly"
@@ -104,6 +110,7 @@
       </div>
       <div class="panelRow">
         <el-checkbox
+          size="small"
           :disabled="model.assignType !== 'role' && model.assignType !== 'department' && (
             model.assignValue===undefined ||
             model.assignValue===null ||
@@ -114,6 +121,7 @@
           @change="(e) => { onChange('isCounterSign', e); initCounterSign(e) }"
         >{{ i18n['handleNode.counterSign'] }}</el-checkbox>
         <el-checkbox
+          size="small"
           :disabled="
             model.assignValue===undefined||
               model.assignValue===null||
@@ -129,6 +137,7 @@
             model.assignValue!==null &&
             model.assignValue.length >= 1 &&
             model.isCounterSign"
+          size="small"
           :value="model.fullHandle"
           @change="(value) => onChange('fullHandle', value)"
         >{{ i18n['userTask.fullHandle'] }}</el-checkbox>
@@ -140,6 +149,7 @@
         :templates="templates"
         :templates-base="templatesBase"
         :readonly-preview="false"
+        :users="users"
       />
     </div>
   </div>

+ 25 - 0
src/components/wfd/components/DetailPanel/NodeDetail.vue

@@ -9,6 +9,7 @@
         :value="model.writeTpls"
         :multiple="true"
         :filterable="true"
+        size="small"
         @change="(e) => onChange('writeTpls', e)"
       >
         <template v-for="(templateValue, templateIndex) in templatesBase">
@@ -25,6 +26,7 @@
         :value="model.readonlyTpls"
         :multiple="true"
         :filterable="true"
+        size="small"
         @change="(e) => onChange('readonlyTpls', e)"
       >
         <template v-for="(templateValue, templateIndex) in templatesBase">
@@ -41,6 +43,7 @@
         :value="model.hideTpls"
         :multiple="true"
         :filterable="true"
+        size="small"
         @change="(e) => onChange('hideTpls', e)"
       >
         <template v-for="(templateValue, templateIndex) in templatesBase">
@@ -48,6 +51,20 @@
         </template>
       </el-select>
     </div>
+    <div v-if="ccPreview" class="panelRow">
+      <div>抄送:</div>
+      <el-select
+        size="small"
+        style="width:90%; font-size:12px"
+        placeholder="请选择抄送人"
+        :value="model.cc"
+        :multiple="true"
+        :filterable="true"
+        @change="(e) => { onChange('cc', e); getPersons(e) }"
+      >
+        <el-option v-for="user in users" :key="user.userId" :label="user.nickName===''?user.username:user.nickName" :value="user.userId" />
+      </el-select>
+    </div>
   </div>
 </template>
 <script>
@@ -81,6 +98,14 @@ export default {
     readonlyPreview: {
       type: Boolean,
       default: true
+    },
+    ccPreview: {
+      type: Boolean,
+      default: true
+    },
+    users: {
+      type: Array,
+      default: () => ([])
     }
   }
 }

+ 6 - 0
src/components/wfd/components/DetailPanel/StartEventDetail.vue

@@ -12,6 +12,7 @@
           :value="model.task"
           :multiple="true"
           :filterable="true"
+          size="small"
           @change="(e) => onChange('task', e)"
         >
           <el-option v-for="(taskValue, taskIndex) in tasks" :key="taskIndex" :label="taskValue.name" :value="taskValue.full_name" />
@@ -24,6 +25,7 @@
         :templates="templates"
         :templates-base="templatesBase"
         :write-preview="false"
+        :users="users"
       />
     </div>
   </div>
@@ -61,6 +63,10 @@ export default {
     templatesBase: {
       type: Array,
       default: () => ([])
+    },
+    users: {
+      type: Array,
+      default: () => ([])
     }
   }
 }

+ 10 - 0
src/components/wfd/components/DetailPanel/UserTaskDetail.vue

@@ -6,6 +6,7 @@
       <div class="panelRow">
         <div>之后任务:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           placeholder="选择任务"
           :disabled="readOnly"
@@ -20,6 +21,7 @@
       <div class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size: 12px"
           :placeholder="i18n['userTask.assignType.placeholder']"
           :value="model.assignType"
@@ -36,6 +38,7 @@
       <div v-if="model.assignType === 'person'" class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.person.title'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.person.placeholder']"
           :disabled="readOnly"
@@ -51,6 +54,7 @@
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.role.title'] }}:</div>
         <el-select
           v-model.number="model.assignValue"
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.role.placeholder']"
           :disabled="readOnly"
@@ -77,6 +81,7 @@
       <div v-else-if="model.assignType === 'department'" class="panelRow">
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.department.title'] }}:</div>
         <el-select
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.department.placeholder']"
           :value="model.assignValue"
@@ -92,6 +97,7 @@
         <div><span style="color: red">*</span> {{ i18n['userTask.assignType.variable.title'] }}:</div>
         <el-select
           v-model.number="model.assignValue"
+          size="small"
           style="width:90%; font-size:12px"
           :placeholder="i18n['userTask.assignType.variable.placeholder']"
           :disabled="readOnly"
@@ -104,6 +110,7 @@
       </div>
       <div class="panelRow">
         <el-checkbox
+          size="small"
           :disabled="model.assignType !== 'role' && model.assignType !== 'department' && (
             model.assignValue===undefined ||
             model.assignValue===null ||
@@ -114,6 +121,7 @@
           @change="(e) => { onChange('isCounterSign', e); initCounterSign(e) }"
         >{{ i18n['userTask.counterSign'] }}</el-checkbox>
         <el-checkbox
+          size="small"
           :disabled="
             model.assignValue===undefined||
               model.assignValue===null||
@@ -129,6 +137,7 @@
             model.assignValue!==null &&
             model.assignValue.length >= 1 &&
             model.isCounterSign"
+          size="small"
           :value="model.fullHandle"
           @change="(value) => onChange('fullHandle', value)"
         >{{ i18n['userTask.fullHandle'] }}</el-checkbox>
@@ -140,6 +149,7 @@
         :templates="templates"
         :templates-base="templatesBase"
         :readonly-preview="false"
+        :users="users"
       />
     </div>
   </div>

+ 2 - 1
src/components/wfd/components/DetailPanel/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="detailPanel" :style="{'height':height+'px'}">
+  <div class="detailPanel" :style="{'height':height+'px'}" style="overflow-y: scroll; padding-bottom: 10px;">
     <UserTaskDetail
       v-if="model.clazz === 'userTask'"
       :model="model"
@@ -45,6 +45,7 @@
     <StartEventDetail
       v-else-if="model.clazz === 'start'"
       :model="model"
+      :users="users"
       :on-change="onChange"
       :read-only="readOnly"
       :tasks="tasks"

+ 1 - 1
src/settings.js

@@ -1,5 +1,5 @@
 module.exports = {
-  title: 'ferry 管理平台',
+  title: 'OA 管理平台',
   logo: 'https://www.fdevops.com/wp-content/uploads/2020/08/1597815294-ferry_logo_white.png',
   isLdap: false,
 

+ 1 - 1
src/utils/get-page-title.js

@@ -1,6 +1,6 @@
 import defaultSettings from '@/settings'
 
-var title = defaultSettings.title || 'ferry 管理平台'
+var title = defaultSettings.title || 'OA 管理平台'
 
 export default function getPageTitle(pageTitle, globalTitle) {
   if (globalTitle !== undefined && globalTitle !== null) {

+ 7 - 2
src/views/login/index.vue

@@ -68,7 +68,7 @@
                 </span>
               </el-form-item>
             </el-tooltip>
-            <el-form-item prop="code" style="width: 66%;float: left; margin-bottom: 13px">
+            <el-form-item prop="code" style="width: 66%;float: left;">
               <span class="svg-container">
                 <svg-icon icon-class="validCode" />
               </span>
@@ -88,6 +88,9 @@
             <div class="login-code" style="cursor:pointer; width: 30%;height: 48px;float: right;background-color: #f0f1f5;">
               <img style="height: 48px;width: 100%;border: 1px solid rgba(0,0,0, 0.1);border-radius:5px;" :src="codeUrl" @click="getCode">
             </div>
+            <!-- <div prop="code" style="width: 100%;float: left;margin-bottom: 13px">
+              <el-checkbox v-model="isLdap">LDAP登陆</el-checkbox>
+            </div> -->
             <el-button :loading="loading" type="primary" style="width:100%;padding:12px 20px;margin-bottom:30px;" @click.native.prevent="handleLogin">
               <span v-if="!loading">登 录</span>
               <span v-else>登 录 中...</span>
@@ -138,7 +141,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['title', 'logo'])
+    ...mapGetters(['title', 'logo', 'isLdap'])
   },
   watch: {
     $route: {
@@ -154,6 +157,7 @@ export default {
   },
   created() {
     this.getCode()
+    // window.addEventListener('storage', this.afterQRScan)
     this.getCurrentTime()
   },
   mounted() {
@@ -165,6 +169,7 @@ export default {
   },
   destroyed() {
     clearInterval(this.timer)
+    // window.removeEventListener('storage', this.afterQRScan)
   },
   methods: {
     getCurrentTime() {

+ 3 - 1
src/views/process/list/apply-process-list.vue

@@ -137,8 +137,10 @@ export default {
 
   .process-div-title {
     font-size: 15px;
-    margin-top: 10px;
+    margin-top: 6px;
     color: #606266;
+    height: 18px;
+    line-height: 18px;
   }
 
   .process-div-remarks {

+ 152 - 146
src/views/process/list/handle.vue

@@ -1,164 +1,168 @@
 <template>
   <div class="app-container">
-    <el-card class="box-card">
-      <div class="text item">
-        <el-steps v-if="currentNode.clazz !== undefined && currentNode.clazz !== null && currentNode.clazz !== ''" :active="activeIndex" finish-status="success">
-          <template v-for="(item, index) in nodeStepList">
-            <el-step
-              v-if="item.isHideNode === false ||
-                item.isHideNode === undefined ||
-                item.isHideNode == null ||
-                item.id === processStructureValue.workOrder.current_state"
-              :key="index"
-              :title="item.label"
+    <div v-if="isLoadingStatus" />
+    <div v-else>
+      <el-card class="box-card">
+        <div class="text item">
+          <el-steps v-if="currentNode.clazz !== undefined && currentNode.clazz !== null && currentNode.clazz !== ''" :active="activeIndex" finish-status="success">
+            <template v-for="(item, index) in nodeStepList">
+              <el-step
+                v-if="item.isHideNode === false ||
+                  item.isHideNode === undefined ||
+                  item.isHideNode == null ||
+                  item.id === processStructureValue.workOrder.current_state"
+                :key="index"
+                :title="item.label"
+              />
+            </template>
+          </el-steps>
+          <div v-else>
+            <el-alert
+              show-icon
+              title="未找到当前工单流程信息,请确认当前工单绑定的流程是否存在。"
+              type="warning"
             />
-          </template>
-        </el-steps>
-        <div v-else>
-          <el-alert
-            show-icon
-            title="未找到当前工单流程信息,请确认当前工单绑定的流程是否存在。"
-            type="warning"
-          />
+          </div>
         </div>
-      </div>
-    </el-card>
+      </el-card>
 
-    <el-alert
-      v-if="activeIndex !== nodeStepList.length && processStructureValue.workOrder.is_end===1"
-      style="margin-top: 15px"
-      :title="alertMessage"
-      type="error"
-      :closable="false"
-    />
+      <el-alert
+        v-if="activeIndex !== nodeStepList.length && processStructureValue.workOrder.is_end===1"
+        style="margin-top: 15px"
+        :title="alertMessage"
+        type="error"
+        :closable="false"
+      />
 
-    <el-card class="box-card" style="margin-top: 15px">
-      <div slot="header" class="clearfix">
-        <span>公共信息</span>
-      </div>
-      <div class="text item">
-        <el-form label-width="100px">
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="标题:" style="margin-bottom: 5px">
-                <span>{{ processStructureValue.workOrder.title }}</span>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="优先级:" style="margin-bottom: 0">
-                <span v-if="processStructureValue.workOrder.priority===2">
-                  <el-tag type="warning">紧急</el-tag>
-                </span>
-                <span v-else-if="processStructureValue.workOrder.priority===3">
-                  <el-tag type="danger">非常紧急</el-tag>
-                </span>
-                <span v-else>
-                  <el-tag type="success">一般</el-tag>
-                </span>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-    </el-card>
+      <el-card class="box-card" style="margin-top: 15px">
+        <div slot="header" class="clearfix">
+          <span>公共信息</span>
+        </div>
+        <div class="text item">
+          <el-form label-width="100px">
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="标题:" style="margin-bottom: 5px">
+                  <span>{{ processStructureValue.workOrder.title }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="优先级:" style="margin-bottom: 0">
+                  <span v-if="processStructureValue.workOrder.priority===2">
+                    <el-tag type="warning">紧急</el-tag>
+                  </span>
+                  <span v-else-if="processStructureValue.workOrder.priority===3">
+                    <el-tag type="danger">非常紧急</el-tag>
+                  </span>
+                  <span v-else>
+                    <el-tag type="success">一般</el-tag>
+                  </span>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+      </el-card>
 
-    <el-card class="box-card" style="margin-top: 15px;">
-      <div slot="header" class="clearfix">
-        <span>表单信息</span>
-      </div>
-      <div class="text item">
-        <template v-for="(tplItem, tplIndex) in processStructureValue.tpls">
-          <fm-generate-form
-            v-show="currentNode.hideTpls===undefined ||
-              currentNode.hideTpls===null ||
-              currentNode.hideTpls.indexOf(tplItem.form_structure.id)===-1"
-            :key="tplIndex"
-            :ref="'generateForm-'+tplItem.id"
-            :preview="(currentNode.hideTpls!==undefined &&
-              currentNode.hideTpls!==null &&
-              currentNode.hideTpls.indexOf(tplItem.form_structure.id)!==-1) ||
-              (currentNode.writeTpls===undefined ||
-              currentNode.writeTpls===null ||
-              currentNode.writeTpls.indexOf(tplItem.form_structure.id)===-1)?true:false"
-            :remote="remoteFunc"
-            :value="tplItem.form_data"
-            :data="tplItem.form_structure"
-          />
-        </template>
-      </div>
-      <div v-if="processStructureValue.userAuthority">
-        <hr style="background-color: #d9d9d9; border:0; height:1px; margin-bottom: 15px">
-        <div>
-          <el-input
-            v-model="remarks"
-            type="textarea"
-            placeholder="请输入备注信息"
-            maxlength="200"
-            :autosize="{ minRows: 3, maxRows: 99}"
-            show-word-limit
-          />
+      <el-card class="box-card" style="margin-top: 15px;">
+        <div slot="header" class="clearfix">
+          <span>表单信息</span>
         </div>
-        <div class="text item" style="text-align: center;margin-top:18px">
-          <div
-            v-if="isActiveProcessing && currentNode.activeOrder"
-          >
-            <el-button
-              v-permisaction="['process:list:handle:active']"
-              type="primary"
-              @click="activeOrderActive"
-            >
-              主动接单
-            </el-button>
+        <div class="text item">
+          <template v-for="(tplItem, tplIndex) in processStructureValue.tpls">
+            <fm-generate-form
+              v-show="currentNode.hideTpls===undefined ||
+                currentNode.hideTpls===null ||
+                currentNode.hideTpls.indexOf(tplItem.form_structure.id)===-1"
+              :key="tplIndex"
+              :ref="'generateForm-'+tplItem.id"
+              :preview="(currentNode.hideTpls!==undefined &&
+                currentNode.hideTpls!==null &&
+                currentNode.hideTpls.indexOf(tplItem.form_structure.id)!==-1) ||
+                (currentNode.writeTpls===undefined ||
+                currentNode.writeTpls===null ||
+                currentNode.writeTpls.indexOf(tplItem.form_structure.id)===-1)||
+                (isActiveProcessing && currentNode.activeOrder)?true:false"
+              :remote="remoteFunc"
+              :value="tplItem.form_data"
+              :data="tplItem.form_structure"
+            />
+          </template>
+        </div>
+        <div v-if="processStructureValue.userAuthority">
+          <hr style="background-color: #d9d9d9; border:0; height:1px; margin-bottom: 15px">
+          <div>
+            <el-input
+              v-model="remarks"
+              type="textarea"
+              placeholder="请输入备注信息"
+              maxlength="200"
+              :autosize="{ minRows: 3, maxRows: 99}"
+              show-word-limit
+            />
           </div>
-          <div v-else>
-            <template v-for="(item, index) in processStructureValue.edges">
+          <div class="text item" style="text-align: center;margin-top:18px">
+            <div
+              v-if="isActiveProcessing && currentNode.activeOrder"
+            >
               <el-button
-                v-if="processStructureValue.workOrder.is_end===0 && item.source===currentNode.id"
-                :key="index"
+                v-permisaction="['process:list:handle:active']"
                 type="primary"
-                @click="submitAction(item)"
+                @click="activeOrderActive"
               >
-                {{ item.label }}
+                主动接单
               </el-button>
-            </template>
+            </div>
+            <div v-else>
+              <template v-for="(item, index) in processStructureValue.edges">
+                <el-button
+                  v-if="processStructureValue.workOrder.is_end===0 && item.source===currentNode.id"
+                  :key="index"
+                  type="primary"
+                  @click="submitAction(item)"
+                >
+                  {{ item.label }}
+                </el-button>
+              </template>
+            </div>
           </div>
         </div>
-      </div>
-    </el-card>
+      </el-card>
 
-    <el-card class="box-card" style="margin-top: 15px">
-      <div slot="header" class="clearfix">
-        <span>工单流转历史</span>
-      </div>
-      <div class="text item">
-        <el-table
-          :data="circulationHistoryList"
-          border
-          style="width: 100%"
-        >
-          <el-table-column
-            prop="state"
-            label="节点"
-          />
-          <el-table-column
-            prop="circulation"
-            label="流转"
-          />
-          <el-table-column
-            prop="processor"
-            label="处理人"
-          />
-          <el-table-column
-            prop="create_time"
-            label="处理时间"
-          />
-          <el-table-column
-            prop="remarks"
-            label="备注"
-          />
-        </el-table>
-      </div>
-    </el-card>
+      <el-card class="box-card" style="margin-top: 15px">
+        <div slot="header" class="clearfix">
+          <span>工单流转历史</span>
+        </div>
+        <div class="text item">
+          <el-table
+            :data="circulationHistoryList"
+            border
+            style="width: 100%"
+          >
+            <el-table-column
+              prop="state"
+              label="节点"
+            />
+            <el-table-column
+              prop="circulation"
+              label="流转"
+            />
+            <el-table-column
+              prop="processor"
+              label="处理人"
+            />
+            <el-table-column
+              prop="create_time"
+              label="处理时间"
+            />
+            <el-table-column
+              prop="remarks"
+              label="备注"
+            />
+          </el-table>
+        </div>
+      </el-card>
+    </div>
   </div>
 </template>
 
@@ -182,6 +186,7 @@ import { mapGetters } from 'vuex'
 export default {
   data() {
     return {
+      isLoadingStatus: true,
       currentNode: {
         hideTpls: null,
         writeTpls: null
@@ -270,6 +275,7 @@ export default {
             break
           }
         }
+        this.isLoadingStatus = false
         this.getAlertMessage()
       })
     },
@@ -318,7 +324,7 @@ export default {
         process_method: 'person',
         processor: [this.userId]
       }]
-      activeOrder(jsonData, this.$route.query.workOrderId).then(response => {
+      activeOrder(jsonData, this.$route.query.workOrderId).then(() => {
         this.getProcessNodeList()
       })
     }