guojy 1 år sedan
förälder
incheckning
aadd20f3a8
35 ändrade filer med 52 tillägg och 5917 borttagningar
  1. 0 103
      .history/build/webpack.base.conf_20240320145208.js
  2. 0 103
      .history/build/webpack.base.conf_20240320145214.js
  3. 0 95
      .history/build/webpack.base.conf_20240320145507.js
  4. 0 128
      .history/src/main_20240320144058.js
  5. 0 327
      .history/src/views/admin/FormProcessDesign_20240320143102.vue
  6. 0 327
      .history/src/views/admin/FormProcessDesign_20240320143954.vue
  7. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144349.vue
  8. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144420.vue
  9. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144458.vue
  10. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144513.vue
  11. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144545.vue
  12. 0 327
      .history/src/views/admin/FormProcessDesign_20240320144558.vue
  13. 0 327
      .history/src/views/admin/FormProcessDesign_20240320145023.vue
  14. 0 327
      .history/src/views/admin/FormProcessDesign_20240320145038.vue
  15. 0 327
      .history/src/views/admin/FormProcessDesign_20240320145619.vue
  16. 0 327
      .history/src/views/admin/FormProcessDesign_20240320145951.vue
  17. 0 161
      .history/src/views/admin/LayoutHeader_20240320145850.vue
  18. 0 161
      .history/src/views/admin/LayoutHeader_20240320181810.vue
  19. 0 269
      .history/src/views/admin/layout/FormBaseSetting_20240320145626.vue
  20. 0 269
      .history/src/views/admin/layout/FormBaseSetting_20240320145948.vue
  21. 0 342
      .history/src/views/common/process/nodes/ConditionNode_20240320142911.vue
  22. 0 342
      .history/src/views/common/process/nodes/InclusiveNode_20240320142840.vue
  23. 2 2
      package.json
  24. 14 0
      src/assets/theme.less
  25. 3 2
      src/components/common/OrgPicker.vue
  26. 4 0
      src/index.vue
  27. 13 0
      src/utils/index.js
  28. 2 1
      src/views/admin/FormProcessDesign.vue
  29. 6 7
      src/views/admin/layout/FormDesign.vue
  30. 2 2
      src/views/common/form/components/SpanLayout.vue
  31. 2 2
      src/views/common/form/components/TableList.vue
  32. 1 1
      src/views/common/process/nodes/ConcurrentNode.vue
  33. 1 1
      src/views/common/process/nodes/ConditionNode.vue
  34. 1 1
      src/views/common/process/nodes/InclusiveNode.vue
  35. 1 1
      src/views/common/process/nodes/Node.vue

+ 0 - 103
.history/build/webpack.base.conf_20240320145208.js

@@ -1,103 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const { VueLoaderPlugin } = require('vue-loader')
-const vueLoaderConfig = require('./vue-loader.conf')
-
-function resolve(dir) {
-  return path.join(__dirname, '..', dir)
-}
-
-module.exports = {
-  context: path.resolve(__dirname, '../'),
-  entry: {
-    app: './src/main.js'
-  },
-  output: {
-    path: config.build.assetsRoot,
-    filename: '[name].js',
-    publicPath:
-      process.env.NODE_ENV === 'production'
-        ? config.build.assetsPublicPath
-        : config.dev.assetsPublicPath
-  },
-  resolve: {
-    extensions: ['.js', '.vue', '.json'],
-    alias: {
-      '@': resolve('src')
-    }
-  },
-  module: {
-    rules: [
-      {
-        test: /\.vue$/,
-        loader: 'vue-loader',
-        options: vueLoaderConfig
-      },
-      {  
-        test: /\.less$/,  
-        use: [  
-          'style-loader', // 将JS字符串生成为style节点  
-          'css-loader', // 将CSS转化成CommonJS模块  
-          'less-loader' // 将Less编译成CSS  
-        ]  
-      },
-      {
-        test: /\.js$/,
-        loader: 'babel-loader?cacheDirectory',
-        include: [
-          resolve('src'),
-          resolve('test'),
-          resolve('node_modules/webpack-dev-server/client')
-        ]
-      },
-      {
-        test: /\.svg$/,
-        loader: 'svg-sprite-loader',
-        include: [resolve('src/icons')],
-        options: {
-          symbolId: 'icon-[name]'
-        }
-      },
-      {
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
-        exclude: [resolve('src/icons')],
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('img/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('media/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
-        }
-      }
-    ]
-  },
-  plugins: [new VueLoaderPlugin()],
-  node: {
-    // prevent webpack from injecting useless setImmediate polyfill because Vue
-    // source contains it (although only uses it if it's native).
-    setImmediate: false,
-    // prevent webpack from injecting mocks to Node native modules
-    // that does not make sense for the client
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty'
-  }
-}

+ 0 - 103
.history/build/webpack.base.conf_20240320145214.js

@@ -1,103 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const { VueLoaderPlugin } = require('vue-loader')
-const vueLoaderConfig = require('./vue-loader.conf')
-
-function resolve(dir) {
-  return path.join(__dirname, '..', dir)
-}
-
-module.exports = {
-  context: path.resolve(__dirname, '../'),
-  entry: {
-    app: './src/main.js'
-  },
-  output: {
-    path: config.build.assetsRoot,
-    filename: '[name].js',
-    publicPath:
-      process.env.NODE_ENV === 'production'
-        ? config.build.assetsPublicPath
-        : config.dev.assetsPublicPath
-  },
-  resolve: {
-    extensions: ['.js', '.vue', '.json'],
-    alias: {
-      '@': resolve('src')
-    }
-  },
-  module: {
-    rules: [
-      {
-        test: /\.vue$/,
-        loader: 'vue-loader',
-        options: vueLoaderConfig
-      },
-      {  
-        test: /\.less$/,  
-        use: [  
-          'style-loader', // 将JS字符串生成为style节点  
-          'css-loader', // 将CSS转化成CommonJS模块  
-          'less-loader' // 将Less编译成CSS  
-        ]  
-      },
-      {
-        test: /\.js$/,
-        loader: 'babel-loader?cacheDirectory',
-        include: [
-          resolve('src'),
-          resolve('test'),
-          resolve('node_modules/webpack-dev-server/client')
-        ]
-      },
-      {
-        test: /\.svg$/,
-        loader: 'svg-sprite-loader',
-        include: [resolve('src/icons')],
-        options: {
-          symbolId: 'icon-[name]'
-        }
-      },
-      {
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
-        exclude: [resolve('src/icons')],
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('img/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('media/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
-        }
-      }
-    ]
-  },
-  plugins: [new VueLoaderPlugin()],
-  node: {
-    // prevent webpack from injecting useless setImmediate polyfill because Vue
-    // source contains it (although only uses it if it's native).
-    setImmediate: false,
-    // prevent webpack from injecting mocks to Node native modules
-    // that does not make sense for the client
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty'
-  }
-}

+ 0 - 95
.history/build/webpack.base.conf_20240320145507.js

@@ -1,95 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const { VueLoaderPlugin } = require('vue-loader')
-const vueLoaderConfig = require('./vue-loader.conf')
-
-function resolve(dir) {
-  return path.join(__dirname, '..', dir)
-}
-
-module.exports = {
-  context: path.resolve(__dirname, '../'),
-  entry: {
-    app: './src/main.js'
-  },
-  output: {
-    path: config.build.assetsRoot,
-    filename: '[name].js',
-    publicPath:
-      process.env.NODE_ENV === 'production'
-        ? config.build.assetsPublicPath
-        : config.dev.assetsPublicPath
-  },
-  resolve: {
-    extensions: ['.js', '.vue', '.json'],
-    alias: {
-      '@': resolve('src')
-    }
-  },
-  module: {
-    rules: [
-      {
-        test: /\.vue$/,
-        loader: 'vue-loader',
-        options: vueLoaderConfig
-      },
-      {
-        test: /\.js$/,
-        loader: 'babel-loader?cacheDirectory',
-        include: [
-          resolve('src'),
-          resolve('test'),
-          resolve('node_modules/webpack-dev-server/client')
-        ]
-      },
-      {
-        test: /\.svg$/,
-        loader: 'svg-sprite-loader',
-        include: [resolve('src/icons')],
-        options: {
-          symbolId: 'icon-[name]'
-        }
-      },
-      {
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
-        exclude: [resolve('src/icons')],
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('img/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('media/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
-        }
-      }
-    ]
-  },
-  plugins: [new VueLoaderPlugin()],
-  node: {
-    // prevent webpack from injecting useless setImmediate polyfill because Vue
-    // source contains it (although only uses it if it's native).
-    setImmediate: false,
-    // prevent webpack from injecting mocks to Node native modules
-    // that does not make sense for the client
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty'
-  }
-}

+ 0 - 128
.history/src/main_20240320144058.js

@@ -1,128 +0,0 @@
-import Vue from 'vue'
-import 'normalize.css/normalize.css' // 用于加载页面时上面的加载动画条。
-import Element from 'element-ui'
-import 'element-ui/lib/theme-chalk/index.css';
-import '@/styles/index.scss'
-import moment from 'moment' // 时间库
-import App from './App'
-import router from './router'
-import store from './store'
-import {getDept,openUrl, getToken, getTyps, getTypsName, supremeAuthority, getUserData, getEmployeeMap,getEmployeeMapAll,getEmployeeMapItem,getIsIdentity,getCache,setCache,removeCache,returnDeptName,getIsAdministrator} from '@/utils/auth'
-import './performanceSet' // 绩效系统相关配置
-import {onFilePreView } from '@/okr/utils/auth';
-// import { VueOkrTree } from "vue-okr-tree";
-// import "vue-okr-tree/dist/vue-okr-tree.css";
-import 'shepherd.js/dist/css/shepherd.css';
-
-import './icons'
-import './permission'
-import * as filters from '@/utils/filters'
-import axiosKq from '@/utils/axiosKq'
-import axiosUser from '@/utils/axiosUser'
-import axios from '@/utils/axios'
-import * as socketApi from './api/websocket'
-import * as socketApiTow from './api/websocketTow'
-import ECharts from 'echarts';
-
-// 头像
-import UserImage from '@/components/UserImage'
-import noData from '@/components/noData'
-import BrawerBox from '@/performance/components/public/BrawerBox';
-import TaskItem from '@/okr/components/public/TaskItem'; //任务内容
-Vue.component('userImage', UserImage)
-Vue.component('NoData', noData)
-Vue.component('BrawerBox', BrawerBox)
-Vue.component('TaskItem', TaskItem)
-// Vue.component('VueOkrTree', VueOkrTree)
-Vue.use(Element, {
-  size: 'medium',
-})
-Vue.prototype.$echarts = ECharts
-Vue.prototype.$axios = axios
-Vue.prototype.$axiosUser = axiosUser
-Vue.prototype.$axiosKq = axiosKq
-Vue.prototype.$moment = moment
-Vue.prototype.$getToken = getToken
-Vue.prototype.$serveAd = process.env.SERVE_AD
-Vue.prototype.$serverdomain= process.env.BASE_API
-Vue.prototype.$getIsIdentity = getIsIdentity //在积分系统里 判断是否具备某项权限
-Vue.prototype.$supremeAuthority = supremeAuthority //返回积分系统的最高权限
-Vue.prototype.$getIsAdministrator = getIsAdministrator //最高权限  平台管理者
-Vue.prototype.$getTypsName = getTypsName
-Vue.prototype.$getTyps = getTyps
-Vue.prototype.$userInfo = getUserData
-Vue.prototype.$getEmployeeMap = getEmployeeMap  //人员列表
-Vue.prototype.$getEmployeeMapAll = getEmployeeMapAll  //人员列表(包含已删除的)
-Vue.prototype.$getEmployeeMapItem = getEmployeeMapItem  //查询人员信息(包含已删除的)
-Vue.prototype.$getCache = getCache
-Vue.prototype.$setCache = setCache
-Vue.prototype.$removeCache = removeCache
-Vue.prototype.$socketApi = socketApi   //长连接
-Vue.prototype.$socketApiTow = socketApiTow   //长连接
-Vue.prototype.$returnDeptName = returnDeptName
-Vue.prototype.$openUrl = openUrl
-Vue.prototype.$getDept = getDept
-// okr
-Vue.prototype.$onFilePreView = onFilePreView
-//工作流
-Vue.prototype.$isNotEmpty = function(obj){
-  return (obj !== undefined && obj !== null && obj !== '' && obj !== 'null')
-}
-
-Vue.prototype.$getDefalut = function(obj, key, df){
-  return (obj === undefined || key === undefined || !this.$isNotEmpty(obj[key])) ? df : obj[key];
-}
-
-Vue.prototype.$deepCopy = function (obj){return JSON.parse(JSON.stringify(obj))}
-
-// 上传相关
-Vue.prototype.$action = 'https://integralsys.oss-cn-shenzhen.aliyuncs.com'
-Vue.prototype.$acceptImg = 'image/jpeg,image/png'
-Vue.prototype.$acceptFile = 'application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document'
-Vue.prototype.$acceptImgFile='image/jpeg,image/png,application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document'
-Vue.prototype.$xtoken={ 'X-Token': getToken() };
-Vue.directive('dragscroll', function (el) {
-  el.onmousedown = function (ev) {
-    const disX = ev.clientX
-    const disY = ev.clientY
-    const originalScrollLeft = el.scrollLeft
-    const originalScrollTop = el.scrollTop
-    const originalScrollBehavior = el.style['scroll-behavior']
-    const originalPointerEvents = el.style['pointer-events']
-    // auto: 默认值,表示滚动框立即滚动到指定位置。
-    el.style['scroll-behavior'] = 'auto'
-    el.style['cursor'] = 'grabbing'
-    // 鼠标移动事件是监听的整个document,这样可以使鼠标能够在元素外部移动的时候也能实现拖动
-    document.onmousemove = function (ev) {
-      ev.preventDefault()
-      // 计算拖拽的偏移距离
-      const distanceX = ev.clientX - disX
-      const distanceY = ev.clientY - disY
-      el.scrollTo(originalScrollLeft - distanceX, originalScrollTop - distanceY)
-      // 在鼠标拖动的时候将点击事件屏蔽掉
-      // el.style['pointer-events'] = 'none'
-      // document.body.style['cursor'] = 'grabbing'
-    }
-    document.onmouseup = function () {
-      // el.style['scroll-behavior'] = originalScrollBehavior
-      // el.style['pointer-events'] = originalPointerEvents
-      // el.style['cursor'] = 'grab'
-      document.onmousemove = null
-      document.onmouseup = null
-    }
-  }
-})
-
-
-Object.keys(filters).forEach(key => {
-  Vue.filter(key, filters[key])
-})
-
-Vue.config.productionTip = false
-
-new Vue({
-  el: '#app',
-  router,
-  store,
-  render: h => h(App)
-})

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320143102.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320143954.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144349.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design.vue'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting.vue'
-import FormDesign from '@/views/admin/layout/FormDesign.vue'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign.vue'
-import FormProSetting from '@/views/admin/layout/FormProSetting.vue'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144420.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-// import {getFormDetail, createForm, updateFormDetail} from '@/api/design.vue'
-// import FormBaseSetting from '@/views/admin/layout/FormBaseSetting.vue'
-// import FormDesign from '@/views/admin/layout/FormDesign.vue'
-// import ProcessDesign from '@/views/admin/layout/ProcessDesign.vue'
-// import FormProSetting from '@/views/admin/layout/FormProSetting.vue'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144458.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader.vue'
-// import {getFormDetail, createForm, updateFormDetail} from '@/api/design.vue'
-// import FormBaseSetting from '@/views/admin/layout/FormBaseSetting.vue'
-// import FormDesign from '@/views/admin/layout/FormDesign.vue'
-// import ProcessDesign from '@/views/admin/layout/ProcessDesign.vue'
-// import FormProSetting from '@/views/admin/layout/FormProSetting.vue'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144513.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader.vue'
-// import {getFormDetail, createForm, updateFormDetail} from '@/api/design.vue'
-// import FormBaseSetting from '@/views/admin/layout/FormBaseSetting.vue'
-// import FormDesign from '@/views/admin/layout/FormDesign.vue'
-// import ProcessDesign from '@/views/admin/layout/ProcessDesign.vue'
-// import FormProSetting from '@/views/admin/layout/FormProSetting.vue'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144545.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader.vue'
-// import {getFormDetail, createForm, updateFormDetail} from '@/api/design.vue'
-// import FormBaseSetting from '@/views/admin/layout/FormBaseSetting.vue'
-// import FormDesign from '@/views/admin/layout/FormDesign.vue'
-// import ProcessDesign from '@/views/admin/layout/ProcessDesign.vue'
-// import FormProSetting from '@/views/admin/layout/FormProSetting.vue'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320144558.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320145023.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320145038.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320145619.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="sass" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 327
.history/src/views/admin/FormProcessDesign_20240320145951.vue

@@ -1,327 +0,0 @@
-<template>
-  <el-container>
-    <el-header style="background: white">
-      <layout-header v-model="activeSelect" @publish="publishProcess" @preview="preview"></layout-header>
-    </el-header>
-    <div class="layout-body">
-      <form-base-setting ref="baseSetting" v-show="activeSelect === 'baseSetting'"/>
-      <form-design ref="formSetting" v-show="activeSelect === 'formSetting'"/>
-      <process-design ref="processDesign" v-show="activeSelect === 'processDesign'"/>
-      <form-pro-setting ref="proSetting" v-show="activeSelect === 'proSetting'"/>
-    </div>
-    <w-dialog :showFooter="false" v-model="validVisible" title="设置项检查">
-      <el-steps align-center :active="validStep" finish-status="success">
-        <el-step v-for="(step, i) in validOptions" :title="step.title" :key="i"
-                 :icon="step.icon" :status="step.status" :description="step.description"/>
-      </el-steps>
-      <el-result :icon="validIcon" :title="errTitle" :subTitle="validResult.desc">
-        <i slot="icon" style="font-size: 30px" v-if="!validResult.finished" class="el-icon-loading"></i>
-        <div slot="subTitle" class="err-info" v-if="validResult.errs.length > 0">
-          <ellipsis hover-tip v-for="(err, i) in validResult.errs" :key="i + '_err'" :content="err">
-            <i slot="pre" class="el-icon-warning-outline"></i>
-          </ellipsis>
-        </div>
-        <template slot="extra">
-          <el-button type="primary" v-if="validResult.finished" size="medium" @click="doAfter">
-            {{ validResult.action }}
-          </el-button>
-        </template>
-      </el-result>
-    </w-dialog>
-  </el-container>
-
-</template>
-
-<script>
-import LayoutHeader from './LayoutHeader'
-import {getFormDetail, createForm, updateFormDetail} from '@/api/design'
-import FormBaseSetting from '@/views/admin/layout/FormBaseSetting'
-import FormDesign from '@/views/admin/layout/FormDesign'
-import ProcessDesign from '@/views/admin/layout/ProcessDesign'
-import FormProSetting from '@/views/admin/layout/FormProSetting'
-
-export default {
-  name: "FormProcessDesign",
-  components: {LayoutHeader, FormBaseSetting, FormDesign, ProcessDesign, FormProSetting},
-  data() {
-    return {
-      isNew: true,
-      validStep: 0,
-      timer: null,
-      activeSelect: 'baseSetting',
-      validVisible: false,
-      validResult: {},
-      validOptions: [
-        {title: '基础信息', description: '', icon: '', status: ''},
-        {title: '审批表单', description: '', icon: '', status: ''},
-        {title: '审批流程', description: '', icon: '', status: ''},
-        {title: '扩展设置', description: '', icon: '', status: ''}
-      ],
-      validComponents: ['baseSetting', 'formSetting', 'processDesign', 'proSetting'],
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    },
-    errTitle(){
-      if (this.validResult.finished && !this.validResult.success){
-        return this.validResult.title + ` (${this.validResult.errs.length}项错误) 😥`
-      }
-      return this.validResult.title
-    },
-    validIcon() {
-      if (!this.validResult.finished) {
-        return 'el-icon-loading'
-      } else if (this.validResult.success) {
-        return 'success'
-      } else {
-        return 'warning'
-      }
-    }
-  },
-  created() {
-    this.showValiding()
-    let formId = this.$route.query.code
-    //判断传参,决定是新建还是加载原始数据
-    this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
-      this.isNew = false
-      this.loadFormInfo(formId)
-    }
-    let group = this.$route.query.group
-    this.setup.groupId = this.$isNotEmpty(group) ? parseInt(group) : null
-  },
-  beforeDestroy() {
-    this.stopTimer()
-  },
-  methods: {
-    loadFormInfo(formId) {
-      getFormDetail(formId).then(rsp => {
-        console.log(rsp.data)
-        let form = rsp.data;
-        form.logo = JSON.parse(form.logo)
-        form.settings = JSON.parse(form.settings)
-        form.formItems = JSON.parse(form.formItems)
-        form.process = JSON.parse(form.process)
-        this.$store.commit('loadForm', form)
-      }).catch(err => {
-        this.$message.error(err)
-      })
-    },
-    loadInitFrom() {
-      this.$store.commit('loadForm', {
-        formId: null,
-        formName: "未命名表单",
-        logo: {
-          icon: "el-icon-eleme",
-          background: "#1e90ff"
-        },
-        settings: {
-          commiter: [],
-          admin: [],
-          sign: false,
-          notify: {
-            types: ["APP"],
-            title: "消息通知标题"
-          }
-        },
-        groupId: undefined,
-        formItems: [],
-        process: {
-          id: "root",
-          parentId: null,
-          type: "ROOT",
-          name: "发起人",
-          desc: "任何人",
-          props: {
-            assignedUser: [],
-            formPerms: []
-          },
-          children: {}
-        },
-        remark: "备注说明"
-      })
-    },
-    validateDesign() {
-      console.log('000')
-      this.validVisible = true
-      this.validStep = 0
-      this.showValiding()
-      this.stopTimer()
-      this.timer = setInterval(() => {
-        this.validResult.errs = this.$refs[this.validComponents[this.validStep]].validate()
-        if (Array.isArray(this.validResult.errs) && this.validResult.errs.length === 0) {
-          this.validStep++;
-          if (this.validStep >= this.validOptions.length) {
-            this.stopTimer()
-            this.showValidFinish(true)
-          }
-        } else {
-          this.stopTimer()
-          this.validOptions[this.validStep].status = 'error'
-          this.showValidFinish(false, this.getDefaultValidErr())
-        }
-      }, 300)
-    },
-    getDefaultValidErr() {
-      switch (this.validStep) {
-        case 0:
-          return '请检查基础设置项';
-        case 1:
-          return '请检查审批表单相关设置'
-        case 2:
-          return '请检查审批流程,查看对应标注节点错误信息'
-        case 3:
-          return '请检查扩展设置'
-        default:
-          return '未知错误'
-      }
-    },
-    showValidFinish(success, err) {
-      this.validResult.success = success
-      this.validResult.finished = true
-      this.validResult.title = success ? '校验完成 😀' : '校验失败 '
-      this.validResult.desc = success ? '设置项校验成功,是否提交?' : err
-      this.validResult.action = success ? '提 交' : '去修改'
-    },
-    showValiding() {
-      this.validResult = {
-        errs: [],
-        finished: false,
-        success: false,
-        title: '检查中...',
-        action: '处理',
-        desc: '正在检查设置项'
-      }
-      this.validStep = 0
-      this.validOptions.forEach(op => {
-        op.status = ''
-        op.icon = ''
-        op.description = ''
-      })
-    },
-    doAfter() {
-      if (this.validResult.success) {
-        this.doPublish()
-      } else {
-        this.activeSelect = this.validComponents[this.validStep]
-        this.validVisible = false
-      }
-    },
-    stopTimer() {
-      if (this.timer) {
-        clearInterval(this.timer)
-      }
-    },
-    preview() {
-      this.validateDesign()
-    },
-    publishProcess() {
-      this.validateDesign()
-    },
-    doPublish() {
-      this.$confirm('如果您只想预览请选择预览,确认发布后流程立即生效,是否继续?', '提示', {
-        confirmButtonText: '发布',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        console.log(this.setup)
-        let processNew =  JSON.parse(JSON.stringify(this.setup.process));
-
-        //判断条件分支
-        this.conditionRecursion(processNew);
-
-        let template = {
-          formId: this.setup.formId,
-          formName: this.setup.formName,
-          logo: JSON.stringify(this.setup.logo),
-          settings: JSON.stringify(this.setup.settings),
-          groupId: this.setup.groupId,
-          formItems: JSON.stringify(this.setup.formItems),
-          process: JSON.stringify(processNew),
-          remark: this.setup.remark
-        }
-        console.log(template);
-        // return;
-        if (this.isNew || !this.$isNotEmpty(this.setup.formId)) {
-          createForm(template).then(rsp => {
-            this.$message.success("创建表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        } else {
-          updateFormDetail(template).then(rsp => {
-            this.$message.success("更新表单成功")
-            this.$router.push("/formsPanel")
-          }).catch(err => {
-            this.$message.error(err)
-          })
-        }
-      })
-    },
-    conditionRecursion(process){
-      if(null != process && undefined != process){
-        if(null != process.branchs && undefined != process.branchs){
-          process.branchs.map((item, i) => {
-            if (i == process.branchs.length - 1) {
-              item.typeElse = true;
-            } else {
-              item.typeElse = false;
-            }
-            if(null != item.children && undefined != item.children){
-              this.conditionRecursion(item.children)
-            }else{
-              return item;
-            }
-          });
-        }
-        this.conditionRecursion(process.children)
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-
-.layout-body {
-  min-width: 980px;
-}
-
-/deep/ .el-step {
-  .is-success {
-    color: #2a99ff;
-    border-color: #2a99ff;
-  }
-}
-
-.err-info{
-  max-height: 180px;
-  overflow-y: auto;
-  & > div{
-    padding: 5px;
-    margin: 2px 0;
-    width: 220px;
-    text-align: left;
-    border-radius: 3px;
-    background: rgb(242 242 242);
-  }
-  i{
-    margin: 0 5px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 2px;
-  height: 2px;
-  background-color: white;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-
-</style>

+ 0 - 161
.history/src/views/admin/LayoutHeader_20240320145850.vue

@@ -1,161 +0,0 @@
-<template>
-  <div>
-    <div class="header">
-      <el-menu :default-active="value" active-text-color="#409eff" class="el-menu-demo" mode="horizontal"
-               @select="handleSelect">
-        <el-menu-item index="baseSetting" @click="to('baseSetting')">① 基础信息</el-menu-item>
-        <el-menu-item index="formSetting" @click="to('formSetting')">② 审批表单</el-menu-item>
-        <el-menu-item index="processDesign" @click="to('processDesign')">③ 审批流程
-        </el-menu-item>
-        <el-menu-item index="proSetting" @click="to('proSetting')">④ 扩展设置</el-menu-item>
-      </el-menu>
-      <div class="publish">
-        <el-button size="mini" @click="preview"><i class="el-icon-view"></i>预览</el-button>
-        <el-button size="mini" type="primary" @click="publish"><i class="el-icon-s-promotion"></i>发布</el-button>
-      </div>
-      <div class="back">
-        <el-button @click="exit" size="medium" icon="el-icon-arrow-left" circle></el-button>
-        <span>
-          <i :class="setup.logo.icon" :style="'background:' + setup.logo.background"></i>
-          <span>{{ setup.formName }}</span>
-        </span>
-      </div>
-    </div>
-
-    <el-dialog title="请使用手机扫码预览" :visible.sync="viewCode" width="300px" :close-on-click-modal="false" center>
-      <!-- <img src="../../assets/image/code.png" width="250" height="250"> -->
-      <span>请使用手机扫码预览</span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-
-export default {
-  name: "LayoutHeader",
-  props:{
-    value: {
-      type: String,
-      default: 'baseSetup'
-    }
-  },
-  data() {
-    return {
-      viewCode: false,
-    };
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    }
-  },
-  created() {
-    this.check()
-  },
-  mounted() {
-    console.log(document.body.offsetWidth)
-    if (document.body.offsetWidth <= 970) {
-      this.$msgbox.alert("本设计器未适配中小屏幕,建议您在PC电脑端浏览器进行操作")
-    }
-    this.listener()
-  },
-  methods: {
-    publish() {
-      this.$emit('publish')
-    },
-    preview() {
-      this.$emit('preview')
-      //this.
-      this.viewCode = true;
-    },
-    valid() {
-      if (!this.$isNotEmpty(this.setup.group)) {
-        this.$message.warning('请选择分组')
-        this.$router.push('/layout/baseSetup')
-        return false;
-      }
-      return true;
-    },
-    exit() {
-      this.$confirm('未发布的内容将不会被保存,是否直接退出 ?', '提示', {
-        confirmButtonText: '退出',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        //window.location.reload()
-        //this.$store.commit('clearTemplate')
-        this.$router.push('/formsPanel')
-      })
-    },
-    to(path) {
-      this.$emit('input', path)
-    },
-    handleSelect(key, keyPath) {
-      console.log(key, keyPath);
-    },
-    listener() {
-      window.onunload = this.closeBefore()
-      window.onbeforeunload = this.closeBefore()
-      //window.on('beforeunload',this.closeBefore())
-    },
-    closeBefore() {
-      //alert("您将要离开本页")
-      return false
-    },
-    check() {
-      if (this.$store.state.isEdit === null) {
-        //this.$router.push("/workPanel");
-      }
-    }
-  }
-}
-</script>
-<style lang="sass" scoped>
-
-/deep/ .header {
-  min-width: 980px;
-  position: relative;
-
-  .el-menu {
-    top: 0;
-    z-index: 999;
-    display: flex;
-    justify-content: center;
-    width: 100%;
-  }
-
-  .publish {
-    position: absolute;
-    top: 15px;
-    right: 20px;
-    z-index: 1000;
-
-    i {
-      margin-right: 6px;
-    }
-
-    button {
-      border-radius: 15px;
-    }
-  }
-
-  .back {
-    position: absolute;
-    z-index: 1000;
-    top: 10px;
-    left: 20px;
-    font-size: small;
-
-    span {
-      i {
-        border-radius: 10px;
-        padding: 7.8px;
-        font-size: 20px;
-        color: #ffffff;
-        margin: 0 10px;
-      }
-    }
-
-  }
-}
-</style>

+ 0 - 161
.history/src/views/admin/LayoutHeader_20240320181810.vue

@@ -1,161 +0,0 @@
-<template>
-  <div>
-    <div class="header">
-      <el-menu :default-active="value" active-text-color="#409eff" class="el-menu-demo" mode="horizontal"
-               @select="handleSelect">
-        <el-menu-item index="baseSetting" @click="to('baseSetting')">① 基础信息</el-menu-item>
-        <el-menu-item index="formSetting" @click="to('formSetting')">② 审批表单</el-menu-item>
-        <el-menu-item index="processDesign" @click="to('processDesign')">③ 审批流程
-        </el-menu-item>
-        <el-menu-item index="proSetting" @click="to('proSetting')">④ 扩展设置</el-menu-item>
-      </el-menu>
-      <div class="publish">
-        <el-button size="mini" @click="preview"><i class="el-icon-view"></i>预览</el-button>
-        <el-button size="mini" type="primary" @click="publish"><i class="el-icon-s-promotion"></i>发布</el-button>
-      </div>
-      <div class="back">
-        <el-button @click="exit" size="medium" icon="el-icon-arrow-left" circle></el-button>
-        <span>
-          <i :class="setup.logo.icon" :style="'background:' + setup.logo.background"></i>
-          <span>{{ setup.formName }}</span>
-        </span>
-      </div>
-    </div>
-
-    <el-dialog title="请使用手机扫码预览" :visible.sync="viewCode" width="300px" :close-on-click-modal="false" center>
-      <!-- <img src="../../assets/image/code.png" width="250" height="250"> -->
-      <span>请使用手机扫码预览</span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-
-export default {
-  name: "LayoutHeader",
-  props:{
-    value: {
-      type: String,
-      default: 'baseSetup'
-    }
-  },
-  data() {
-    return {
-      viewCode: false,
-    };
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design
-    }
-  },
-  created() {
-    this.check()
-  },
-  mounted() {
-    console.log(document.body.offsetWidth)
-    if (document.body.offsetWidth <= 970) {
-      this.$msgbox.alert("本设计器未适配中小屏幕,建议您在PC电脑端浏览器进行操作")
-    }
-    this.listener()
-  },
-  methods: {
-    publish() {
-      this.$emit('publish')
-    },
-    preview() {
-      this.$emit('preview')
-      //this.
-      this.viewCode = true;
-    },
-    valid() {
-      if (!this.$isNotEmpty(this.setup.group)) {
-        this.$message.warning('请选择分组')
-        this.$router.push('/layout/baseSetup')
-        return false;
-      }
-      return true;
-    },
-    exit() {
-      this.$confirm('未发布的内容将不会被保存,是否直接退出 ?', '提示', {
-        confirmButtonText: '退出',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        //window.location.reload()
-        //this.$store.commit('clearTemplate')
-        this.$router.push('/formsPanel')
-      })
-    },
-    to(path) {
-      this.$emit('input', path)
-    },
-    handleSelect(key, keyPath) {
-      console.log(key, keyPath);
-    },
-    listener() {
-      window.onunload = this.closeBefore()
-      window.onbeforeunload = this.closeBefore()
-      //window.on('beforeunload',this.closeBefore())
-    },
-    closeBefore() {
-      //alert("您将要离开本页")
-      return false
-    },
-    check() {
-      if (this.$store.state.isEdit === null) {
-        //this.$router.push("/workPanel");
-      }
-    }
-  }
-}
-</script>
-<style lang="less" scoped>
-
-.header {
-  min-width: 980px;
-  position: relative;
-
-  .el-menu {
-    top: 0;
-    z-index: 999;
-    display: flex;
-    justify-content: center;
-    width: 100%;
-  }
-
-  .publish {
-    position: absolute;
-    top: 15px;
-    right: 20px;
-    z-index: 1000;
-
-    i {
-      margin-right: 6px;
-    }
-
-    button {
-      border-radius: 15px;
-    }
-  }
-
-  .back {
-    position: absolute;
-    z-index: 1000;
-    top: 10px;
-    left: 20px;
-    font-size: small;
-
-    span {
-      i {
-        border-radius: 10px;
-        padding: 7.8px;
-        font-size: 20px;
-        color: #ffffff;
-        margin: 0 10px;
-      }
-    }
-
-  }
-}
-</style>

+ 0 - 269
.history/src/views/admin/layout/FormBaseSetting_20240320145626.vue

@@ -1,269 +0,0 @@
-<template>
-  <div class="base-setup" @click="showIconSelect = false">
-    <el-form ref="baseSetting" :model="setup" label-position="top" label-width="80px">
-      <el-form-item label="表单图标">
-        <i :class="setup.logo.icon" :style="'background:' + setup.logo.background"></i>
-        <span class="change-icon">
-					<span>
-						<span>选择背景色</span>
-						<el-color-picker v-model="setup.logo.background" show-alpha size="small" :predefine="colors"></el-color-picker>
-					</span>
-					<span>
-						<span>选择图标</span>
-						<el-popover placement="bottom-start" width="390" trigger="click">
-							<div class="icon-select">
-								<i :class="i" v-for="(i, id) in icons" :key="id" @click="setup.logo.icon = i"></i>
-							</div>
-              <i slot="reference" :class="setup.logo.icon"></i>
-            </el-popover>
-            <!--<i :class="setup.icon" @click.stop="showIconSelect = true"></i>-->
-					</span>
-				</span>
-      </el-form-item>
-      <el-form-item label="表单名称" :rules="getRule('请输入表单名称')" prop="formName">
-        <el-input v-model="setup.formName" size="medium"></el-input>
-      </el-form-item>
-      <el-form-item label="所在分组" :rules="getRule('请选择表单分组')" class="group" prop="groupId">
-        <el-select v-model="setup.groupId" placeholder="请选择分组" size="medium">
-          <el-option v-for="(op, index) in fromGroup" :key="index" v-show="op.id > 1"
-                     :label="op.name" :value="op.id"></el-option>
-        </el-select>
-        <el-popover placement="bottom-end" title="新建表单分组" width="300" trigger="click">
-          <el-input size="medium" v-model="newGroup" placeholder="请输入新的分组名">
-            <el-button slot="append" size="medium" type="primary" @click="addGroup">提交</el-button>
-          </el-input>
-          <el-button icon="el-icon-plus" slot="reference" size="medium" type="primary">新建分组</el-button>
-        </el-popover>
-      </el-form-item>
-      <el-form-item label="表单说明">
-        <el-input placeholder="请输入表单说明" v-model="setup.remark" type="textarea" show-word-limit
-                  :autosize="{ minRows: 2, maxRows: 5}" maxlength="500"></el-input>
-      </el-form-item>
-      <el-form-item label="消息通知方式" :rules="getRule('请选择消息通知方式')">
-        <el-select v-model="setup.settings.notify.types" value-key="name"
-                   placeholder="选择消息通知方式" style="width: 30%;"
-                   size="medium" clearable multiple collapse-tags>
-          <el-option v-for="(wc, index) in notifyTypes" :label="wc.name" :key="index" :value="wc"></el-option>
-        </el-select>
-        <el-input size="medium" v-model="setup.settings.notify.title" style="width: 68%; float:right;" placeholder="消息通知标题"></el-input>
-      </el-form-item>
-      <el-form-item label="谁可以管理此表单">
-        <el-select v-model="setup.settings.admin" @click.native="selectUser('admin')" value-key="name"
-                   class="select-u" placeholder="请选择可以管理此表单的人员"
-                   size="medium" clearable multiple>
-          <el-option v-for="(wc, index) in setup.settings.admin" :label="wc.name" :key="index" :value="wc"></el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <org-picker title="请选择可以管理此表单的人员" multiple ref="orgPicker" :selected="select" @ok="selected"></org-picker>
-  </div>
-</template>
-
-<script>
-import OrgPicker from "@/components/common/OrgPicker";
-import {getFormGroups, updateGroup} from '@/api/design'
-import iconfont from '@/assets/iconfont/iconfont.json'
-
-export default {
-  name: "FormBaseSetting",
-  components: {OrgPicker},
-  data() {
-    return {
-      nowUserSelect: null,
-      showIconSelect: false,
-      select: [],
-      newGroup: '',
-      fromGroup: [],
-      notifyTypes:[
-        {type:'APP',name:'应用内通知'},
-        {type:'EMAIL',name:'邮件通知'},
-        {type:'SMS',name:'短信通知'},
-        {type:'WX',name:'微信通知'},
-        {type:'DING',name:'钉钉通知'},
-      ],
-      colors: [
-        '#ff4500',
-        '#ff8c00',
-        '#ffd700',
-        '#90ee90',
-        '#00ced1',
-        '#1e90ff',
-        '#c71585',
-        'rgba(255, 69, 0, 0.68)',
-        'rgb(255, 120, 0)',
-        'hsl(181, 100%, 37%)',
-        'hsla(209, 100%, 56%, 0.73)',
-        '#c7158577'
-      ],
-      icons: [
-        'el-icon-delete-solid',
-        'el-icon-s-tools',
-        'el-icon-s-goods',
-        'el-icon-warning',
-        'el-icon-circle-plus',
-        'el-icon-camera-solid',
-        'el-icon-s-promotion',
-        'el-icon-s-cooperation',
-        'el-icon-s-platform',
-        'el-icon-s-custom',
-        'el-icon-s-data',
-        'el-icon-s-check',
-        'el-icon-s-claim',
-      ],
-      rules:{
-        formName:[{}],
-        groupId: [],
-      }
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design;
-    }
-  },
-  created() {
-    this.loadIconfont()
-  },
-  mounted(){
-    this.getGroups()
-  },
-  methods: {
-    getRule(msg){
-      return [{ required: true, message: msg, trigger: 'blur' }]
-    },
-    loadIconfont(){
-      if (iconfont && iconfont.id){
-        iconfont.glyphs.forEach(icon => {
-          this.icons.push(`${iconfont.font_family} ${iconfont.css_prefix_text}${icon.font_class}`)
-        })
-      }
-    },
-    getGroups(){
-      getFormGroups().then(rsp => {
-        this.fromGroup = rsp.data
-      }).catch(err => this.$message.error('获取分组异常'))
-    },
-    addGroup() {
-      if (this.newGroup.trim() !== '') {
-        updateGroup({name: this.newGroup.trim()}, 'post').then(rsp => {
-          this.$message.success(rsp.data)
-          this.getGroups()
-        }).catch(err => this.$message.error(err.response.data))
-      }
-    },
-    selected(select) {
-      this.$set(this.setup.settings, this.nowUserSelect, select)
-      //this.setup[this.nowUserSelect] = select
-    },
-    selectUser(key) {
-      this.select = this.setup.settings[key]
-      this.nowUserSelect = key
-      this.$refs.orgPicker.show()
-    },
-    validate(){
-      this.$refs.baseSetting.validate()
-      let err = []
-      if (!this.$isNotEmpty(this.setup.formName)){
-        err.push('表单名称未设置')
-      }
-      if (!this.$isNotEmpty(this.setup.groupId)){
-        err.push('表单分组未设置')
-      }
-      if (this.setup.settings.notify.types.length === 0){
-        err.push('审批消息通知方式未设置')
-      }
-      return err
-    }
-  }
-}
-</script>
-
-<style lang="sass" scoped>
-/deep/ .el-select-dropdown {
-  display: none;
-}
-
-.icon-select {
-  display: flex;
-  flex-wrap: wrap;
-  i {
-    cursor: pointer;
-    font-size: large;
-    padding: 10px;
-    max-width: 38px !important;
-    &:hover {
-      box-shadow: 0 0 10px 2px #C2C2C2;
-    }
-  }
-}
-
-/deep/ .select-u {
-  width: 100%;
-}
-
-.base-setup {
-  overflow: auto;
-  margin: 0 auto;
-  width: 600px;
-  height: calc(100vh - 105px);
-  background: #ffffff;
-  margin-top: 10px;
-  padding: 15px 20px;
-
-  i:first-child {
-    position: relative;
-    cursor: pointer;
-    font-size: xx-large;
-    color: #ffffff;
-    border-radius: 10px;
-    padding: 10px;
-  }
-
-  .change-icon {
-    margin-left: 20px;
-
-    span {
-      font-size: small;
-      color: #7a7a7a;
-      margin-right: 15px;
-    }
-
-    i {
-      cursor: pointer;
-      color: #7a7a7a;
-      font-size: x-large;
-    }
-  }
-
-  /deep/ .el-form-item__label {
-    padding: 0;
-    font-weight: bold;
-  }
-
-  /deep/ .el-form-item {
-    margin-bottom: 5px;
-  }
-}
-
-/deep/ .group {
-  .el-select {
-    width: calc(100% - 130px);
-  }
-
-  .el-button {
-    margin-left: 10px;
-    width: 120px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 4px;
-  height: 4px;
-  background-color: #f8f8f8;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-</style>

+ 0 - 269
.history/src/views/admin/layout/FormBaseSetting_20240320145948.vue

@@ -1,269 +0,0 @@
-<template>
-  <div class="base-setup" @click="showIconSelect = false">
-    <el-form ref="baseSetting" :model="setup" label-position="top" label-width="80px">
-      <el-form-item label="表单图标">
-        <i :class="setup.logo.icon" :style="'background:' + setup.logo.background"></i>
-        <span class="change-icon">
-					<span>
-						<span>选择背景色</span>
-						<el-color-picker v-model="setup.logo.background" show-alpha size="small" :predefine="colors"></el-color-picker>
-					</span>
-					<span>
-						<span>选择图标</span>
-						<el-popover placement="bottom-start" width="390" trigger="click">
-							<div class="icon-select">
-								<i :class="i" v-for="(i, id) in icons" :key="id" @click="setup.logo.icon = i"></i>
-							</div>
-              <i slot="reference" :class="setup.logo.icon"></i>
-            </el-popover>
-            <!--<i :class="setup.icon" @click.stop="showIconSelect = true"></i>-->
-					</span>
-				</span>
-      </el-form-item>
-      <el-form-item label="表单名称" :rules="getRule('请输入表单名称')" prop="formName">
-        <el-input v-model="setup.formName" size="medium"></el-input>
-      </el-form-item>
-      <el-form-item label="所在分组" :rules="getRule('请选择表单分组')" class="group" prop="groupId">
-        <el-select v-model="setup.groupId" placeholder="请选择分组" size="medium">
-          <el-option v-for="(op, index) in fromGroup" :key="index" v-show="op.id > 1"
-                     :label="op.name" :value="op.id"></el-option>
-        </el-select>
-        <el-popover placement="bottom-end" title="新建表单分组" width="300" trigger="click">
-          <el-input size="medium" v-model="newGroup" placeholder="请输入新的分组名">
-            <el-button slot="append" size="medium" type="primary" @click="addGroup">提交</el-button>
-          </el-input>
-          <el-button icon="el-icon-plus" slot="reference" size="medium" type="primary">新建分组</el-button>
-        </el-popover>
-      </el-form-item>
-      <el-form-item label="表单说明">
-        <el-input placeholder="请输入表单说明" v-model="setup.remark" type="textarea" show-word-limit
-                  :autosize="{ minRows: 2, maxRows: 5}" maxlength="500"></el-input>
-      </el-form-item>
-      <el-form-item label="消息通知方式" :rules="getRule('请选择消息通知方式')">
-        <el-select v-model="setup.settings.notify.types" value-key="name"
-                   placeholder="选择消息通知方式" style="width: 30%;"
-                   size="medium" clearable multiple collapse-tags>
-          <el-option v-for="(wc, index) in notifyTypes" :label="wc.name" :key="index" :value="wc"></el-option>
-        </el-select>
-        <el-input size="medium" v-model="setup.settings.notify.title" style="width: 68%; float:right;" placeholder="消息通知标题"></el-input>
-      </el-form-item>
-      <el-form-item label="谁可以管理此表单">
-        <el-select v-model="setup.settings.admin" @click.native="selectUser('admin')" value-key="name"
-                   class="select-u" placeholder="请选择可以管理此表单的人员"
-                   size="medium" clearable multiple>
-          <el-option v-for="(wc, index) in setup.settings.admin" :label="wc.name" :key="index" :value="wc"></el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <org-picker title="请选择可以管理此表单的人员" multiple ref="orgPicker" :selected="select" @ok="selected"></org-picker>
-  </div>
-</template>
-
-<script>
-import OrgPicker from "@/components/common/OrgPicker";
-import {getFormGroups, updateGroup} from '@/api/design'
-import iconfont from '@/assets/iconfont/iconfont.json'
-
-export default {
-  name: "FormBaseSetting",
-  components: {OrgPicker},
-  data() {
-    return {
-      nowUserSelect: null,
-      showIconSelect: false,
-      select: [],
-      newGroup: '',
-      fromGroup: [],
-      notifyTypes:[
-        {type:'APP',name:'应用内通知'},
-        {type:'EMAIL',name:'邮件通知'},
-        {type:'SMS',name:'短信通知'},
-        {type:'WX',name:'微信通知'},
-        {type:'DING',name:'钉钉通知'},
-      ],
-      colors: [
-        '#ff4500',
-        '#ff8c00',
-        '#ffd700',
-        '#90ee90',
-        '#00ced1',
-        '#1e90ff',
-        '#c71585',
-        'rgba(255, 69, 0, 0.68)',
-        'rgb(255, 120, 0)',
-        'hsl(181, 100%, 37%)',
-        'hsla(209, 100%, 56%, 0.73)',
-        '#c7158577'
-      ],
-      icons: [
-        'el-icon-delete-solid',
-        'el-icon-s-tools',
-        'el-icon-s-goods',
-        'el-icon-warning',
-        'el-icon-circle-plus',
-        'el-icon-camera-solid',
-        'el-icon-s-promotion',
-        'el-icon-s-cooperation',
-        'el-icon-s-platform',
-        'el-icon-s-custom',
-        'el-icon-s-data',
-        'el-icon-s-check',
-        'el-icon-s-claim',
-      ],
-      rules:{
-        formName:[{}],
-        groupId: [],
-      }
-    }
-  },
-  computed: {
-    setup() {
-      return this.$store.state.design;
-    }
-  },
-  created() {
-    this.loadIconfont()
-  },
-  mounted(){
-    this.getGroups()
-  },
-  methods: {
-    getRule(msg){
-      return [{ required: true, message: msg, trigger: 'blur' }]
-    },
-    loadIconfont(){
-      if (iconfont && iconfont.id){
-        iconfont.glyphs.forEach(icon => {
-          this.icons.push(`${iconfont.font_family} ${iconfont.css_prefix_text}${icon.font_class}`)
-        })
-      }
-    },
-    getGroups(){
-      getFormGroups().then(rsp => {
-        this.fromGroup = rsp.data
-      }).catch(err => this.$message.error('获取分组异常'))
-    },
-    addGroup() {
-      if (this.newGroup.trim() !== '') {
-        updateGroup({name: this.newGroup.trim()}, 'post').then(rsp => {
-          this.$message.success(rsp.data)
-          this.getGroups()
-        }).catch(err => this.$message.error(err.response.data))
-      }
-    },
-    selected(select) {
-      this.$set(this.setup.settings, this.nowUserSelect, select)
-      //this.setup[this.nowUserSelect] = select
-    },
-    selectUser(key) {
-      this.select = this.setup.settings[key]
-      this.nowUserSelect = key
-      this.$refs.orgPicker.show()
-    },
-    validate(){
-      this.$refs.baseSetting.validate()
-      let err = []
-      if (!this.$isNotEmpty(this.setup.formName)){
-        err.push('表单名称未设置')
-      }
-      if (!this.$isNotEmpty(this.setup.groupId)){
-        err.push('表单分组未设置')
-      }
-      if (this.setup.settings.notify.types.length === 0){
-        err.push('审批消息通知方式未设置')
-      }
-      return err
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-/deep/ .el-select-dropdown {
-  display: none;
-}
-
-.icon-select {
-  display: flex;
-  flex-wrap: wrap;
-  i {
-    cursor: pointer;
-    font-size: large;
-    padding: 10px;
-    max-width: 38px !important;
-    &:hover {
-      box-shadow: 0 0 10px 2px #C2C2C2;
-    }
-  }
-}
-
-/deep/ .select-u {
-  width: 100%;
-}
-
-.base-setup {
-  overflow: auto;
-  margin: 0 auto;
-  width: 600px;
-  height: calc(100vh - 105px);
-  background: #ffffff;
-  margin-top: 10px;
-  padding: 15px 20px;
-
-  i:first-child {
-    position: relative;
-    cursor: pointer;
-    font-size: xx-large;
-    color: #ffffff;
-    border-radius: 10px;
-    padding: 10px;
-  }
-
-  .change-icon {
-    margin-left: 20px;
-
-    span {
-      font-size: small;
-      color: #7a7a7a;
-      margin-right: 15px;
-    }
-
-    i {
-      cursor: pointer;
-      color: #7a7a7a;
-      font-size: x-large;
-    }
-  }
-
-  /deep/ .el-form-item__label {
-    padding: 0;
-    font-weight: bold;
-  }
-
-  /deep/ .el-form-item {
-    margin-bottom: 5px;
-  }
-}
-
-/deep/ .group {
-  .el-select {
-    width: calc(100% - 130px);
-  }
-
-  .el-button {
-    margin-left: 10px;
-    width: 120px;
-  }
-}
-
-::-webkit-scrollbar {
-  width: 4px;
-  height: 4px;
-  background-color: #f8f8f8;
-}
-
-::-webkit-scrollbar-thumb {
-  border-radius: 16px;
-  background-color: #e8e8e8;
-}
-</style>

+ 0 - 342
.history/src/views/common/process/nodes/ConditionNode_20240320142911.vue

@@ -1,342 +0,0 @@
-<template>
-  <div :class="{'node': true, 'node-error-state': showError}">
-    <div :class="{'node-body': true, 'error': showError}">
-      <div class="node-body-left" @click="$emit('leftMove')" v-if="level > 1 && $store.state.diagramMode !== 'viewer'">
-        <i class="el-icon-arrow-left"></i>
-      </div>
-      <div class="node-body-main" @click="$emit('selected')">
-        <div class="node-body-main-header">
-          <ellipsis class="title" hover-tip :content="config.name ? config.name : ('条件' + level)"/>
-          <span class="level">优先级{{ level }}</span>
-          <span class="option" v-if="$store.state.diagramMode !== 'viewer'">
-            <el-tooltip effect="dark" content="复制条件" placement="top">
-              <i class="el-icon-copy-document" @click.stop="$emit('copy')"></i>
-            </el-tooltip>
-            <i class="el-icon-close" @click.stop="$emit('delNode')"></i>
-          </span>
-        </div>
-        <div class="node-body-main-content">
-          <span class="placeholder" v-if="(content || '').trim() === ''">{{
-            level == size && size != 0 ? "其他条件进入此流程" : placeholder
-          }}</span>
-          <ellipsis hoverTip :row="4" :content="content" v-else/>
-        </div>
-      </div>
-      <div class="node-body-right" @click="$emit('rightMove')"
-           v-if="level < size && $store.state.diagramMode !== 'viewer'">
-        <i class="el-icon-arrow-right"></i>
-      </div>
-      <div class="node-error" v-if="showError">
-        <el-tooltip effect="dark" :content="errorInfo" placement="top-start">
-          <i class="el-icon-warning-outline"></i>
-        </el-tooltip>
-      </div>
-    </div>
-    <div class="node-footer">
-      <div class="btn">
-        <insert-button v-if="$store.state.diagramMode !== 'viewer'"
-                       @insertNode="type => $emit('insertNode', type)"></insert-button>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import InsertButton from '@/views/common/InsertButton.vue'
-import {ValueType} from '@/views/common/form/ComponentsConfigExport'
-
-const groupNames = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'];
-export default {
-  name: "ConditionNode",
-  components: {InsertButton},
-  props: {
-    config: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    },
-    //索引位置
-    level: {
-      type: Number,
-      default: 1
-    },
-    //条件数
-    size: {
-      type: Number,
-      default: 0
-    }
-  },
-  data() {
-    return {
-      ValueType,
-      groupNames,
-      placeholder: '请设置条件',
-      errorInfo: '',
-      showError: false
-    }
-  },
-  computed: {
-    content() {
-      const groups = this.config.props.groups
-      let confitions = []
-      groups.forEach(group => {
-        let subConditions = []
-        group.conditions.forEach(subCondition => {
-          let subConditionStr = ''
-          switch (subCondition.valueType) {
-            case ValueType.dept:
-            case ValueType.user:
-              subConditionStr = `${subCondition.title}属于[${String(subCondition.value.map(u => u.name)).replaceAll(',', '. ')}]之一`
-              break;
-            case ValueType.number:
-            case ValueType.string:
-              subConditionStr = this.getOrdinaryConditionContent(subCondition)
-              break;
-          }
-          subConditions.push(subConditionStr)
-        })
-        //根据子条件关系构建描述
-        let subConditionsStr = String(subConditions)
-            .replaceAll(',', subConditions.length > 1 ?
-                (group.groupType === 'AND' ? ') 且 (' : ') 或 (') :
-                (group.groupType === 'AND' ? ' 且 ' : ' 或 '))
-        confitions.push(subConditions.length > 1 ? `(${subConditionsStr})` : subConditionsStr)
-      })
-      //构建最终描述
-      return String(confitions).replaceAll(',', (this.config.props.groupsType === 'AND' ? ' 且 ' : ' 或 '))
-    }
-  },
-  methods: {
-    getDefault(val, df) {
-      return val && val !== '' ? val : df;
-    },
-    getOrdinaryConditionContent(subCondition) {
-      switch (subCondition.compare) {
-        case 'IN':
-          return `${subCondition.title}为[${String(subCondition.value).replaceAll(',', '、')}]中之一`
-        case 'B':
-          return `${subCondition.value[0]} < ${subCondition.title} < ${subCondition.value[1]}`
-        case 'AB':
-          return `${subCondition.value[0]} ≤ ${subCondition.title} < ${subCondition.value[1]}`
-        case 'BA':
-          return `${subCondition.value[0]} < ${subCondition.title} ≤ ${subCondition.value[1]}`
-        case 'ABA':
-          return `${subCondition.value[0]} ≤ ${subCondition.title} ≤ ${subCondition.value[1]}`
-        case '<=':
-          return `${subCondition.title} ≤ ${this.getDefault(subCondition.value[0], ' ?')}`
-        case '>=':
-          return `${subCondition.title} ≥ ${this.getDefault(subCondition.value[0], ' ?')}`
-        default:
-          return `${subCondition.title}${subCondition.compare}${this.getDefault(subCondition.value[0], ' ?')}`
-      }
-    },
-    //校验数据配置的合法性
-    validate(err) {
-      console.log('condition children', this.config.children)
-      if (!(this.level == this.size && this.size != 0) && this.config.children && !this.config.children.id) {
-        this.showError = true
-        this.errorInfo = '条件分支后不能为空'
-        err.push(`条件分支后不能为空`)
-        return !this.showError
-      }
-
-      const props = this.config.props
-      if (props.groups.length <= 0){
-        this.showError = true
-        this.errorInfo = '请设置分支条件'
-        err.push(`${this.config.name} 未设置条件`)
-      }else {
-        if (!(this.level == this.size && this.size != 0)) {
-          for (let i = 0; i < props.groups.length; i++) {
-            if (props.groups[i].cids.length === 0){
-              this.showError = true
-              this.errorInfo = `请设置条件组${this.groupNames[i]}内的条件`
-              err.push(`条件 ${this.config.name} 条件组${this.groupNames[i]}内未设置条件`)
-              break
-            }else {
-              let conditions = props.groups[i].conditions
-              for (let ci = 0; ci < conditions.length; ci++) {
-                let subc = conditions[ci]
-                if (subc.value.length === 0){
-                  this.showError = true
-                }else {
-                  this.showError = false
-                }
-                if (this.showError){
-                  this.errorInfo = `请完善条件组${this.groupNames[i]}内的${subc.title}条件`
-                  err.push(`条件 ${this.config.name} 条件组${this.groupNames[i]}内${subc.title}条件未完善`)
-                  return false
-                }
-              }
-            }
-          }
-        }
-      }
-      return !this.showError;
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-
-
-.node-error-state {
-  .node-body {
-    box-shadow: 0px 0px 5px 0px #F56C6C !important;
-  }
-}
-
-.node {
-  padding: 30px 55px 0;
-  width: 220px;
-
-  .node-body {
-    cursor: pointer;
-    min-height: 80px;
-    max-height: 120px;
-    position: relative;
-    border-radius: 5px;
-    background-color: white;
-    box-shadow: 0px 0px 5px 0px #d8d8d8;
-
-    &:hover {
-      .node-body-left, .node-body-right {
-        i {
-          display: block !important;
-        }
-      }
-
-      .node-body-main {
-        .level {
-          display: none !important;
-        }
-
-        .option {
-          display: inline-block !important;
-        }
-      }
-
-      box-shadow: 0px 0px 3px 0px @theme-primary;
-    }
-
-    .node-body-left, .node-body-right {
-      display: flex;
-      align-items: center;
-      position: absolute;
-      height: 100%;
-
-      i {
-        display: none;
-      }
-
-      &:hover {
-        background-color: #ececec;
-      }
-    }
-
-    .node-body-left {
-      left: 0;
-    }
-
-    .node-body-right {
-      right: 0;
-      top: 0;
-    }
-
-    .node-body-main {
-      //position: absolute;
-      width: 188px;
-      margin-left: 17px;
-      display: inline-block;
-
-      .node-body-main-header {
-        padding: 10px 0px 5px;
-        font-size: xx-small;
-        position: relative;
-
-        .title {
-          color: #15bca3;
-          display: inline-block;
-          height: 14px;
-          width: 125px;
-        }
-
-        .level {
-          position: absolute;
-          right: 15px;
-          color: #888888;
-        }
-
-        .option {
-          position: absolute;
-          right: 0;
-          display: none;
-          font-size: medium;
-
-          i {
-            color: #888888;
-            padding: 0 3px;
-          }
-        }
-      }
-
-      .node-body-main-content {
-        padding: 6px;
-        color: #656363;
-        font-size: 14px;
-
-        i {
-          position: absolute;
-          top: 55%;
-          right: 10px;
-          font-size: medium;
-        }
-
-        .placeholder {
-          color: #8c8c8c;
-        }
-      }
-    }
-
-    .node-error {
-      position: absolute;
-      right: -40px;
-      top: 20px;
-      font-size: 25px;
-      color: #F56C6C;
-    }
-  }
-
-  .node-footer {
-    position: relative;
-
-    .btn {
-      width: 100%;
-      display: flex;
-      height: 70px;
-      padding: 20px 0 32px;
-      justify-content: center;
-    }
-
-    /deep/ .el-button {
-      height: 32px;
-    }
-
-    &::before {
-      content: "";
-      position: absolute;
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      z-index: -1;
-      margin: auto;
-      width: 2px;
-      height: 100%;
-      background-color: #CACACA;
-    }
-  }
-}
-</style>

+ 0 - 342
.history/src/views/common/process/nodes/InclusiveNode_20240320142840.vue

@@ -1,342 +0,0 @@
-<template>
-  <div :class="{'node': true, 'node-error-state': showError}">
-    <div :class="{'node-body': true, 'error': showError}">
-      <div class="node-body-left" @click="$emit('leftMove')" v-if="level > 1 && $store.state.diagramMode !== 'viewer'">
-        <i class="el-icon-arrow-left"></i>
-      </div>
-      <div class="node-body-main" @click="$emit('selected')">
-        <div class="node-body-main-header">
-          <ellipsis class="title" hover-tip :content="config.name ? config.name : ('条件' + level)"/>
-          <span class="level">优先级{{ level }}</span>
-          <span class="option" v-if="$store.state.diagramMode !== 'viewer'">
-            <el-tooltip effect="dark" content="复制条件" placement="top">
-              <i class="el-icon-copy-document" @click.stop="$emit('copy')"></i>
-            </el-tooltip>
-            <i class="el-icon-close" @click.stop="$emit('delNode')"></i>
-          </span>
-        </div>
-        <div class="node-body-main-content">
-          <span class="placeholder" v-if="(content || '').trim() === ''">{{
-            level == size && size != 0 ? "其他条件进入此流程" : placeholder
-          }}</span>
-          <ellipsis hoverTip :row="4" :content="content" v-else/>
-        </div>
-      </div>
-      <div class="node-body-right" @click="$emit('rightMove')"
-           v-if="level < size && $store.state.diagramMode !== 'viewer'">
-        <i class="el-icon-arrow-right"></i>
-      </div>
-      <div class="node-error" v-if="showError">
-        <el-tooltip effect="dark" :content="errorInfo" placement="top-start">
-          <i class="el-icon-warning-outline"></i>
-        </el-tooltip>
-      </div>
-    </div>
-    <div class="node-footer">
-      <div class="btn">
-        <insert-button v-if="$store.state.diagramMode !== 'viewer'"
-                       @insertNode="type => $emit('insertNode', type)"></insert-button>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import InsertButton from '@/views/common/InsertButton.vue'
-import {ValueType} from '@/views/common/form/ComponentsConfigExport'
-
-const groupNames = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'];
-export default {
-  name: "InclusiveNode",
-  components: {InsertButton},
-  props: {
-    config: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    },
-    //索引位置
-    level: {
-      type: Number,
-      default: 1
-    },
-    //条件数
-    size: {
-      type: Number,
-      default: 0
-    }
-  },
-  data() {
-    return {
-      ValueType,
-      groupNames,
-      placeholder: '请设置条件',
-      errorInfo: '',
-      showError: false
-    }
-  },
-  computed: {
-    content() {
-      const groups = this.config.props.groups
-      let confitions = []
-      groups.forEach(group => {
-        let subConditions = []
-        group.conditions.forEach(subCondition => {
-          let subConditionStr = ''
-          switch (subCondition.valueType) {
-            case ValueType.dept:
-            case ValueType.user:
-              subConditionStr = `${subCondition.title}属于[${String(subCondition.value.map(u => u.name)).replaceAll(',', '. ')}]之一`
-              break;
-            case ValueType.number:
-            case ValueType.string:
-              subConditionStr = this.getOrdinaryConditionContent(subCondition)
-              break;
-          }
-          subConditions.push(subConditionStr)
-        })
-        //根据子条件关系构建描述
-        let subConditionsStr = String(subConditions)
-            .replaceAll(',', subConditions.length > 1 ?
-                (group.groupType === 'AND' ? ') 且 (' : ') 或 (') :
-                (group.groupType === 'AND' ? ' 且 ' : ' 或 '))
-        confitions.push(subConditions.length > 1 ? `(${subConditionsStr})` : subConditionsStr)
-      })
-      //构建最终描述
-      return String(confitions).replaceAll(',', (this.config.props.groupsType === 'AND' ? ' 且 ' : ' 或 '))
-    }
-  },
-  methods: {
-    getDefault(val, df) {
-      return val && val !== '' ? val : df;
-    },
-    getOrdinaryConditionContent(subCondition) {
-      switch (subCondition.compare) {
-        case 'IN':
-          return `${subCondition.title}为[${String(subCondition.value).replaceAll(',', '、')}]中之一`
-        case 'B':
-          return `${subCondition.value[0]} < ${subCondition.title} < ${subCondition.value[1]}`
-        case 'AB':
-          return `${subCondition.value[0]} ≤ ${subCondition.title} < ${subCondition.value[1]}`
-        case 'BA':
-          return `${subCondition.value[0]} < ${subCondition.title} ≤ ${subCondition.value[1]}`
-        case 'ABA':
-          return `${subCondition.value[0]} ≤ ${subCondition.title} ≤ ${subCondition.value[1]}`
-        case '<=':
-          return `${subCondition.title} ≤ ${this.getDefault(subCondition.value[0], ' ?')}`
-        case '>=':
-          return `${subCondition.title} ≥ ${this.getDefault(subCondition.value[0], ' ?')}`
-        default:
-          return `${subCondition.title}${subCondition.compare}${this.getDefault(subCondition.value[0], ' ?')}`
-      }
-    },
-    //校验数据配置的合法性
-    validate(err) {
-      console.log('inclusive children', this.config.children)
-      if (!(this.level == this.size && this.size != 0) && this.config.children && !this.config.children.id) {
-        this.showError = true
-        this.errorInfo = '条件分支后不能为空'
-        err.push(`条件分支后不能为空`)
-        return !this.showError
-      }
-
-      const props = this.config.props
-      if (props.groups.length <= 0){
-        this.showError = true
-        this.errorInfo = '请设置分支条件'
-        err.push(`${this.config.name} 未设置条件`)
-      }else {
-        if (!(this.level == this.size && this.size != 0)) {
-          for (let i = 0; i < props.groups.length; i++) {
-            if (props.groups[i].cids.length === 0){
-              this.showError = true
-              this.errorInfo = `请设置条件组${this.groupNames[i]}内的条件`
-              err.push(`条件 ${this.config.name} 条件组${this.groupNames[i]}内未设置条件`)
-              break
-            }else {
-              let conditions = props.groups[i].conditions
-              for (let ci = 0; ci < conditions.length; ci++) {
-                let subc = conditions[ci]
-                if (subc.value.length === 0){
-                  this.showError = true
-                }else {
-                  this.showError = false
-                }
-                if (this.showError){
-                  this.errorInfo = `请完善条件组${this.groupNames[i]}内的${subc.title}条件`
-                  err.push(`条件 ${this.config.name} 条件组${this.groupNames[i]}内${subc.title}条件未完善`)
-                  return false
-                }
-              }
-            }
-          }
-        }
-      }
-      return !this.showError;
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-
-
-.node-error-state {
-  .node-body {
-    box-shadow: 0px 0px 5px 0px #F56C6C !important;
-  }
-}
-
-.node {
-  padding: 30px 55px 0;
-  width: 220px;
-
-  .node-body {
-    cursor: pointer;
-    min-height: 80px;
-    max-height: 120px;
-    position: relative;
-    border-radius: 5px;
-    background-color: white;
-    box-shadow: 0px 0px 5px 0px #d8d8d8;
-
-    &:hover {
-      .node-body-left, .node-body-right {
-        i {
-          display: block !important;
-        }
-      }
-
-      .node-body-main {
-        .level {
-          display: none !important;
-        }
-
-        .option {
-          display: inline-block !important;
-        }
-      }
-
-      box-shadow: 0px 0px 3px 0px @theme-primary;
-    }
-
-    .node-body-left, .node-body-right {
-      display: flex;
-      align-items: center;
-      position: absolute;
-      height: 100%;
-
-      i {
-        display: none;
-      }
-
-      &:hover {
-        background-color: #ececec;
-      }
-    }
-
-    .node-body-left {
-      left: 0;
-    }
-
-    .node-body-right {
-      right: 0;
-      top: 0;
-    }
-
-    .node-body-main {
-      //position: absolute;
-      width: 188px;
-      margin-left: 17px;
-      display: inline-block;
-
-      .node-body-main-header {
-        padding: 10px 0px 5px;
-        font-size: xx-small;
-        position: relative;
-
-        .title {
-          color: #425c9d;
-          display: inline-block;
-          height: 14px;
-          width: 125px;
-        }
-
-        .level {
-          position: absolute;
-          right: 15px;
-          color: #888888;
-        }
-
-        .option {
-          position: absolute;
-          right: 0;
-          display: none;
-          font-size: medium;
-
-          i {
-            color: #888888;
-            padding: 0 3px;
-          }
-        }
-      }
-
-      .node-body-main-content {
-        padding: 6px;
-        color: #656363;
-        font-size: 14px;
-
-        i {
-          position: absolute;
-          top: 55%;
-          right: 10px;
-          font-size: medium;
-        }
-
-        .placeholder {
-          color: #8c8c8c;
-        }
-      }
-    }
-
-    .node-error {
-      position: absolute;
-      right: -40px;
-      top: 20px;
-      font-size: 25px;
-      color: #F56C6C;
-    }
-  }
-
-  .node-footer {
-    position: relative;
-
-    .btn {
-      width: 100%;
-      display: flex;
-      height: 70px;
-      padding: 20px 0 32px;
-      justify-content: center;
-    }
-
-    /deep/ .el-button {
-      height: 32px;
-    }
-
-    &::before {
-      content: "";
-      position: absolute;
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      z-index: -1;
-      margin: auto;
-      width: 2px;
-      height: 100%;
-      background-color: #CACACA;
-    }
-  }
-}
-</style>

+ 2 - 2
package.json

@@ -38,6 +38,8 @@
     "i": "^0.3.7",
     "js-cookie": "^3.0.5",
     "jsencrypt": "^3.2.2",
+    "less": "^3.12.2",
+    "less-loader": "^4.1.0",
     "moment": "^2.29.4",
     "node-sass": "^4.14.1",
     "normalize.css": "^8.0.1",
@@ -89,8 +91,6 @@
     "hash-sum": "^1.0.2",
     "html-webpack-plugin": "4.0.0-alpha",
     "husky": "0.14.3",
-    "less": "^4.2.0",
-    "less-loader": "^12.2.0",
     "lint-staged": "7.2.2",
     "mini-css-extract-plugin": "0.4.1",
     "node-notifier": "5.2.1",

+ 14 - 0
src/assets/theme.less

@@ -0,0 +1,14 @@
+//主题定制
+
+#1890FF: #1890FF; //主题色,应当与element-ui一致
+@theme-danger: #f56c6c; //主题色,应当与element-ui一致
+
+//审批流程节点配色
+@node-root: #576a95; //发起人
+@node-condition: #15bca3; //条件
+@node-cc: #3296fa; //抄送
+@node-concurrent: #718dff; //并行
+@node-approval: #ff943e;  //审批
+@node-delay: #f25643; //延时
+@node-trigger: #47bc82; //触发器
+

+ 3 - 2
src/components/common/OrgPicker.vue

@@ -303,6 +303,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
+ 
 
 @containWidth: 278px;
 
@@ -335,7 +336,7 @@ export default {
     }
     .next-dept {
       float: right;
-      color: @theme-primary;
+      color: #1890FF;
       cursor: pointer;
     }
 
@@ -398,7 +399,7 @@ export default {
         width: 35px;
         text-align: center;
         line-height: 35px;
-        background: @theme-primary;
+        background: #1890FF;
         color: white;
         border-radius: 50%;
       }

+ 4 - 0
src/index.vue

@@ -71,6 +71,7 @@
         </div>
       </div>
       <el-main class="main-content">
+        <el-button type="primary" @click="goWorkFlow">工作流</el-button>
         <router-view />
       </el-main>
     </el-container>
@@ -223,6 +224,9 @@ export default {
     })
   },
   methods: {
+    goWorkFlow(){
+      this.$router.push({path:'/admin/design'})
+    },
     openCursor(item){
       let urls=['https://www.yuque.com/xbddba/usmcgl?#','https://www.yuque.com/xbddba/qmvgbb?#','https://www.yuque.com/xbddba/pea8fp?#','https://www.yuque.com/xbddba/rtl7hs?#']
 

+ 13 - 0
src/utils/index.js

@@ -1,7 +1,20 @@
 /**
  * Created by jiachenpan on 16/11/18.
  */
+// 导出的流Blob,filename 导出的文件名
+export function downloadFileBlob(data,filename) {
+  if (!data) {
+        return
+    }
+    let url = window.URL.createObjectURL(new Blob([data]))
+    let link = document.createElement('a')
+    link.style.display = 'none'
+    link.href = url
+    link.setAttribute('download', filename)
 
+    document.body.appendChild(link)
+    link.click()
+}
 export function timestamps(item,num){//item:时间戳,num:0 YYYY-MM-DD  else YYYY-MM-DD hh:mm:ss
   if(item){
     item = item+'';

+ 2 - 1
src/views/admin/FormProcessDesign.vue

@@ -83,9 +83,10 @@ export default {
   created() {
     this.showValiding()
     let formId = this.$route.query.code
+    // console.log(this.$route.query)
     //判断传参,决定是新建还是加载原始数据
     this.loadInitFrom()
-    if (this.$isNotEmpty(formId)) {
+    if (this.isNotEmpty(formId)) {
       this.isNew = false
       this.loadFormInfo(formId)
     }

+ 6 - 7
src/views/admin/layout/FormDesign.vue

@@ -229,9 +229,8 @@ export default {
 
 <style lang="less" scoped>
 
-
 .choose {
-  border: 1px dashed @theme-primary !important;
+  border: 1px dashed #1890FF !important;
 }
 
 .process-form{
@@ -252,7 +251,7 @@ export default {
   background-color: #fff;
 
   .selected {
-    color: @theme-primary;
+    color: #1890FF;
   }
 
   .border {
@@ -271,7 +270,7 @@ export default {
     cursor: pointer;
 
     &:hover {
-      color: @theme-primary;
+      color: #1890FF;
     }
   }
 }
@@ -306,8 +305,8 @@ export default {
       background-color: #fff;
 
       &:hover {
-        border: 1px solid @theme-primary;
-        color: @theme-primary;
+        border: 1px solid #1890FF;
+        color: #1890FF;
       }
 
       i {
@@ -447,7 +446,7 @@ export default {
       z-index: 9999;
 
       &:hover {
-        border: 1px dashed @theme-primary;
+        border: 1px dashed #1890FF;
       }
     }
   }

+ 2 - 2
src/views/common/form/components/SpanLayout.vue

@@ -160,7 +160,7 @@ export default {
 
 
 .choose {
-  border: 1px dashed @theme-primary !important;
+  border: 1px dashed #1890FF !important;
 }
 
 .l-drag-from {
@@ -207,7 +207,7 @@ export default {
       padding: 5px;
 
       &:hover {
-        color: @theme-primary;
+        color: #1890FF;
       }
     }
   }

+ 2 - 2
src/views/common/form/components/TableList.vue

@@ -227,7 +227,7 @@ export default {
 }
 
 .choose {
-  border: 1px dashed @theme-primary !important;
+  border: 1px dashed #1890FF !important;
 }
 
 .table-column {
@@ -305,7 +305,7 @@ export default {
       padding: 5px;
 
       &:hover {
-        color: @theme-primary;
+        color: #1890FF;
       }
     }
   }

+ 1 - 1
src/views/common/process/nodes/ConcurrentNode.vue

@@ -91,7 +91,7 @@ export default {
           display: inline-block !important;
         }
       }
-      box-shadow: 0px 0px 3px 0px @theme-primary;
+      box-shadow: 0px 0px 3px 0px #1890FF;
     }
     .node-body-left, .node-body-right{
       display: flex;

+ 1 - 1
src/views/common/process/nodes/ConditionNode.vue

@@ -218,7 +218,7 @@ export default {
         }
       }
 
-      box-shadow: 0px 0px 3px 0px @theme-primary;
+      box-shadow: 0px 0px 3px 0px #1890FF;
     }
 
     .node-body-left, .node-body-right {

+ 1 - 1
src/views/common/process/nodes/InclusiveNode.vue

@@ -218,7 +218,7 @@ export default {
         }
       }
 
-      box-shadow: 0px 0px 3px 0px @theme-primary;
+      box-shadow: 0px 0px 3px 0px #1890FF;
     }
 
     .node-body-left, .node-body-right {

+ 1 - 1
src/views/common/process/nodes/Node.vue

@@ -127,7 +127,7 @@ export default {
     background-color: white;
     box-shadow: 0px 0px 5px 0px #d8d8d8;
     &:hover{
-      box-shadow: 0px 0px 3px 0px @theme-primary;
+      box-shadow: 0px 0px 3px 0px #1890FF;
       .node-body-header {
         .el-icon-close {
           display: inline;