lex 2 jaren geleden
bovenliggende
commit
3f606c83e0

+ 1 - 1
package.json

@@ -75,7 +75,7 @@
     "vue-codemirror-lite": "^1.0.4",
     "vue-count-to": "1.0.13",
     "vue-cropper": "^0.5.0",
-    "vue-i18n": "^5.0.3",
+    "vue-i18n": "^6.1.3",
     "vue-loader": "^15.9.3",
     "vue-particles": "^1.0.9",
     "vue-quill-editor": "^3.0.6",

+ 71 - 53
src/components/HeaderSearch/index.vue

@@ -1,6 +1,10 @@
 <template>
-  <div :class="{'show':show}" class="header-search">
-    <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
+  <div :class="{ show: show }" class="header-search">
+    <svg-icon
+      class-name="search-icon"
+      icon-class="search"
+      @click.stop="click"
+    />
     <el-select
       ref="headerSearchSelect"
       v-model="search"
@@ -12,7 +16,12 @@
       class="header-search-select"
       @change="change"
     >
-      <el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
+      <el-option
+        v-for="item in options"
+        :key="item.path"
+        :value="item"
+        :label="item.title.join(' > ')"
+      />
     </el-select>
   </div>
 </template>
@@ -20,62 +29,62 @@
 <script>
 // fuse is a lightweight fuzzy-search module
 // make search results more in line with expectations
-import Fuse from 'fuse.js'
-import path from 'path'
+import Fuse from "fuse.js";
+import path from "path";
 
 export default {
-  name: 'HeaderSearch',
+  name: "HeaderSearch",
   data() {
     return {
-      search: '',
+      search: "",
       options: [],
       searchPool: [],
       show: false,
-      fuse: undefined
-    }
+      fuse: undefined,
+    };
   },
   computed: {
     routes() {
-      return this.$store.getters.permission_routes
-    }
+      return this.$store.getters.permission_routes;
+    },
   },
   watch: {
     routes() {
-      this.searchPool = this.generateRoutes(this.routes)
+      this.searchPool = this.generateRoutes(this.routes);
     },
     searchPool(list) {
-      this.initFuse(list)
+      this.initFuse(list);
     },
     show(value) {
       if (value) {
-        document.body.addEventListener('click', this.close)
+        document.body.addEventListener("click", this.close);
       } else {
-        document.body.removeEventListener('click', this.close)
+        document.body.removeEventListener("click", this.close);
       }
-    }
+    },
   },
   mounted() {
-    this.searchPool = this.generateRoutes(this.routes)
+    this.searchPool = this.generateRoutes(this.routes);
   },
   methods: {
     click() {
-      this.show = !this.show
+      this.show = !this.show;
       if (this.show) {
-        this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
+        this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus();
       }
     },
     close() {
-      this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
-      this.options = []
-      this.show = false
+      this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur();
+      this.options = [];
+      this.show = false;
     },
     change(val) {
-      this.$router.push(val.path)
-      this.search = ''
-      this.options = []
+      this.$router.push(val.path);
+      this.search = "";
+      this.options = [];
       this.$nextTick(() => {
-        this.show = false
-      })
+        this.show = false;
+      });
     },
     initFuse(list) {
       this.fuse = new Fuse(list, {
@@ -85,58 +94,67 @@ export default {
         distance: 100,
         maxPatternLength: 32,
         minMatchCharLength: 1,
-        keys: [{
-          name: 'title',
-          weight: 0.7
-        }, {
-          name: 'path',
-          weight: 0.3
-        }]
-      })
+        keys: [
+          {
+            name: "title",
+            weight: 0.7,
+          },
+          {
+            name: "path",
+            weight: 0.3,
+          },
+        ],
+      });
     },
     // Filter out the routes that can be displayed in the sidebar
     // And generate the internationalized title
-    generateRoutes(routes, basePath = '/', prefixTitle = []) {
-      let res = []
+    generateRoutes(routes, basePath = "/", prefixTitle = []) {
+      let res = [];
 
       for (const router of routes) {
         // skip hidden router
-        if (router.hidden) { continue }
+        if (router.hidden) {
+          continue;
+        }
 
         const data = {
           path: path.resolve(basePath, router.path),
-          title: [...prefixTitle]
-        }
+          title: [...prefixTitle],
+        };
 
         if (router.meta && router.meta.title) {
-          data.title = [...data.title, router.meta.title]
+          data.title = [...data.title, router.meta.title];
 
-          if (router.redirect !== 'noRedirect') {
+          if (router.redirect !== "noRedirect") {
             // only push the routes with title
             // special case: need to exclude parent router without redirect
-            res.push(data)
+            res.push(data);
           }
         }
 
         // recursive child routes
         if (router.children) {
-          const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
+          const tempRoutes = this.generateRoutes(
+            router.children,
+            data.path,
+            data.title
+          );
           if (tempRoutes.length >= 1) {
-            res = [...res, ...tempRoutes]
+            res = [...res, ...tempRoutes];
           }
         }
       }
-      return res
+      return res;
     },
     querySearch(query) {
-      if (query !== '') {
-        this.options = this.fuse.search(query)
+      if (query !== "") {
+        this.options = this.fuse.search(query);
       } else {
-        this.options = []
+        this.options = [];
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -159,7 +177,7 @@ export default {
     display: inline-block;
     vertical-align: middle;
 
-    /deep/ .el-input__inner {
+    :deep(.el-input__inner) {
       border-radius: 0;
       border: 0;
       padding-left: 0;

+ 13 - 19
src/components/Tinymce/components/EditorImage.vue

@@ -21,16 +21,10 @@
         action="https://httpbin.org/post"
         list-type="picture-card"
       >
-        <el-button size="small" type="primary">
-          Click upload
-        </el-button>
+        <el-button size="small" type="primary"> Click upload </el-button>
       </el-upload>
-      <el-button @click="dialogVisible = false">
-        Cancel
-      </el-button>
-      <el-button type="primary" @click="handleSubmit">
-        Confirm
-      </el-button>
+      <el-button @click="dialogVisible = false"> Cancel </el-button>
+      <el-button type="primary" @click="handleSubmit"> Confirm </el-button>
     </el-dialog>
   </div>
 </template>
@@ -43,24 +37,24 @@ export default {
   props: {
     color: {
       type: String,
-      default: "#1890ff"
-    }
+      default: "#1890ff",
+    },
   },
   data() {
     return {
       dialogVisible: false,
       listObj: {},
-      fileList: []
+      fileList: [],
     };
   },
   methods: {
     checkAllSuccess() {
       return Object.keys(this.listObj).every(
-        item => this.listObj[item].hasSuccess
+        (item) => this.listObj[item].hasSuccess
       );
     },
     handleSubmit() {
-      const arr = Object.keys(this.listObj).map(v => this.listObj[v]);
+      const arr = Object.keys(this.listObj).map((v) => this.listObj[v]);
       if (!this.checkAllSuccess()) {
         this.$message(
           "Please wait for all images to be uploaded successfully. If there is a network problem, please refresh the page and upload again!"
@@ -101,25 +95,25 @@ export default {
       return new Promise((resolve, reject) => {
         const img = new Image();
         img.src = _URL.createObjectURL(file);
-        img.onload = function() {
+        img.onload = function () {
           _self.listObj[fileName] = {
             hasSuccess: false,
             uid: file.uid,
             width: this.width,
-            height: this.height
+            height: this.height,
           };
         };
         resolve(true);
       });
-    }
-  }
+    },
+  },
 };
 </script>
 
 <style lang="scss" scoped>
 .editor-slide-upload {
   margin-bottom: 20px;
-  /deep/ .el-upload--picture-card {
+  :deep(.el-upload--picture-card) {
     width: 100%;
   }
 }

File diff suppressed because it is too large
+ 579 - 209
src/components/VueFormMaking/components/WidgetConfig.vue


+ 65 - 60
src/components/VueFormMaking/index.js

@@ -1,79 +1,84 @@
-import VueI18n from 'vue-i18n'
-import 'normalize.css/normalize.css'
+import VueI18n from "vue-i18n";
+import "normalize.css/normalize.css";
 
-import MakingForm from './components/Container.vue'
-import GenerateForm from './components/GenerateForm.vue'
+import MakingForm from "./components/Container.vue";
+import GenerateForm from "./components/GenerateForm.vue";
 
-import enUS from './lang/en-US'
-import zhCN from './lang/zh-CN'
+import enUS from "./lang/en-US";
+import zhCN from "./lang/zh-CN";
 
-import './iconfont/iconfont.css'
-import './styles/cover.scss'
-import './styles/index.scss'
+import "./iconfont/iconfont.css";
+import "./styles/cover.scss";
+import "./styles/index.scss";
 
-const loadLang = function(Vue, lang, locale, i18n) {
+const loadLang = function (Vue, lang, locale, i18n) {
+  console.log(locale, "locale");
+  console.log(i18n, "i18n");
   if (locale) {
-    locale('en-US', { ...locale('en-US'), ...enUS })
-    locale('zh-CN', { ...locale('zh-CN'), ...zhCN })
-    Vue.config.lang = lang
+    locale("en-US", { ...locale("en-US"), ...enUS });
+    locale("zh-CN", { ...locale("zh-CN"), ...zhCN });
+    Vue.config.lang = lang;
   } else if (i18n) {
-    i18n.setLocaleMessage('en-US', { ...i18n.messages['en-US'], ...enUS })
-    i18n.setLocaleMessage('zh-CN', { ...i18n.messages['zh-CN'], ...zhCN })
-    i18n.locale = lang
+    i18n.setLocaleMessage("en-US", { ...i18n.messages["en-US"], ...enUS });
+    i18n.setLocaleMessage("zh-CN", { ...i18n.messages["zh-CN"], ...zhCN });
+    i18n.locale = lang;
   } else {
-    Vue.use(VueI18n)
-    Vue.locale('en-US', { ...Vue.locale('en-US'), ...enUS })
-    Vue.locale('zh-CN', { ...Vue.locale('zh-CN'), ...zhCN })
-    Vue.config.lang = lang
+    Vue.use(VueI18n);
+    console.log(Vue, "Vue", Vue.config);
+    Vue.locale("en-US", { ...Vue.locale("en-US"), ...enUS });
+    Vue.locale("zh-CN", { ...Vue.locale("zh-CN"), ...zhCN });
+    Vue.config.lang = lang;
   }
-}
+};
 
-MakingForm.install = function(Vue, opts = {
-  lang: 'zh-CN',
-  locale: null,
-  i18n: null
-}) {
-  loadLang(Vue, opts.lang, opts.locale, opts.i18n)
-  Vue.component(MakingForm.name, MakingForm)
-}
+MakingForm.install = function (
+  Vue,
+  opts = {
+    lang: "zh-CN",
+    locale: null,
+    i18n: null,
+  }
+) {
+  loadLang(Vue, opts.lang, opts.locale, opts.i18n);
+  Vue.component(MakingForm.name, MakingForm);
+};
 
-GenerateForm.install = function(Vue, opts = {
-  lang: 'zh-CN',
-  locale: null,
-  i18n: null
-}) {
-  loadLang(Vue, opts.lang, opts.locale, opts.i18n)
-  Vue.component(GenerateForm.name, GenerateForm)
-}
+GenerateForm.install = function (
+  Vue,
+  opts = {
+    lang: "zh-CN",
+    locale: null,
+    i18n: null,
+  }
+) {
+  loadLang(Vue, opts.lang, opts.locale, opts.i18n);
+  Vue.component(GenerateForm.name, GenerateForm);
+};
 
-const components = [
-  MakingForm,
-  GenerateForm
-]
+const components = [MakingForm, GenerateForm];
 
-const install = function(Vue, opts = {
-  lang: 'zh-CN',
-  locale: null,
-  i18n: null
-}) {
-  loadLang(Vue, opts.lang, opts.locale, opts.i18n)
-  components.forEach(component => {
-    Vue.component(component.name, component)
-  })
-}
+const install = function (
+  Vue,
+  opts = {
+    lang: "zh-CN",
+    locale: null,
+    i18n: null,
+  }
+) {
+  loadLang(Vue, opts.lang, opts.locale, opts.i18n);
+  components.forEach((component) => {
+    Vue.component(component.name, component);
+  });
+};
 
-if (typeof window !== 'undefined' && window.Vue) {
-  install(window.Vue)
+if (typeof window !== "undefined" && window.Vue) {
+  install(window.Vue);
 }
 
-export {
-  install,
-  MakingForm,
-  GenerateForm
-}
+export { install, MakingForm, GenerateForm };
 
 export default {
   install,
   MakingForm,
-  GenerateForm
-}
+  GenerateForm,
+};

+ 34 - 34
src/components/VueFormMaking/main.js

@@ -1,51 +1,51 @@
-import Vue from 'vue'
-import App from './App.vue'
-import router from './router'
-import ElementUI from 'element-ui'
-import VueI18n from 'vue-i18n'
-import VueEditor from 'vue2-editor'
+import Vue from "vue";
+import App from "./App.vue";
+import router from "./router";
+import ElementUI from "element-ui";
+import VueI18n from "vue-i18n";
+import VueEditor from "vue2-editor";
 
-import 'element-ui/lib/theme-chalk/index.css'
+import "element-ui/lib/theme-chalk/index.css";
 
-import enLocale from 'element-ui/lib/locale/lang/en'
-import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
+import enLocale from "element-ui/lib/locale/lang/en";
+import zhLocale from "element-ui/lib/locale/lang/zh-CN";
 
-Vue.use(VueI18n)
-Vue.use(VueEditor)
+Vue.use(VueI18n);
+Vue.use(VueEditor);
 
 const messages = {
-  'en-US': {
+  "en-US": {
     header: {
-      title: 'FormMaking',
-      document: 'Docs',
-      pricing: 'Pricing',
-      advanced: 'Advanced'
-    }
+      title: "FormMaking",
+      document: "Docs",
+      pricing: "Pricing",
+      advanced: "Advanced",
+    },
   },
-  'zh-CN': {
+  "zh-CN": {
     header: {
-      title: '表单设计器',
-      document: '使用文档',
-      pricing: '商业授权',
-      advanced: '高级版本'
-    }
-  }
-}
+      title: "表单设计器",
+      document: "使用文档",
+      pricing: "商业授权",
+      advanced: "高级版本",
+    },
+  },
+};
 
-Vue.locale('en-US', { ...enLocale, ...messages['en-US'] })
-Vue.locale('zh-CN', { ...zhLocale, ...messages['zh-CN'] })
-Vue.config.lang = 'zh-CN'
+Vue.locale("en-US", { ...enLocale, ...messages["en-US"] });
+Vue.locale("zh-CN", { ...zhLocale, ...messages["zh-CN"] });
+Vue.config.lang = "zh-CN";
 
-Vue.use(ElementUI, { size: 'small' })
+Vue.use(ElementUI, { size: "small" });
 
 // import 'form-making/dist/FormMaking.css'
 // import FormMaking from 'form-making'
-import FormMaking from './index'
-Vue.use(FormMaking)
+import FormMaking from "./index";
+Vue.use(FormMaking);
 
-Vue.config.productionTip = false
+Vue.config.productionTip = false;
 
 new Vue({
   router,
-  render: h => h(App)
-}).$mount('#app')
+  render: (h) => h(App),
+}).$mount("#app");

+ 47 - 38
src/layout/components/TagsView/ScrollPane.vue

@@ -1,70 +1,81 @@
 <template>
-  <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
+  <el-scrollbar
+    ref="scrollContainer"
+    :vertical="false"
+    class="scroll-container"
+    @wheel.native.prevent="handleScroll"
+  >
     <slot />
   </el-scrollbar>
 </template>
 
 <script>
-const tagAndTagSpacing = 4 // tagAndTagSpacing
+const tagAndTagSpacing = 4; // tagAndTagSpacing
 
 export default {
-  name: 'ScrollPane',
+  name: "ScrollPane",
   data() {
     return {
-      left: 0
-    }
+      left: 0,
+    };
   },
   computed: {
     scrollWrapper() {
-      return this.$refs.scrollContainer.$refs.wrap
-    }
+      return this.$refs.scrollContainer.$refs.wrap;
+    },
   },
   methods: {
     handleScroll(e) {
-      const eventDelta = e.wheelDelta || -e.deltaY * 40
-      const $scrollWrapper = this.scrollWrapper
-      $scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4
+      const eventDelta = e.wheelDelta || -e.deltaY * 40;
+      const $scrollWrapper = this.scrollWrapper;
+      $scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4;
     },
     moveToTarget(currentTag) {
-      const $container = this.$refs.scrollContainer.$el
-      const $containerWidth = $container.offsetWidth
-      const $scrollWrapper = this.scrollWrapper
-      const tagList = this.$parent.$refs.tag
+      const $container = this.$refs.scrollContainer.$el;
+      const $containerWidth = $container.offsetWidth;
+      const $scrollWrapper = this.scrollWrapper;
+      const tagList = this.$parent.$refs.tag;
 
-      let firstTag = null
-      let lastTag = null
+      let firstTag = null;
+      let lastTag = null;
 
       // find first tag and last tag
       if (tagList.length > 0) {
-        firstTag = tagList[0]
-        lastTag = tagList[tagList.length - 1]
+        firstTag = tagList[0];
+        lastTag = tagList[tagList.length - 1];
       }
 
       if (firstTag === currentTag) {
-        $scrollWrapper.scrollLeft = 0
+        $scrollWrapper.scrollLeft = 0;
       } else if (lastTag === currentTag) {
-        $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth
+        $scrollWrapper.scrollLeft =
+          $scrollWrapper.scrollWidth - $containerWidth;
       } else {
         // find preTag and nextTag
-        const currentIndex = tagList.findIndex(item => item === currentTag)
-        const prevTag = tagList[currentIndex - 1]
-        const nextTag = tagList[currentIndex + 1]
+        const currentIndex = tagList.findIndex((item) => item === currentTag);
+        const prevTag = tagList[currentIndex - 1];
+        const nextTag = tagList[currentIndex + 1];
 
         // the tag's offsetLeft after of nextTag
-        const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing
+        const afterNextTagOffsetLeft =
+          nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing;
 
         // the tag's offsetLeft before of prevTag
-        const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing
+        const beforePrevTagOffsetLeft =
+          prevTag.$el.offsetLeft - tagAndTagSpacing;
 
-        if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {
-          $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth
+        if (
+          afterNextTagOffsetLeft >
+          $scrollWrapper.scrollLeft + $containerWidth
+        ) {
+          $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth;
         } else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {
-          $scrollWrapper.scrollLeft = beforePrevTagOffsetLeft
+          $scrollWrapper.scrollLeft = beforePrevTagOffsetLeft;
         }
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -73,13 +84,11 @@ export default {
   position: relative;
   overflow: hidden;
   width: 100%;
-  /deep/ {
-    .el-scrollbar__bar {
-      bottom: 0px;
-    }
-    .el-scrollbar__wrap {
-      height: 49px;
-    }
+  :deep(.el-scrollbar__bar) {
+    bottom: 0px;
+  }
+  :deep(.el-scrollbar__wrap) {
+    height: 49px;
   }
 }
 </style>

+ 143 - 82
src/views/dashboard/admin/index.vue

@@ -1,34 +1,70 @@
 <template>
   <div class="dashboard-editor-container">
     <el-row :gutter="12">
-      <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }">
+      <el-col
+        :sm="24"
+        :xs="24"
+        :md="6"
+        :xl="6"
+        :lg="6"
+        :style="{ marginBottom: '12px' }"
+      >
         <chart-card>
           <template #title>
-            <span style="color: #1890ff;position: relative;">我的待办 <i :class="dashboardValue.count.upcoming > 0 ? 'myUpcoming' : null" class="dot"></i></span>
+            <span style="color: #1890ff; position: relative"
+              >我的待办
+              <i
+                :class="dashboardValue.count.upcoming > 0 ? 'myUpcoming' : null"
+                class="dot"
+              ></i
+            ></span>
           </template>
           <template #total>
-            <router-link to="/process/upcoming">{{ dashboardValue.count.upcoming }}</router-link>
+            <router-link to="/process/upcoming">{{
+              dashboardValue.count.upcoming
+            }}</router-link>
           </template>
           <!-- <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start">
             <i class="el-icon-warning-outline" />
           </el-tooltip> -->
         </chart-card>
       </el-col>
-      <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }">
+      <el-col
+        :sm="24"
+        :xs="24"
+        :md="6"
+        :xl="6"
+        :lg="6"
+        :style="{ marginBottom: '12px' }"
+      >
         <chart-card title="工单总数" :total="dashboardValue.count.all">
           <!-- <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start">
             <i class="el-icon-warning-outline" />
           </el-tooltip> -->
         </chart-card>
       </el-col>
-      <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }">
+      <el-col
+        :sm="24"
+        :xs="24"
+        :md="6"
+        :xl="6"
+        :lg="6"
+        :style="{ marginBottom: '12px' }"
+      >
         <chart-card title="我创建的" :total="dashboardValue.count.my_create">
           <!-- <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start">
             <i class="el-icon-warning-outline" />
           </el-tooltip> -->
         </chart-card>
       </el-col>
-      <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }">
+      <el-col
+        :sm="24"
+        :xs="24"
+        :md="6"
+        :xl="6"
+        :lg="6"
+        :style="{ marginBottom: '12px' }"
+      >
         <chart-card title="我相关的" :total="dashboardValue.count.related">
           <!-- <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start">
             <i class="el-icon-warning-outline" />
@@ -37,7 +73,11 @@
       </el-col>
     </el-row>
 
-    <el-card :bordered="false" :body-style="{padding: '5'}" :style="{ marginBottom: '12px', textAlign: 'center' }">
+    <el-card
+      :bordered="false"
+      :body-style="{ padding: '5' }"
+      :style="{ marginBottom: '12px', textAlign: 'center' }"
+    >
       <el-date-picker
         v-model="querys"
         type="daterange"
@@ -51,10 +91,16 @@
       />
     </el-card>
 
-    <el-card :bordered="false" :body-style="{padding: '0'}" :style="{ marginBottom: '12px' }">
+    <el-card
+      :bordered="false"
+      :body-style="{ padding: '0' }"
+      :style="{ marginBottom: '12px' }"
+    >
       <div class="salesCard">
         <div>
-          <h4 :style="{ marginBottom: '20px' }" style="margin-left: 20px;">提交工单统计</h4>
+          <h4 :style="{ marginBottom: '20px' }" style="margin-left: 20px">
+            提交工单统计
+          </h4>
           <RangeSubmit :statistics-data="dashboardValue.submit" />
         </div>
       </div>
@@ -62,23 +108,32 @@
 
     <el-row>
       <el-col :span="8">
-        <el-card :bordered="false" :body-style="{padding: '0'}">
+        <el-card :bordered="false" :body-style="{ padding: '0' }">
           <div class="salesCard leaderboard">
-            <rank-list title="热门流程排行榜 Top 10" :list="dashboardValue.ranks" />
+            <rank-list
+              title="热门流程排行榜 Top 10"
+              :list="dashboardValue.ranks"
+            />
           </div>
         </el-card>
       </el-col>
-      <el-col :span="8" style="padding-left: 12px;">
-        <el-card :bordered="false" :body-style="{padding: '0'}">
+      <el-col :span="8" style="padding-left: 12px">
+        <el-card :bordered="false" :body-style="{ padding: '0' }">
           <div class="salesCard leaderboard">
-            <HandleRank title="处理工单人员排行榜" :list="dashboardValue.handle" />
+            <HandleRank
+              title="处理工单人员排行榜"
+              :list="dashboardValue.handle"
+            />
           </div>
         </el-card>
       </el-col>
-      <el-col :span="8" style="padding-left: 12px;">
-        <el-card :bordered="false" :body-style="{padding: '0'}">
+      <el-col :span="8" style="padding-left: 12px">
+        <el-card :bordered="false" :body-style="{ padding: '0' }">
           <div class="salesCard leaderboard">
-            <HandlePeriod title="工单处理耗时排行榜" :list="dashboardValue.period" />
+            <HandlePeriod
+              title="工单处理耗时排行榜"
+              :list="dashboardValue.period"
+            />
           </div>
         </el-card>
       </el-col>
@@ -87,87 +142,94 @@
 </template>
 
 <script>
-import ChartCard from './components/ChartCard'
-import RankList from './components/RankList/index'
-import RangeSubmit from './components/RangeSubmit'
-import HandleRank from './components/HandleRank'
-import HandlePeriod from './components/HandlePeriod'
-import { initNumberHtml } from '@/utils/costum'
+import ChartCard from "./components/ChartCard";
+import RankList from "./components/RankList/index";
+import RangeSubmit from "./components/RangeSubmit";
+import HandleRank from "./components/HandleRank";
+import HandlePeriod from "./components/HandlePeriod";
+import { initNumberHtml } from "@/utils/costum";
 
-import { initData } from '@/api/dashboard'
+import { initData } from "@/api/dashboard";
 
 export default {
-  name: 'DashboardAdmin',
+  name: "DashboardAdmin",
   components: {
     ChartCard,
     RankList,
     RangeSubmit,
     HandleRank,
-    HandlePeriod
+    HandlePeriod,
   },
   data() {
     return {
       dashboardValue: {
-        count: {}
+        count: {},
       },
       rankList: [],
       submitData: [],
-      querys: '',
+      querys: "",
       queryList: {},
       pickerOptions: {
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-            picker.$emit('pick', [start, end])
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date()
-            const start = new Date()
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-            picker.$emit('pick', [start, end])
-          }
-        }]
-      }
-    }
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+    };
   },
   created() {
-    this.getInitData()
+    this.getInitData();
   },
   methods: {
     async getInitData() {
-      await initData(this.queryList).then(response => {
-        this.dashboardValue = response.data
-      })
+      await initData(this.queryList).then((response) => {
+        this.dashboardValue = response.data;
+      });
       // 添加我的代办显示数据
-      if(this.dashboardValue.count.upcoming && this.dashboardValue.count.upcoming > 0) {
-        initNumberHtml(this.dashboardValue.count.upcoming)
+      if (
+        this.dashboardValue.count.upcoming &&
+        this.dashboardValue.count.upcoming > 0
+      ) {
+        initNumberHtml(this.dashboardValue.count.upcoming);
       }
     },
     timeScreening() {
       if (this.querys && this.querys.length > 1) {
-        this.queryList.start_time = this.querys[0]
-        this.queryList.end_time = this.querys[1]
+        this.queryList.start_time = this.querys[0];
+        this.queryList.end_time = this.querys[1];
       } else {
-        this.queryList.start_time = null
-        this.queryList.end_time = null
+        this.queryList.start_time = null;
+        this.queryList.end_time = null;
       }
-      this.getInitData()
-    }
-  }
-}
+      this.getInitData();
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -190,13 +252,13 @@ export default {
   }
 }
 
-/deep/ .el-tabs__item{
-   padding-left: 16px!important;
-   height: 50px;
-   line-height: 50px;
+:deep(.el-tabs__item) {
+  padding-left: 16px !important;
+  height: 50px;
+  line-height: 50px;
 }
 
-@media (max-width:1024px) {
+@media (max-width: 1024px) {
   .chart-wrapper {
     padding: 8px;
   }
@@ -218,13 +280,12 @@ export default {
 }
 .dot {
 }
-@keyframes flash{
-    from {
-        opacity: 0;
-    }
-    to {
-        opacity: 1;
-    }
+@keyframes flash {
+  from {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
 }
-
 </style>

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

@@ -110,7 +110,7 @@
             <el-button
               :loading="loading"
               type="primary"
-              style="width:100%;padding:12px 20px;margin-bottom:30px;"
+              style="width: 100%; padding: 12px 20px; margin-bottom: 30px"
               @click.native.prevent="handleLogin"
             >
               <span v-if="!loading">登 录</span>
@@ -155,38 +155,38 @@ export default {
         rememberMe: false,
         code: "",
         uuid: "",
-        loginType: 1
+        loginType: 1,
       },
       loginRules: {
         username: [
-          { required: true, trigger: "blur", validator: validateUsername }
+          { required: true, trigger: "blur", validator: validateUsername },
         ],
         password: [
-          { required: true, trigger: "blur", validator: validatePassword }
-        ]
+          { required: true, trigger: "blur", validator: validatePassword },
+        ],
       },
       passwordType: "password",
       capsTooltip: false,
       loading: false,
       redirect: undefined,
       otherQuery: {},
-      currentTime: null
+      currentTime: null,
     };
   },
   computed: {
-    ...mapGetters(["title", "logo", "isLdap"])
+    ...mapGetters(["title", "logo", "isLdap"]),
   },
   watch: {
     $route: {
-      handler: function(route) {
+      handler: function (route) {
         const query = route.query;
         if (query) {
           this.redirect = query.redirect;
           this.otherQuery = this.getOtherQuery(query);
         }
       },
-      immediate: true
-    }
+      immediate: true,
+    },
   },
   created() {
     // this.getCode()
@@ -206,12 +206,12 @@ export default {
   },
   methods: {
     getCurrentTime() {
-      this.timer = setInterval(_ => {
+      this.timer = setInterval((_) => {
         this.currentTime = moment().format("YYYY-MM-DD HH时mm分ss秒");
       }, 1000);
     },
     getCode() {
-      getCodeImg().then(res => {
+      getCodeImg().then((res) => {
         if (res !== undefined) {
           this.codeUrl = res.data;
           this.loginForm.uuid = res.id;
@@ -244,7 +244,7 @@ export default {
       });
     },
     handleLogin() {
-      this.$refs.loginForm.validate(valid => {
+      this.$refs.loginForm.validate((valid) => {
         if (valid) {
           if (this.isLdap) {
             this.loginForm.loginType = 1;
@@ -276,8 +276,8 @@ export default {
         }
         return acc;
       }, {});
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -411,7 +411,7 @@ $cursor: #fff;
 
 /* reset element-ui css */
 .login-container {
-  /deep/ .el-input {
+  :deep(.el-input) {
     display: inline-block;
     height: 47px;
     width: 85%;

+ 51 - 51
src/views/process/admin/process-manager.vue

@@ -140,7 +140,7 @@
         :before-close="handleClose"
         size="90%"
       >
-        <div v-if="open" class="tpl-create-content" style="margin-right: 15px;">
+        <div v-if="open" class="tpl-create-content" style="margin-right: 15px">
           <el-form
             ref="ruleForm"
             :model="ruleForm"
@@ -238,7 +238,7 @@
               />
             </el-form-item>
             <el-form-item label="流程" prop="structure">
-              <div style="border-radius: 4px; overflow:hidden">
+              <div style="border-radius: 4px; overflow: hidden">
                 <div>
                   <WfdDesign
                     v-if="wfdDesignRefresh"
@@ -260,7 +260,7 @@
             </el-form-item>
           </el-form>
           <div
-            style="text-align: center; margin-top: 20px; margin-bottom: 20px;"
+            style="text-align: center; margin-top: 20px; margin-bottom: 20px"
           >
             <el-button
               type="primary"
@@ -286,7 +286,7 @@ import {
   updateProcess,
   processDetails,
   deleteProcess,
-  cloneProcess
+  cloneProcess,
 } from "@/api/process/admin/process";
 import SaveForm from "@/components/save-form";
 import { classifyList } from "@/api/process/admin/classify";
@@ -302,7 +302,7 @@ export default {
   name: "Process",
   components: {
     WfdDesign: () => import("@/components/wfd/components/Wfd"),
-    SaveForm
+    SaveForm,
   },
   data() {
     return {
@@ -335,25 +335,25 @@ export default {
       processValueList: [],
       listQuery: {
         page: 1,
-        per_page: 10
+        per_page: 10,
       },
       lang: "zh",
       ruleForm: {},
       rules: {
         icon: [
-          { required: true, message: "请输入流程图标", trigger: "change" }
+          { required: true, message: "请输入流程图标", trigger: "change" },
         ],
         name: [{ required: true, message: "请输入流程名称", trigger: "blur" }],
         classify: [
-          { required: true, message: "请选择流程分类", trigger: "change" }
+          { required: true, message: "请选择流程分类", trigger: "change" },
         ],
         tpls: [{ required: true, message: "请选择模版", trigger: "change" }],
         sub: [{ required: true, message: "请选择模版类型", trigger: "change" }],
         structure: [{ required: true, message: "请设计流程", trigger: "blur" }],
         remarks: [
-          { required: true, message: "请输入流程描述", trigger: "blur" }
-        ]
-      }
+          { required: true, message: "请输入流程描述", trigger: "blur" },
+        ],
+      },
     };
   },
   mounted() {
@@ -364,20 +364,20 @@ export default {
     async getTaskList() {
       await taskList({
         page: 1,
-        per_page: 99999
-      }).then(response => {
+        per_page: 99999,
+      }).then((response) => {
         this.taskListData = response.data.data;
       });
     },
     async getProcessList() {
       await processList({
         page: 1,
-        per_page: 99999
+        per_page: 99999,
       })
-        .then(response => {
+        .then((response) => {
           const tempList = response.data.data || [];
           const subList = [];
-          tempList.forEach(item => {
+          tempList.forEach((item) => {
             if (item.sub == 1) {
               subList.push(item);
             }
@@ -392,9 +392,9 @@ export default {
     async getClassifyList() {
       await classifyList({
         page: 1,
-        per_page: 99999
+        per_page: 99999,
       })
-        .then(response => {
+        .then((response) => {
           this.classifyListData = response.data.data;
         })
         .catch(() => {
@@ -405,9 +405,9 @@ export default {
     async getTemplates() {
       await templateList({
         page: 1,
-        per_page: 99999
+        per_page: 99999,
       })
-        .then(response => {
+        .then((response) => {
           this.templates = response.data.data;
         })
         .catch(() => {
@@ -417,9 +417,9 @@ export default {
     // 获取用户
     async getUsers() {
       await listUser({
-        pageSize: 999999
+        pageSize: 999999,
       })
-        .then(response => {
+        .then((response) => {
           this.users = response.data.list;
         })
         .catch(() => {
@@ -428,9 +428,9 @@ export default {
     },
     async getRoles() {
       await listRole({
-        pageSize: 999999
+        pageSize: 999999,
       })
-        .then(response => {
+        .then((response) => {
           this.roles = response.data.list;
         })
         .catch(() => {
@@ -440,7 +440,7 @@ export default {
     // 获取部门
     async getDepartments() {
       await treeselect()
-        .then(response => {
+        .then((response) => {
           this.departments = response.data;
         })
         .catch(() => {
@@ -451,9 +451,9 @@ export default {
     async getPostOptions() {
       await listPost({
         page: 1,
-        pageSize: 99999
+        pageSize: 99999,
       })
-        .then(response => {
+        .then((response) => {
           this.postOptions = response.data.list;
         })
         .catch(() => {
@@ -465,7 +465,7 @@ export default {
       this.loading = true;
       this.listQuery.page = this.queryParams.pageIndex;
       this.listQuery.per_page = this.queryParams.pageSize;
-      processList(this.listQuery).then(response => {
+      processList(this.listQuery).then((response) => {
         this.processValueList = response.data.data;
         this.queryParams.pageIndex = response.data.page;
         this.queryParams.pageSize = response.data.per_page;
@@ -496,7 +496,7 @@ export default {
         notice: [1],
         sub: 0,
         icon: "",
-        remarks: ""
+        remarks: "",
       };
       this.dialogProcessVisibleName = 1;
       this.open = true;
@@ -512,8 +512,8 @@ export default {
       load.endLoading();
       this.wfdDesignRefresh = false;
       await processDetails({
-        processId: row.id
-      }).then(response => {
+        processId: row.id,
+      }).then((response) => {
         this.ruleForm = {
           id: response.data.id,
           name: response.data.name,
@@ -524,7 +524,7 @@ export default {
           notice: response.data.notice,
           sub: response.data.sub,
           icon: response.data.icon,
-          remarks: response.data.remarks
+          remarks: response.data.remarks,
         };
         this.wfdDesignRefresh = false;
         this.$nextTick(() => {
@@ -535,13 +535,13 @@ export default {
     },
     handleClose(done) {
       this.$confirm("确认关闭?")
-        .then(_ => {
+        .then((_) => {
           this.open = false;
           if (done) {
             done();
           }
         })
-        .catch(_ => {});
+        .catch((_) => {});
     },
     verifyProcess(structureValue) {
       // console.log(structureValue)
@@ -587,7 +587,7 @@ export default {
       return "";
     },
     submitForm(formName) {
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate((valid) => {
         if (valid) {
           var structureValue = this.$refs.wfd.graph.save();
           for (var n of structureValue.nodes) {
@@ -614,7 +614,7 @@ export default {
             structureValue.edges.length > 0
           ) {
             this.ruleForm.structure = structureValue;
-            createProcess(this.ruleForm).then(response => {
+            createProcess(this.ruleForm).then((response) => {
               this.getList();
               this.open = false;
             });
@@ -625,7 +625,7 @@ export default {
       });
     },
     editForm(formName) {
-      this.$refs[formName].validate(valid => {
+      this.$refs[formName].validate((valid) => {
         if (valid) {
           var structureValue = this.$refs.wfd.graph.save();
           for (var n of structureValue.nodes) {
@@ -661,8 +661,8 @@ export default {
               notice: this.ruleForm.notice,
               sub: this.ruleForm.sub,
               icon: this.ruleForm.icon,
-              remarks: this.ruleForm.remarks
-            }).then(response => {
+              remarks: this.ruleForm.remarks,
+            }).then((response) => {
               this.getList();
               this.open = false;
             });
@@ -670,7 +670,7 @@ export default {
             this.$notify({
               title: "错误",
               message: "没有流程数据,请完善流程",
-              type: "error"
+              type: "error",
             });
           }
         }
@@ -685,17 +685,17 @@ export default {
       this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           deleteProcess({
-            processId: row.id
-          }).then(response => {
+            processId: row.id,
+          }).then((response) => {
             if (response !== undefined) {
               this.getList();
               this.$message({
                 type: "success",
-                message: "流程已删除!"
+                message: "流程已删除!",
               });
             }
           });
@@ -703,7 +703,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
@@ -719,30 +719,30 @@ export default {
       this.$confirm(`确认克隆流程 < ${row.name} > ?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "info"
+        type: "info",
       })
         .then(() => {
           cloneProcess(row.id).then(() => {
             this.getList();
             this.$message({
               type: "success",
-              message: "流程已克隆!"
+              message: "流程已克隆!",
             });
           });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消"
+            message: "已取消",
           });
         });
-    }
-  }
+    },
+  },
 };
 </script>
 
 <style scoped>
-/deep/.el-drawer__body {
+:deep(.el-drawer__body) {
   overflow-y: auto;
 }
 </style>

+ 101 - 117
src/views/process/list/handle.vue

@@ -5,7 +5,7 @@
       <el-alert
         v-if="
           activeIndex !== nodeStepList.length &&
-            processStructureValue.workOrder.is_end === 1
+          processStructureValue.workOrder.is_end === 1
         "
         style="margin-top: 15px"
         :title="alertMessage"
@@ -59,8 +59,8 @@
             <fm-generate-form
               v-show="
                 currentNode.hideTpls === undefined ||
-                  currentNode.hideTpls === null ||
-                  currentNode.hideTpls.indexOf(tplItem.form_structure.id) === -1
+                currentNode.hideTpls === null ||
+                currentNode.hideTpls.indexOf(tplItem.form_structure.id) === -1
               "
               :key="tplIndex"
               :ref="'generateForm-' + tplItem.id"
@@ -75,13 +75,13 @@
         <hr
           v-if="is_end == 0"
           style="
-              background-color: #d9d9d9;
-              border: 0;
-              height: 1px;
-              margin-bottom: 15px;
-            "
+            background-color: #d9d9d9;
+            border: 0;
+            height: 1px;
+            margin-bottom: 15px;
+          "
         />
-        <div class="text item" style="margin-top: 18px; text-align: center;">
+        <div class="text item" style="margin-top: 18px; text-align: center">
           <!-- 只要没有结束就可以评论 -->
           <el-button round type="info" @click="handleCommit" v-if="is_end == 0"
             >评论</el-button
@@ -124,8 +124,8 @@
           <el-timeline
             v-if="
               currentNode.clazz !== undefined &&
-                currentNode.clazz !== null &&
-                currentNode.clazz !== ''
+              currentNode.clazz !== null &&
+              currentNode.clazz !== ''
             "
           >
             <el-timeline-item
@@ -155,7 +155,7 @@
                   <template
                     v-if="
                       item.assignUsers[0].userId == userInfo.userId &&
-                        activeIndex == index
+                      activeIndex == index
                     "
                   >
                     我(审批中)
@@ -196,14 +196,14 @@
                   class="imgUploader"
                   v-if="
                     item.fileUrl &&
-                      item.fileUrl.file &&
-                      item.fileUrl.image.length > 0
+                    item.fileUrl.file &&
+                    item.fileUrl.image.length > 0
                   "
                 >
                   <el-image
                     v-for="(file, index) in item.fileUrl.image"
                     :key="index"
-                    style="width: 40px; height: 40px; margin-right: 12px;"
+                    style="width: 40px; height: 40px; margin-right: 12px"
                     :src="file"
                     :preview-src-list="item.fileUrl.image"
                   >
@@ -213,8 +213,8 @@
                 <div
                   v-if="
                     item.fileUrl &&
-                      item.fileUrl.file &&
-                      item.fileUrl.file.length > 0
+                    item.fileUrl.file &&
+                    item.fileUrl.file.length > 0
                   "
                 >
                   <div
@@ -223,8 +223,8 @@
                     style="margin-bottom: 3px"
                     class="fileUploader"
                   >
-                    <i style="color: #909399;" class="el-icon-document" />
-                    <span style="margin-right: 10px;">{{
+                    <i style="color: #909399" class="el-icon-document" />
+                    <span style="margin-right: 10px">{{
                       uploadUrlItem.name || uploadUrlItem.url
                     }}</span>
                     <el-button
@@ -256,12 +256,12 @@
                   <span>已抄送{{ item.cc_user.length }}人</span>
                   <el-icon
                     v-show="!item.ccStatus"
-                    style="color: #CCCCCC"
+                    style="color: #cccccc"
                     name="arrow-down"
                   />
                   <el-icon
                     v-show="item.ccStatus"
-                    style="color: #CCCCCC"
+                    style="color: #cccccc"
                     name="arrow-up"
                   />
                 </div>
@@ -309,7 +309,7 @@ import {
   asyncPlayLog,
   queryUserInfo,
   queryAllOrgan,
-  orderComment
+  orderComment,
 } from "@/api/process/work-order";
 import store from "@/store";
 import { getInfo } from "@/api/user";
@@ -324,7 +324,7 @@ export default {
   components: {
     TransferInversion,
     TransferSubmit,
-    Upload
+    Upload,
   },
   data() {
     const query = this.$route.query;
@@ -338,13 +338,13 @@ export default {
       isLoadingStatus: true,
       currentNode: {
         hideTpls: null,
-        writeTpls: null
+        writeTpls: null,
       },
       isActiveProcessing: false,
       tpls: [],
       organList: [],
       dataList: {
-        remarks: "" // 备注信息
+        remarks: "", // 备注信息
       },
       fileUrl: [],
       userInfo: {},
@@ -354,7 +354,7 @@ export default {
       circulationList: [],
       activeIndex: 0,
       processStructureValue: {
-        workOrder: { title: "" }
+        workOrder: { title: "" },
       },
       ownerApply: false, // 是否是自己提交的申请
       endNodeDetail: {}, // 结束结节信息
@@ -368,7 +368,7 @@ export default {
         processor: "",
         process_method: "",
         tpls: [],
-        tasks: []
+        tasks: [],
       },
       userIds: null,
       tenantId: 1,
@@ -378,24 +378,24 @@ export default {
         // 获取用户列表
         userList(resolve) {
           listUser({
-            pageSize: 999999
-          }).then(response => {
+            pageSize: 999999,
+          }).then((response) => {
             const options = response.data.list;
             resolve(options);
           });
-        }
+        },
       },
       dialogVisible: false,
       selectItem: {
         work_order_id: "",
         node_id: null,
         nodeList: [],
-        users: []
-      }
+        users: [],
+      },
     };
   },
   computed: {
-    ...mapGetters(["userId"])
+    ...mapGetters(["userId"]),
   },
   async mounted() {
     await this.getUserInfo();
@@ -415,7 +415,7 @@ export default {
     console.log({
       is_end: this.is_end,
       ownerApply: this.ownerApply,
-      userAuthority: this.processStructureValue.userAuthority
+      userAuthority: this.processStructureValue.userAuthority,
     });
   },
   methods: {
@@ -480,7 +480,7 @@ export default {
       this.submitTitle = "添加评论";
       this.submitType = "commit";
       this.submitItem = {
-        workOrderId: parseInt(this.workOrderId)
+        workOrderId: parseInt(this.workOrderId),
       };
       this.dialogSubmit = true;
     },
@@ -488,7 +488,7 @@ export default {
       let workOrder = this.processStructureValue.workOrder;
       this.selectItem.work_order_id = workOrder.id;
       this.selectItem.nodeList = workOrder.state || [];
-      this.selectItem.nodeList.forEach(item => {
+      this.selectItem.nodeList.forEach((item) => {
         item.text = item.label;
       });
       if (this.selectItem.nodeList.length === 1) {
@@ -497,8 +497,8 @@ export default {
       if (this.selectItem.users.length <= 0) {
         load.startLoading();
         await listUser({
-          pageSize: 999999
-        }).then(response => {
+          pageSize: 999999,
+        }).then((response) => {
           this.selectItem.users = response.data.list;
         });
         load.endLoading();
@@ -506,7 +506,7 @@ export default {
       this.dialogVisible = true;
     },
     async getUserInfo() {
-      await queryUserInfo().then(res => {
+      await queryUserInfo().then((res) => {
         // console.log(res);
         if (res.code == 200) {
           this.userIds = res.data.id;
@@ -520,8 +520,8 @@ export default {
       await processStructure({
         processId: this.processId,
         workOrderId: this.workOrderId,
-        userId: this.userIds
-      }).then(response => {
+        userId: this.userIds,
+      }).then((response) => {
         let tempData = response.data.tpls;
         // 获取对应模板中,下拉框的key, value
         let selectList = this.getSelectValueObject(tempData);
@@ -535,7 +535,7 @@ export default {
 
         tempData.forEach((temp, index) => {
           let tempList = temp.form_structure.list || [];
-          tempList.forEach(item => {
+          tempList.forEach((item) => {
             if (hiddenFormList[index].length > 0) {
               if (item.type != "text" && !item.options.relationStatus) {
                 item.hidden = true;
@@ -553,9 +553,9 @@ export default {
             if (item.type == "subform") {
               let childList = item.columns || [];
               let subFormStatus = true;
-              childList.forEach(child => {
+              childList.forEach((child) => {
                 let childList = child.list || [];
-                childList.forEach(c => {
+                childList.forEach((c) => {
                   if (hiddenFormList[index].length > 0) {
                     if (c.type != "text" && !c.options.relationStatus) {
                       c.hidden = true;
@@ -580,18 +580,19 @@ export default {
         this.isActiveProcessing = false;
         this.processStructureValue = response.data;
         this.is_end = this.processStructureValue.workOrder.is_end;
-        this.circulationHistoryList = this.processStructureValue.circulationHistory;
+        this.circulationHistoryList =
+          this.processStructureValue.circulationHistory;
         this.circulationList = JSON.parse(
           JSON.stringify(this.circulationHistoryList)
         );
-        this.circulationHistoryList.forEach(item => {
+        this.circulationHistoryList.forEach((item) => {
           const file = item.file_url ? JSON.parse(item.file_url) : [];
           const tempFile = {
             image: [],
-            file: []
+            file: [],
           };
           // console.log(file)
-          file.forEach(item => {
+          file.forEach((item) => {
             if (item.type == "image") {
               tempFile.image.push(item.url);
             } else if (item.type == "file") {
@@ -601,14 +602,14 @@ export default {
           item.fileUrl = tempFile;
         });
 
-        this.circulationList.forEach(item => {
+        this.circulationList.forEach((item) => {
           const file = item.file_url ? JSON.parse(item.file_url) : [];
           const tempFile = {
             image: [],
-            file: []
+            file: [],
           };
           // console.log(file)
-          file.forEach(item => {
+          file.forEach((item) => {
             if (item.type == "image") {
               tempFile.image.push(item.url);
             } else if (item.type == "file") {
@@ -664,8 +665,8 @@ export default {
         this.circulationList.reverse();
         // 如果审批流程没有结束则,流程和历史记录合并显示;结束了,就只显示历史记录
         if (!this.processStructureValue.workOrder.is_end) {
-          this.circulationList.forEach(cir => {
-            this.nodeStepList.forEach(node => {
+          this.circulationList.forEach((cir) => {
+            this.nodeStepList.forEach((node) => {
               if (cir.source == node.id) {
                 cir.label = node.label;
                 cir.assignType = node.assignType;
@@ -677,9 +678,9 @@ export default {
           });
 
           let tempNodes = [];
-          this.nodeStepList.forEach(node => {
+          this.nodeStepList.forEach((node) => {
             let count = 0;
-            this.circulationList.forEach(cir => {
+            this.circulationList.forEach((cir) => {
               if (node.id === cir.source) {
                 count += 1;
               }
@@ -701,7 +702,7 @@ export default {
           this.activeIndex = this.circulationList.length;
         }
         // 添加抄送状态
-        this.circulationList.forEach(res => {
+        this.circulationList.forEach((res) => {
           res.ccStatus = true;
         });
 
@@ -758,7 +759,7 @@ export default {
 
         let psv = response.data.edges || [];
         let btn_group = [];
-        psv.forEach(item => {
+        psv.forEach((item) => {
           // 过滤其它类型的操作
           if (
             this.processStructureValue.workOrder.is_end === 0 &&
@@ -792,7 +793,7 @@ export default {
         let tempList = temp.form_structure.list || [];
         let tempSelectList = tplValues[index] || [];
         let listArray = [];
-        tempList.forEach(list => {
+        tempList.forEach((list) => {
           if (list.type == "select") {
             if (type == "value") {
               const result = this.getFormDataDetail(temp.form_data, list.model);
@@ -802,13 +803,13 @@ export default {
             } else {
               let selectOptions = [];
               let selectValue = [];
-              tempSelectList.forEach(tsl => {
+              tempSelectList.forEach((tsl) => {
                 if (tsl.model == list.model) {
                   selectOptions = list.options.options || [];
                   selectValue = tsl.value || [];
                 }
               });
-              selectOptions.forEach(so => {
+              selectOptions.forEach((so) => {
                 if (selectValue.includes(so.value)) {
                   let tempRo = so.relationOptions || [];
                   listArray.push(...tempRo);
@@ -818,9 +819,9 @@ export default {
           }
           if (list.type == "subform") {
             let childList = list.columns || [];
-            childList.forEach(child => {
+            childList.forEach((child) => {
               let childList = child.list || [];
-              childList.forEach(c => {
+              childList.forEach((c) => {
                 if (c.type == "select") {
                   if (type == "value") {
                     const originObj = JSON.parse(JSON.stringify(c));
@@ -834,13 +835,13 @@ export default {
                   } else {
                     let selectOptions = [];
                     let selectValue = [];
-                    tempSelectList.forEach(tsl => {
+                    tempSelectList.forEach((tsl) => {
                       if (tsl.model == c.model) {
                         selectOptions = c.options.options || [];
                         selectValue = tsl.value || [];
                       }
                     });
-                    selectOptions.forEach(so => {
+                    selectOptions.forEach((so) => {
                       if (selectValue.includes(so.value)) {
                         let tempRo = so.relationOptions || [];
                         listArray.push(...tempRo);
@@ -860,7 +861,7 @@ export default {
     getFormDataDetail(formData, model) {
       let modelStatus = {
         status: false,
-        value: null
+        value: null,
       };
       for (let data in formData) {
         if (typeof formData[data] == "object") {
@@ -872,7 +873,7 @@ export default {
                 model: child,
                 value: formData[data][child]
                   ? formData[data][child].split(",")
-                  : []
+                  : [],
               };
             }
           }
@@ -881,7 +882,7 @@ export default {
             modelStatus = {
               status: true,
               model: data,
-              value: formData[data] ? formData[data].split(",") : []
+              value: formData[data] ? formData[data].split(",") : [],
             };
           }
         }
@@ -894,7 +895,7 @@ export default {
       for (var tpl of this.processStructureValue.tpls) {
         this.tpls.push({
           tplDataId: tpl.id,
-          tplId: tpl.form_structure.id
+          tplId: tpl.form_structure.id,
         });
         promiseList.push(this.$refs["generateForm-" + tpl.id][0].getData());
       }
@@ -908,7 +909,7 @@ export default {
         work_order_id: parseInt(this.$route.query.workOrderId),
         remarks: this.dataList.remarks,
         fileUrl: JSON.stringify(this.fileUrl || []),
-        tpls: this.tpls
+        tpls: this.tpls,
       });
 
       const flow =
@@ -933,18 +934,18 @@ export default {
       //   cancelButtonText: "取消",
       //   type: "warning"
       // }).then(() => {
-      Promise.all(promiseList).then(values => {
+      Promise.all(promiseList).then((values) => {
         for (var tplDataIndex in this.tpls) {
           this.tpls[tplDataIndex].tplValue = values[tplDataIndex];
         }
 
         let fileList = [];
         this.tpls &&
-          this.tpls.forEach(tpl => {
+          this.tpls.forEach((tpl) => {
             for (let val in tpl.tplValue) {
               if (val.indexOf("file") != -1) {
                 const file = tpl.tplValue[val] || [];
-                file.forEach(item => {
+                file.forEach((item) => {
                   fileList.push(item.url);
                 });
               }
@@ -962,7 +963,7 @@ export default {
           work_order_id: parseInt(this.$route.query.workOrderId),
           tpls: this.tpls,
           fileList,
-          tips
+          tips,
         };
         this.dialogSubmit = true;
       });
@@ -986,30 +987,15 @@ export default {
     //   })
     // },
     async getAllOrgan() {
-      await queryAllOrgan({ tenantId: this.tenantId }).then(res => {
+      await queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
         if (res.code == 200) {
           const result = res.data;
           const filterOrganId = [
-            36,
-            39,
-            41,
-            42,
-            43,
-            44,
-            45,
-            46,
-            47,
-            48,
-            49,
-            50,
-            52,
-            54,
-            55,
-            56
+            36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
           ];
           let tempOrgan = [];
           // 过滤不会显示的分部
-          result.forEach(item => {
+          result.forEach((item) => {
             if (!filterOrganId.includes(item.id)) {
               tempOrgan.push(item);
             }
@@ -1039,22 +1025,19 @@ export default {
 
       // #fd803a
       return "";
-    }
-  }
+    },
+  },
 };
 </script>
 
 <style lang="scss" scoped>
-/deep/ .el-step__title {
+:deep(.el-step__title) {
   font-size: 13px;
   line-height: 1.3;
   width: 100%;
   padding-top: 10px;
   padding-right: 10px;
 }
-// /deep/.el-step__icon.is-text {
-//   border: 0;
-// }
 
 .step-title {
   color: #000;
@@ -1096,8 +1079,8 @@ export default {
   border-radius: 4px;
 }
 
-/deep/.icon-transfer,
-/deep/.icon-wait {
+:deep(.icon-transfer),
+:deep(.icon-wait) {
   display: flex;
   align-items: center;
   box-sizing: content-box;
@@ -1114,7 +1097,7 @@ export default {
   }
 }
 
-/deep/.icon-wait {
+:deep(.icon-wait) {
   &::before {
     content: " ";
     display: inline-block;
@@ -1126,24 +1109,25 @@ export default {
 }
 
 .large-icon {
-  /deep/.el-timeline-item__node--large {
-    top: -8px;
-    left: -7px;
-    width: 24px;
-    height: 24px;
-    background-color: transparent;
-  }
+  :deep(.el-timeline-item__node--large)
+   {
+      top: -8px;
+      left: -7px;
+      width: 24px;
+      height: 24px;
+      background-color: transparent;
+    }
 
-  /deep/.el-icon-success,
-  /deep/.el-icon-error {
-    font-size: 24px;
-    color: #22b4a9;
-    background-color: #fff;
-    padding: 2px 0;
-  }
+    :deep(.el-icon-success),
+    :deep(.el-icon-error) {
+      font-size: 24px;
+      color: #22b4a9;
+      background-color: #fff;
+      padding: 2px 0;
+    }
 
-  /deep/.el-icon-error {
-    color: #ff2e2e;
-  }
+    :deep(.el-icon-error) {
+      color: #ff2e2e;
+    }
 }
 </style>

+ 18 - 14
web/c2c0e5fa8323e2c5c1f54f20afda51b8.js

@@ -1,7 +1,11 @@
-ace.define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) {
-"use strict";
+ace.define(
+  "ace/snippets/perl",
+  ["require", "exports", "module"],
+  function (require, exports, module) {
+    "use strict";
 
-exports.snippetText = "# #!/usr/bin/perl\n\
+    exports.snippetText =
+      "# #!/usr/bin/perl\n\
 snippet #!\n\
 	#!/usr/bin/env perl\n\
 \n\
@@ -301,7 +305,7 @@ snippet override\n\
 # use test classes\n\
 snippet tuse\n\
 	use Test::More;\n\
-	use Test::Deep; # (); # uncomment to stop prototype errors\n\
+	use Test::deep; # (); # uncomment to stop prototype errors\n\
 	use Test::Exception;\n\
 \n\
 # local test lib\n\
@@ -349,13 +353,13 @@ snippet debug_trace\n\
 	};\n\
 \n\
 ";
-exports.scope = "perl";
-
-});                (function() {
-                    ace.require(["ace/snippets/perl"], function(m) {
-                        if (typeof module == "object" && typeof exports == "object" && module) {
-                            module.exports = m;
-                        }
-                    });
-                })();
-            
+    exports.scope = "perl";
+  }
+);
+(function () {
+  ace.require(["ace/snippets/perl"], function (m) {
+    if (typeof module == "object" && typeof exports == "object" && module) {
+      module.exports = m;
+    }
+  });
+})();

Some files were not shown because too many files changed in this diff