cyy пре 11 месеци
родитељ
комит
4cb4400c55

+ 2 - 0
public/config.js

@@ -3,6 +3,8 @@
   global.__IBPS_CONFIG__ = {
     // 是否启用配置
     ENABLE_CONFIG: true,
+    // 是否启用数据库sql
+    DB_SQL_CONFIG: true,
     // 是否启用打卡
     CLOCK_CONFIG: true,
     BASE_URL,

+ 2 - 0
src/constant.js

@@ -73,3 +73,5 @@ export const ENCRYPT_GET_PARAMS = __IBPS_CONFIG__.ENCRYPT_GET_PARAMS || false
 
 export const clockConfig = __IBPS_CONFIG__.CLOCK_CONFIG || false
 
+export const dbSqlConfig = __IBPS_CONFIG__.DB_SQL_CONFIG || false
+

+ 35 - 12
src/utils/joinCURD.js

@@ -6,18 +6,18 @@ import { SHOW_PLAINTEXT } from '@/constant'
 import { getToken } from '@/utils/auth'
 
 // 请求方式默认POST
-const post = (type, data, method = 'post', loading = false) => {
-  const requestUrl = `business/v3/sys/universal/${normal[type]}`
-  // 非sql类型要关闭loading动画需传参loading:true
-  const isLoading = type === 'sql' ? loading : !loading
-  return request({
-    url: requestUrl,
-    method,
-    data: dealData(data, type),
-    // 开启表单提交加载,查询接口除外
-    isLoading
-  })
-}
+// const post = (type, data, method = 'post', loading = false) => {
+//   const requestUrl = `business/v3/sys/universal/${normal[type]}`
+//   // 非sql类型要关闭loading动画需传参loading:true
+//   const isLoading = type === 'sql' ? loading : !loading
+//   return request({
+//     url: requestUrl,
+//     method,
+//     data: dealData(data, type),
+//     // 开启表单提交加载,查询接口除外
+//     isLoading
+//   })
+// }
 
 const replaceNullWithEmpty = obj => {
   function replaceValue(value) {
@@ -38,6 +38,9 @@ const replaceNullWithEmpty = obj => {
 
 // // 处理数据
 const dealData = (args, type) => {
+  if (type === 'query') {
+    return JSON.stringify(args)
+  }
   // sql方法特殊处理
   if (type === 'sql') {
     args = {
@@ -53,4 +56,24 @@ const dealData = (args, type) => {
   return JSON.stringify(res)
 }
 
+const BASE_URL = 'business/v3/sys/universal/'
+const DEFAULT_METHOD = 'post'
+const DEFAULT_LOADING = false
+
+const post = (type, data, method = DEFAULT_METHOD, loading = DEFAULT_LOADING) => {
+  const requestUrl = `${BASE_URL}${normal[type]}`
+  const isQueryType = type === 'query'
+
+  // 查询类型默认无 loading 动画,非查询类型要关闭 loading 动画需传参 loading:true
+  const isLoading = ['sql', 'query'].includes(type) ? loading : !loading
+
+  return request({
+    url: requestUrl,
+    method,
+    isLoading,
+    data: dealData(data, type)
+    // ...(isQueryType ? { data: JSON } : { data: dealData(data, type) })
+  })
+}
+
 export default post

+ 9 - 5
src/utils/requestType.js

@@ -1,8 +1,12 @@
 // 通用请求,增删改查
 export const normal = {
-    // sql: 'encipher',
-    sql: 'general',
-    delete: 'batchDelete',
-    add: 'addDataContextTable',
-    update: 'updatesBatchContextTable'
+  // sql: 'encipher',
+  sql: 'general',
+  delete: 'batchDelete',
+  add: 'addDataContextTable',
+  // 批量更新:不同结果
+  update: 'updatesBatchContextTable',
+  // 批量更新:统一结果
+  updates: 'updateDatasContextTable',
+  query: 'queryData'
 }

+ 266 - 254
src/views/platform/bpmn/addiInspect/index.vue

@@ -1,8 +1,11 @@
 <template>
   <div :class="{'ibps-fixed-toolbar':checkMode}">
     <van-sticky>
-      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')" left-arrow @click-left="$router.push({ name: 'dashboard' })" />
+      <van-nav-bar
+:title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')"
+left-arrow
+@click-left="$router.push({ name: 'dashboard' })" />
       <van-search v-model="subject" show-action placeholder="请输入搜索关键词" @search="onSearch">
         <!-- <template #left>
           <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
@@ -16,7 +19,9 @@
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
         <van-checkbox-group v-model="checkedIds">
-          <van-cell v-for="(item,index) in listData" :key="item.id+index"
+          <van-cell
+v-for="(item,index) in listData"
+:key="item.id+index"
             :title="item.yang_pin_bian_hao==''?'/':item.yang_pin_bian_hao==null?'/':item.yang_pin_bian_hao"
             @click="onClick(item,index)">
             <template slot="icon">
@@ -55,8 +60,12 @@
       @close="visible => typeTreePopup = visible" /> -->
     <!-- 遮罩层 -->
     <template>
-      <van-popup v-model="ReachBottomShow" @close="onClose" ref="examPopup" :style="{  height: '100%',width:'100%'}"
-        position="bottom">
+      <van-popup
+ref="examPopup"
+v-model="ReachBottomShow"
+:style="{  height: '100%',width:'100%'}"
+position="bottom"
+        @close="onClose">
         <div style="width: 100%; padding: 3% 0; text-align: center;  color: #303030;border-bottom: 1px solid #ebe8e8;">
           <van-row>
             <van-col span="4"><van-icon name="cross" size="20px" @click="onClose" /></van-col>
@@ -161,287 +170,290 @@
 
 </template>
 <script>
-  import IbpsUploader from '@/business/platform/file/uploader'
-  import { mapState } from 'vuex'
-  import { myDraft, removeDraft } from '@/api/platform/office/bpmInitiated'
+import IbpsUploader from '@/business/platform/file/uploader'
+import { mapState } from 'vuex'
+import { myDraft, removeDraft } from '@/api/platform/office/bpmInitiated'
 
-  import ActionUtils from '@/utils/action'
-  import i18n from '@/utils/i18n'
-  import random from '@/mixins/random'
-  import bpmnStatus from '@/mixins/bpmnStatus'
+import ActionUtils from '@/utils/action'
+import i18n from '@/utils/i18n'
+import random from '@/mixins/random'
+import bpmnStatus from '@/mixins/bpmnStatus'
 
-  import IbpsMoreSearch from '@/components/ibps-more-search'
-  import IbpsTypeTree from '@/business/platform/cat/type/tree'
-  import IbpsAvatar from '@/components/ibps-avatar'
-  import IbpsToolbar from '@/components/ibps-toolbar'
-  import IbpsListResultPage from '@/components/ibps-list-result-page'
-  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+import IbpsMoreSearch from '@/components/ibps-more-search'
+import IbpsTypeTree from '@/business/platform/cat/type/tree'
+import IbpsAvatar from '@/components/ibps-avatar'
+import IbpsToolbar from '@/components/ibps-toolbar'
+import IbpsListResultPage from '@/components/ibps-list-result-page'
+import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-  export default {
-    components: {
-      IbpsMoreSearch,
-      IbpsTypeTree,
-      IbpsAvatar,
-      IbpsToolbar,
-      IbpsListResultPage,
-      IbpsBpmnFormrenderDialog,
-      IbpsUploader
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-      return {
-        page: 0,
-        id: '',
-        // footText: false,
-        // noData: false,
-        oralPopup: '',
-        ReachBottomShow: false,
-        stateActive: false,
-        moreSearchPopup: false,
-        typeTreePopup: false,
-        searchForms: {
-          forms: [
-            { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
-            // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
-            { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
-            { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } }
-          ]
-        },
+export default {
+  components: {
+    IbpsMoreSearch,
+    IbpsTypeTree,
+    IbpsAvatar,
+    IbpsToolbar,
+    IbpsListResultPage,
+    IbpsBpmnFormrenderDialog,
+    IbpsUploader
+  },
+  mixins: [random, bpmnStatus],
+  data() {
+    return {
+      page: 0,
+      id: '',
+      // footText: false,
+      // noData: false,
+      oralPopup: '',
+      ReachBottomShow: false,
+      stateActive: false,
+      moreSearchPopup: false,
+      typeTreePopup: false,
+      searchForms: {
+        forms: [
+          { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
+          // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
+        ]
+      },
 
-        subject: '',
-        typeId: '',
-        moreParams: {},
+      subject: '',
+      typeId: '',
+      moreParams: {},
 
-        listData: [],
-        pagination: {},
-        sorts: {},
+      listData: [],
+      pagination: {},
+      sorts: {},
 
-        loading: false,
-        finished: false,
-        refreshing: false,
-        resultType: 'init',
-        errorType: null,
-        resultMessage: null,
+      loading: false,
+      finished: false,
+      refreshing: false,
+      resultType: 'init',
+      errorType: null,
+      resultMessage: null,
 
-        checkMode: false,
-        checkedIds: [],
-        mainActions: [{
-          'name': this.$t('common.button.remove'),
-          'type': 'danger',
-          'callback': this.onRemove
-        }],
+      checkMode: false,
+      checkedIds: [],
+      mainActions: [{
+        'name': this.$t('common.button.remove'),
+        'type': 'danger',
+        'callback': this.onRemove
+      }],
 
-        proInstId: '',
-        defId: '',
-        formrenderVisible: false,
-        formrenderTitle: '',
-        current: 0,
-      }
-    },
+      proInstId: '',
+      defId: '',
+      formrenderVisible: false,
+      formrenderTitle: '',
+      current: 0
+    }
+  },
 
-    computed: {
-      ...mapState('ibps/user', [
-        'info'
-      ]),
-      rightText() {
-        return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-      },
-      selectedIds() {
-        return this.checkedIds.join(',')
-      }
+  computed: {
+    ...mapState('ibps/user', [
+      'info'
+    ]),
+    rightText() {
+      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
     },
-    methods: {
-      generateTitle(name, title) { // generateTitle by vue-i18n
-        return i18n.generateTitle(name, title)
-      },
-      /**
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
+  methods: {
+    generateTitle(name, title) { // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    /**
        * 加载数据
-       * 
+       *
       */
-      async loadData(j) {
-        this.loading = true
-        await this.getPositionobj()
-        let params = await this.getSearcFormData()
-        if (j == "search") {
-          this.page = 0
-        }
-        // let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%` + key + `%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${page},10`
-        let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%${this.subject}%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit} `
-        this.$common.request('sql', sql).then(res => {
-          ActionUtils.handleListDataCommon(this, res.variables)
-        }).catch(e => {
-          ActionUtils.handleErrorData(this, e)
-        })
-      },
-      // 获取positionobj数据
-      async getPositionobj() {
-        if (this.info && this.info.positions && this.info.positions.length > 0) {
-          let posiList = []
-          this.info.positions.forEach(item => {
-            let obj = `${item.id}.`
-            let objList = item.path.split(obj)
-            objList.forEach(it => {
-              posiList.push(it)
-            })
-          })
-          let position = this.info.positions.map(item => {
-            return item.id
+    async loadData(j) {
+      this.loading = true
+      await this.getPositionobj()
+      const params = await this.getSearcFormData()
+      if (j == 'search') {
+        this.page = 0
+      }
+      // let sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%` + key + `%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${page},10`
+      const sql = `select t_fjjysqdjb.*,m.bianzhibumen,m.shenqingneirong,m.bianzhiren,m.dengjirenyuan,m.jieshourenyuan from t_fjjysqdjb LEFT JOIN (select g.*,h.jieshourenyuan from (select e.*,f.dengjirenyuan from (select c.*,d.bianzhiren from (select a.*,b.shenqingneirong from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_fjjysqdjb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,group_concat(u.jian_yan_xiang_mu order by find_in_set(u.id_,t.shen_qing_nei_ron)) as shenqingneirong from t_fjjysqdjb as t inner join t_nlfwb as u on find_in_set(u.id_,t.shen_qing_nei_ron)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ =b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,u.NAME_ as dengjirenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.deng_ji_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_) as g LEFT JOIN (select t.id_ ,u.NAME_ as jieshourenyuan from t_fjjysqdjb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_ren_yuan)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as h on g.id_ = h.id_) as m on t_fjjysqdjb.id_ = m.id_ where find_in_set(t_fjjysqdjb.bian_zhi_bu_men_,'${this.positionObj}') and t_fjjysqdjb.yang_pin_bian_hao LIKE '%${this.subject}%' ORDER BY t_fjjysqdjb.create_time_ DESC LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit} `
+
+      // sql注入接口
+      this.$common.request('sql', sql).then(res => {
+        ActionUtils.handleListDataCommon(this, res.variables)
+      }).catch(e => {
+        ActionUtils.handleErrorData(this, e)
+      })
+    },
+    // 获取positionobj数据,列表查询变更后就不需要了
+    // sql注入接口
+    async getPositionobj() {
+      if (this.info && this.info.positions && this.info.positions.length > 0) {
+        let posiList = []
+        this.info.positions.forEach(item => {
+          const obj = `${item.id}.`
+          const objList = item.path.split(obj)
+          objList.forEach(it => {
+            posiList.push(it)
           })
-          let posiSql = ``
-          position.forEach((item, index) => {
-            if (index == 0) {
-              let obj = `path_ like '%${item}%'`
-              posiSql += obj
+        })
+        const position = this.info.positions.map(item => {
+          return item.id
+        })
+        let posiSql = ``
+        position.forEach((item, index) => {
+          if (index == 0) {
+            const obj = `path_ like '%${item}%'`
+            posiSql += obj
+          } else {
+            const obj = `or path_ like '%${item}%'`
+            posiSql += obj
+          }
+        })
+        const sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
+        await this.$common.request('sql', sql).then(res => {
+          if (res.state == '200') {
+            const data = res.variables.data
+            if (data.length > 0) {
+              data.forEach(item => {
+                posiList.push(item.ID_)
+              })
+              // 数组去空值
+              posiList = posiList.filter(item => item)
+              // 部门上下级的id去重
+              const positionSet = Array.from(new Set(posiList))
+              this.positionObj = positionSet.join(',')
             } else {
-              let obj = `or path_ like '%${item}%'`
-              posiSql += obj
-            }
-          })
-          let sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
-          await this.$common.request('sql', sql).then(res => {
-            if (res.state == '200') {
-              const data = res.variables.data
-              if (data.length > 0) {
-                data.forEach(item => {
-                  posiList.push(item.ID_)
-                })
-                // 数组去空值
-                posiList = posiList.filter(item => item)
-                // 部门上下级的id去重
-                let positionSet = Array.from(new Set(posiList))
-                this.positionObj = positionSet.join(",")
-              } else {
-                this.positionObj = ''
-              }
+              this.positionObj = ''
             }
-          })
-        } else {
-          this.positionObj = ''
-        }
-      },
-      /**
+          }
+        })
+      } else {
+        this.positionObj = ''
+      }
+    },
+    /**
        * 获取格式化参数
        */
-      getSearcFormData() {
-        let params = {}
-        if (this.$utils.isNotEmpty(this.subject)) {
-          params['Q^subject_^SL'] = this.subject
-        }
-        if (this.$utils.isNotEmpty(this.moreParams)) {
-          params = Object.assign(params, this.moreParams)
-        }
-        return ActionUtils.formatParams(
-          params,
-          this.pagination,
-          this.sorts)
-      },
-      /**
+    getSearcFormData() {
+      let params = {}
+      if (this.$utils.isNotEmpty(this.subject)) {
+        params['Q^subject_^SL'] = this.subject
+      }
+      if (this.$utils.isNotEmpty(this.moreParams)) {
+        params = Object.assign(params, this.moreParams)
+      }
+      return ActionUtils.formatParams(
+        params,
+        this.pagination,
+        this.sorts)
+    },
+    /**
        * 下拉刷新
        */
-      onRefresh() {
-        // this.footText = false
-        this.refreshing = true
-        this.finished = false
-        this.loading = true
-        this.onSearch()
-      },
-      /**
+    onRefresh() {
+      // this.footText = false
+      this.refreshing = true
+      this.finished = false
+      this.loading = true
+      this.onSearch()
+    },
+    /**
        * 查询
        */
-      onSearch() {
-        this.stateActive = false
-        ActionUtils.initListData(this)
-        this.loadData('search')
-      },
-      /**
+    onSearch() {
+      this.stateActive = false
+      ActionUtils.initListData(this)
+      this.loadData('search')
+    },
+    /**
        * 高级查询
        */
-      onMoreSearch(params) {
-        if (this.$utils.isNotEmpty(this.typeId)) {
-          params['Q^type_id_^SL'] = this.typeId
-        }
-        this.moreParams = params
-        this.onSearch()
-        if (this.$utils.isNotEmpty(params)) {
-          this.stateActive = true
-        }
-      },
-      /**
+    onMoreSearch(params) {
+      if (this.$utils.isNotEmpty(this.typeId)) {
+        params['Q^type_id_^SL'] = this.typeId
+      }
+      this.moreParams = params
+      this.onSearch()
+      if (this.$utils.isNotEmpty(params)) {
+        this.stateActive = true
+      }
+    },
+    /**
        * 弹窗更多查询条件
        */
-      clickMoreSearch() {
-        this.moreSearchPopup = true
-        this.stateActive = false
-      },
-      /**
+    clickMoreSearch() {
+      this.moreSearchPopup = true
+      this.stateActive = false
+    },
+    /**
        * 重置表单
        */
-      resetForm() {
-        this.typeId = ''
-      },
-      getTaskDesc(v) {
-        if (!v.includes('#')) {
-          return ''
-        }
-        return v.split('#')[1] || ''
-      },
-      // 点击左边显示
-      clickType() {
-        this.typeTreePopup = true
-      },
-      clickTypeNode(data) {
-        this.typeId = data.id
-        this.onMoreSearch({})
-      },
-      onClick(item, index) {
-        this.id = item.id_
-        this.ReachBottomShow = true
-        this.oralPopup = item
-      },
-      onRefreshPage() {
+    resetForm() {
+      this.typeId = ''
+    },
+    getTaskDesc(v) {
+      if (!v.includes('#')) {
+        return ''
+      }
+      return v.split('#')[1] || ''
+    },
+    // 点击左边显示
+    clickType() {
+      this.typeTreePopup = true
+    },
+    clickTypeNode(data) {
+      this.typeId = data.id
+      this.onMoreSearch({})
+    },
+    onClick(item, index) {
+      this.id = item.id_
+      this.ReachBottomShow = true
+      this.oralPopup = item
+    },
+    onRefreshPage() {
+      this.checkedIds = []
+      this.checkMode = false
+      this.onRefresh()
+    },
+    toCheckMode() {
+      if (this.$utils.isEmpty(this.listData)) {
+        return
+      }
+      if (this.checkMode) {
+        // this.show = true
         this.checkedIds = []
-        this.checkMode = false
-        this.onRefresh()
-      },
-      toCheckMode() {
-        if (this.$utils.isEmpty(this.listData)) {
-          return
-        }
-        if (this.checkMode) {
-          // this.show = true
-          this.checkedIds = []
-        }
-        this.checkMode = !this.checkMode
-      },
-      onRemove() {
-        if (this.checkedIds.length === 0) {
+      }
+      this.checkMode = !this.checkMode
+    },
+    onRemove() {
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
+      this.$dialog.confirm({
+        title: this.$t('common.dialog.warn'),
+        message: this.$t('common.operate.makeSure')
+      }).then(() => {
+        removeDraft({ ids: this.selectedIds }).then(response => {
           this.$notify({
-            type: 'warning',
-            message: this.$t('common.dialog.selectedRecords')
-          })
-          return
-        }
-        this.$dialog.confirm({
-          title: this.$t('common.dialog.warn'),
-          message: this.$t('common.operate.makeSure')
-        }).then(() => {
-          removeDraft({ ids: this.selectedIds }).then(response => {
-            this.$notify({
-              type: 'success',
-              message: '删除草稿成功!'
-            })
-            this.onRefreshPage()
-          }).catch((e) => {
-            console.error(e)
+            type: 'success',
+            message: '删除草稿成功!'
           })
+          this.onRefreshPage()
+        }).catch((e) => {
+          console.error(e)
         })
-      },
-      onClose() {
-        this.ReachBottomShow = false
-      },
+      })
+    },
+    onClose() {
+      this.ReachBottomShow = false
     }
-
   }
+
+}
 </script>
 <style lang="scss" scoped>
   .showPopups {
@@ -467,4 +479,4 @@
       overflow-wrap: break-word;
     }
   }
-</style>
+</style>

+ 543 - 538
src/views/platform/bpmn/communication/communication.vue

@@ -228,574 +228,579 @@ import bpmnStatus from '@/mixins/bpmnStatus'
 import IbpsUploader from '@/business/platform/file/uploader'
 
 import {
-    getNextIdByAlias,
-    findFormJsonByBo,
-    snapshot
+  getNextIdByAlias,
+  findFormJsonByBo,
+  snapshot
 } from '@/api/platform/form/transfer'
 import { agree } from '@/api/platform/bpmn/bpmTask'
 
+import { dbSqlConfig } from '@/constant'
+
 export default {
-    components: {
-        IbpsUploader
+  components: {
+    IbpsUploader
+  },
+  mixins: [random, bpmnStatus],
+  props: {
+    showPop: {
+      type: Boolean,
+      default: false
+    },
+    typeValue: {
+      type: String,
+      default: '3'
     },
-    mixins: [random, bpmnStatus],
-    props: {
-        showPop: {
-            type: Boolean,
-            default: false
+    id: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    const { useId, userInfo } = this.$store.getters
+    return {
+      useId,
+      userInfo,
+      show: this.showPop,
+      // typeValue: '3',
+      sheetShow: false,
+      taskId: '',
+      form: {
+        xuanZeKeHu: '',
+        biaoDanBianHao: '',
+        buMenName: '',
+        keHuDanWeiMin: '',
+        keHuLianXiRen: '',
+        weiTuoDanHao: '',
+        lianXiDianHua: '',
+        yangPinMingCheng: '',
+        yangPinBianHao: '',
+        yangPinLeiXing: '',
+        baoGaoBianHao: '',
+        gouTongLeiXing: '',
+        gouTongNeiRong: '',
+        keHu: '',
+        gouTongQueDingNei: '',
+        leiXing: '2',
+        yongHuYouXiang: '',
+        qiTa: ''
+      },
+      fuJianShangChuanArray: [],
+      popupShow: false,
+      list: [
+        {
+          text: '投诉'
         },
-        typeValue: {
-            type: String,
-            default: '3'
+        {
+          text: '检验项目'
         },
-        id: {
-            type: String,
-            default: ''
-        }
-    },
-    data() {
-        const { useId, userInfo } = this.$store.getters
-        return {
-            useId,
-            userInfo,
-            show: this.showPop,
-            // typeValue: '3',
-            sheetShow: false,
-            taskId: '',
-            form: {
-                xuanZeKeHu: '',
-                biaoDanBianHao: '',
-                buMenName: '',
-                keHuDanWeiMin: '',
-                keHuLianXiRen: '',
-                weiTuoDanHao: '',
-                lianXiDianHua: '',
-                yangPinMingCheng: '',
-                yangPinBianHao: '',
-                yangPinLeiXing: '',
-                baoGaoBianHao: '',
-                gouTongLeiXing: '',
-                gouTongNeiRong: '',
-                keHu: '',
-                gouTongQueDingNei: '',
-                leiXing: '2',
-                yongHuYouXiang: '',
-                qiTa: ''
-            },
-            fuJianShangChuanArray: [],
-            popupShow: false,
-            list: [
-                {
-                    text: '投诉'
-                },
-                {
-                    text: '检验项目'
-                },
-                {
-                    text: '危机值报告'
-                },
-                {
-                    text: '口头报告结果'
-                },
-                {
-                    text: '延迟报告'
-                },
-                {
-                    text: '其它'
-                }
-            ],
-            kehuXinXinList: [],
-
-            weiTuoList: [],
-            bianZhiRenName: '',
-            queDingRenName: '',
-            backShow: false,
-            option: '',
-            content: '',
-            timeShow: false,
-            params: {
-                year: true,
-                month: true,
-                day: true,
-                hour: true,
-                minute: true,
-                second: false
-            },
-            level: null,
-            mainPosition: {
-                id: ''
-            },
-            xuanzeTime: null
-        }
-    },
-    computed: {
-        rightText() {
-            return this.checkMode
-                ? this.$t('common.button.cancel')
-                : this.$t('common.button.manage')
+        {
+          text: '危机值报告'
+        },
+        {
+          text: '口头报告结果'
+        },
+        {
+          text: '延迟报告'
         },
-        selectedIds() {
-            return this.checkedIds.join(',')
+        {
+          text: '其它'
         }
+      ],
+      kehuXinXinList: [],
+
+      weiTuoList: [],
+      bianZhiRenName: '',
+      queDingRenName: '',
+      backShow: false,
+      option: '',
+      content: '',
+      timeShow: false,
+      params: {
+        year: true,
+        month: true,
+        day: true,
+        hour: true,
+        minute: true,
+        second: false
+      },
+      level: null,
+      mainPosition: {
+        id: ''
+      },
+      xuanzeTime: null
+    }
+  },
+  computed: {
+    rightText() {
+      return this.checkMode
+        ? this.$t('common.button.cancel')
+        : this.$t('common.button.manage')
     },
-    watch: {
-        showPop: {
-            handler: function(val, oldVal) {
-                if (val === true) {
-                    this.form = {
-                        xuanZeKeHu: '',
-                        biaoDanBianHao: '',
-                        buMenName: '',
-                        keHuDanWeiMin: '',
-                        keHuLianXiRen: '',
-                        weiTuoDanHao: '',
-                        lianXiDianHua: '',
-                        yangPinMingCheng: '',
-                        yangPinBianHao: '',
-                        yangPinLeiXing: '',
-                        baoGaoBianHao: '',
-                        gouTongLeiXing: '',
-                        gouTongNeiRong: '',
-                        keHu: '',
-                        gouTongQueDingNei: '',
-                        leiXing: '2',
-                        yongHuYouXiang: '',
-                        qiTa: ''
-                    }
-                    this.getKehu()
-                    this.level = this.$store.getters.level
-                    const mid = JSON.parse(localStorage.getItem('mainPosition'))
-                    const mainPosition =
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
+  watch: {
+    showPop: {
+      handler: function(val, oldVal) {
+        if (val === true) {
+          this.form = {
+            xuanZeKeHu: '',
+            biaoDanBianHao: '',
+            buMenName: '',
+            keHuDanWeiMin: '',
+            keHuLianXiRen: '',
+            weiTuoDanHao: '',
+            lianXiDianHua: '',
+            yangPinMingCheng: '',
+            yangPinBianHao: '',
+            yangPinLeiXing: '',
+            baoGaoBianHao: '',
+            gouTongLeiXing: '',
+            gouTongNeiRong: '',
+            keHu: '',
+            gouTongQueDingNei: '',
+            leiXing: '2',
+            yongHuYouXiang: '',
+            qiTa: ''
+          }
+          this.getKehu()
+          this.level = this.$store.getters.level
+          const mid = JSON.parse(localStorage.getItem('mainPosition'))
+          const mainPosition =
             mid ||
             (this.userInfo && this.userInfo.mainPosition
-                ? this.userInfo.mainPosition
-                : null)
-                    this.mainPosition = mainPosition
-                    if (this.id && this.id !== '') {
-                        // this.id = this.id
-                        this.getDe(this.id)
-                    } else {
-                        this.getGtbh()
-                    }
-                    // if (this.typeValue) {
-                    //   this.typeValue = this.typeValue
-                    // }
-                }
-            },
-            immediate: true
+              ? this.userInfo.mainPosition
+              : null)
+          this.mainPosition = mainPosition
+          if (this.id && this.id !== '') {
+            // this.id = this.id
+            this.getDe(this.id)
+          } else {
+            this.getGtbh()
+          }
+          // if (this.typeValue) {
+          //   this.typeValue = this.typeValue
+          // }
         }
+      },
+      immediate: true
+    }
+  },
+  created() {},
+  methods: {
+    closePop() {
+      this.$emit('updataSet', false)
     },
-    created() {},
-    methods: {
-        closePop() {
-            this.$emit('updataSet', false)
-        },
-        toCheckMode() {
-            if (this.$utils.isEmpty(this.listData)) {
-                return
-            }
-            if (this.checkMode) {
-                this.showA = true
-                this.checkedIds = []
-            }
-            this.checkMode = !this.checkMode
-        },
-        actionSheetCallback(e) {
-            this.form.gouTongLeiXing = e.text
-            this.sheetShow = false
-        },
-        timeShowCallback(e) {
-            const nowDate = new Date(e.getTime() + 8 * 60 * 60 * 1000)
-            const time = nowDate
-                .toJSON()
-                .split('T')
-                .join(' ')
-                .substr(0, 16)
-            this.form.gouTongRiQi = time
-            this.timeShow = false
-        },
-        gouTongRiQiClick(e) {
-            this.timeShow = true
-        },
-        // 获取上传状态
-        select(file) {
-            this.$uploades.selectUpload(file).then(res => {
-                res.forEach(item => {
-                    this.fuJianShangChuanArray.push(item)
-                })
-            })
-        },
-        // 删除
-        deleteMe(id) {
-            this.fuJianShangChuanArray = this.fuJianShangChuanArray.filter(
-                item => item.id !== id
-            )
-        },
-        // 获取上传进度
-        progress(e) {},
-        // 上传成功
-        success(file) {},
-        // 上传失败
-        fail(e) {},
-        // 弹出框显示
-        qianming(index) {
-            this.popupShow = true
-        },
-        // 清除签名
-        deqianming(index) {
-            this.form.keHu = ''
-        },
-        // 保存签名
-        save(val) {
-            this.form.keHu = val
-            this.popupShow = false
-        },
-        // 清除签名
-        clear(val) {
-            this.form.keHu = ''
-        },
-        /**
+    toCheckMode() {
+      if (this.$utils.isEmpty(this.listData)) {
+        return
+      }
+      if (this.checkMode) {
+        this.showA = true
+        this.checkedIds = []
+      }
+      this.checkMode = !this.checkMode
+    },
+    actionSheetCallback(e) {
+      this.form.gouTongLeiXing = e.text
+      this.sheetShow = false
+    },
+    timeShowCallback(e) {
+      const nowDate = new Date(e.getTime() + 8 * 60 * 60 * 1000)
+      const time = nowDate
+        .toJSON()
+        .split('T')
+        .join(' ')
+        .substr(0, 16)
+      this.form.gouTongRiQi = time
+      this.timeShow = false
+    },
+    gouTongRiQiClick(e) {
+      this.timeShow = true
+    },
+    // 获取上传状态
+    select(file) {
+      this.$uploades.selectUpload(file).then(res => {
+        res.forEach(item => {
+          this.fuJianShangChuanArray.push(item)
+        })
+      })
+    },
+    // 删除
+    deleteMe(id) {
+      this.fuJianShangChuanArray = this.fuJianShangChuanArray.filter(
+        item => item.id !== id
+      )
+    },
+    // 获取上传进度
+    progress(e) {},
+    // 上传成功
+    success(file) {},
+    // 上传失败
+    fail(e) {},
+    // 弹出框显示
+    qianming(index) {
+      this.popupShow = true
+    },
+    // 清除签名
+    deqianming(index) {
+      this.form.keHu = ''
+    },
+    // 保存签名
+    save(val) {
+      this.form.keHu = val
+      this.popupShow = false
+    },
+    // 清除签名
+    clear(val) {
+      this.form.keHu = ''
+    },
+    /**
      * 关闭签名弹窗
      */
-        close() {
-            this.popupShow = false
-        },
+    close() {
+      this.popupShow = false
+    },
 
-        // 获取样品编号
-        getGtbh(callback) {
-            const smsParams = {
-                alias: 'gtbh'
-            }
-            const this_ = this
-            getNextIdByAlias(smsParams).then(res => {
-                if (res.state === 200) {
-                    const data = res.data
-                    this_.form.biaoDanBianHao = data
-                }
-            })
-        },
-        getKehu() {
-            const info = this.$store.getters.userInfo
-            if (info) {
-                this.form.keHuDanWeiMin = info.user.qq
-                this.form.lianXiDianHua = info.user.mobile
-                // this.form.keHuDanWeiMingChe = info.user.id
-                this.form.keHuLianXiRen = info.user.fullname
-                this.form.gouTongLeiXing = '投诉'
-                this.form.gouTongRiQi = this.$methCommon.time(16)
-                this.xuanzeTime = new Date()
-                this.form.yongHuYouXiang = info.user.email
-            }
-        },
-        getDe(id) {
-            const sql = `select * from t_khgtjlb where id_ = ${id}`
+    // 获取样品编号
+    getGtbh(callback) {
+      const smsParams = {
+        alias: 'gtbh'
+      }
+      const this_ = this
+      getNextIdByAlias(smsParams).then(res => {
+        if (res.state === 200) {
+          const data = res.data
+          this_.form.biaoDanBianHao = data
+        }
+      })
+    },
+    getKehu() {
+      const info = this.$store.getters.userInfo
+      if (info) {
+        this.form.keHuDanWeiMin = info.user.qq
+        this.form.lianXiDianHua = info.user.mobile
+        // this.form.keHuDanWeiMingChe = info.user.id
+        this.form.keHuLianXiRen = info.user.fullname
+        this.form.gouTongLeiXing = '投诉'
+        this.form.gouTongRiQi = this.$methCommon.time(16)
+        this.xuanzeTime = new Date()
+        this.form.yongHuYouXiang = info.user.email
+      }
+    },
+    getDe(id) {
+      const sql = `select * from t_khgtjlb where id_ = ${id}`
 
-            this.$common.request('sql', sql).then(res => {
-                if (res.state === 200) {
-                    const data = res.variables.data[0]
-                    this.form = {
-                        id: data.id_,
-                        xuanZeKeHu: data.xuan_ze_ke_hu_,
-                        biaoDanBianHao: data.biao_dan_bian_hao,
-                        buMenName: data.xuan_ze_ke_hu_,
-                        keHuDanWeiMin: data.ke_hu_dan_wei_min,
-                        keHuLianXiRen: data.ke_hu_lian_xi_ren,
-                        weiTuoDanHao: data.wei_tuo_dan_hao_,
-                        lianXiDianHua: data.lian_xi_dian_hua_,
-                        yangPinMingCheng: data.yang_pin_ming_che,
-                        yangPinBianHao: data.yang_pin_bian_hao,
-                        yangPinLeiXing: data.yang_pin_lei_xing,
-                        baoGaoBianHao: data.bao_gao_bian_hao_,
-                        gouTongLeiXing: data.gou_tong_lei_xing,
-                        gouTongNeiRong: data.gou_tong_nei_rong,
-                        keHu: data.ke_hu_,
-                        gouTongQueDingNei: data.gou_tong_que_ding,
-                        leiXing: data.lei_xing_,
-                        bianZhiShiJian: data.bian_zhi_shi_jian,
-                        gouTongRiQi: data.gou_tong_ri_qi_,
-                        yongHuYouXiang: data.yong_hu_you_xiang,
-                        gouTongRenYuan: data.gou_tong_ren_yuan,
-                        fuJian: data.fu_jian_
-                    }
-                    if (this.typeValue === '2' || this.typeValue === '4') {
-                        this.getTaskId(data.id_)
-                    }
-                }
-            })
-        },
-        getFileList(ids) {
-            this.$uploades.getFilesList(ids, this).then(res => {
-                this.fuJianShangChuanArray = res
-            })
-        },
-        onSubmit() {
-            if (!this.getYanZheng()) {
-                return
-            }
-            const tmpArray = []
-            this.fuJianShangChuanArray.forEach(item => {
-                tmpArray.push(item.id)
-            })
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddyhgthqdtsjcx', params: [id] } : sql).then(res => {
+        if (res.state === 200) {
+          const data = res.variables.data[0]
+          this.form = {
+            id: data.id_,
+            xuanZeKeHu: data.xuan_ze_ke_hu_,
+            biaoDanBianHao: data.biao_dan_bian_hao,
+            buMenName: data.xuan_ze_ke_hu_,
+            keHuDanWeiMin: data.ke_hu_dan_wei_min,
+            keHuLianXiRen: data.ke_hu_lian_xi_ren,
+            weiTuoDanHao: data.wei_tuo_dan_hao_,
+            lianXiDianHua: data.lian_xi_dian_hua_,
+            yangPinMingCheng: data.yang_pin_ming_che,
+            yangPinBianHao: data.yang_pin_bian_hao,
+            yangPinLeiXing: data.yang_pin_lei_xing,
+            baoGaoBianHao: data.bao_gao_bian_hao_,
+            gouTongLeiXing: data.gou_tong_lei_xing,
+            gouTongNeiRong: data.gou_tong_nei_rong,
+            keHu: data.ke_hu_,
+            gouTongQueDingNei: data.gou_tong_que_ding,
+            leiXing: data.lei_xing_,
+            bianZhiShiJian: data.bian_zhi_shi_jian,
+            gouTongRiQi: data.gou_tong_ri_qi_,
+            yongHuYouXiang: data.yong_hu_you_xiang,
+            gouTongRenYuan: data.gou_tong_ren_yuan,
+            fuJian: data.fu_jian_
+          }
+          if (this.typeValue === '2' || this.typeValue === '4') {
+            this.getTaskId(data.id_)
+          }
+        }
+      })
+    },
+    getFileList(ids) {
+      this.$uploades.getFilesList(ids, this).then(res => {
+        this.fuJianShangChuanArray = res
+      })
+    },
+    onSubmit() {
+      if (!this.getYanZheng()) {
+        return
+      }
+      const tmpArray = []
+      this.fuJianShangChuanArray.forEach(item => {
+        tmpArray.push(item.id)
+      })
 
-            const info = this.$store.getters.userInfo
-            const useId = info.user.id
-            const detpId = info.employee.positions
-            const para = {
-                parameters: [
-                    {
-                        key: 'defId',
-                        value: '1056942070293331968'
-                    },
-                    {
-                        key: 'version',
-                        value: '0'
-                    },
-                    {
-                        key: 'data',
-                        value: ''
-                    }
-                ]
-            }
-            // this.form.fuJian = tmpArray.join(',')
-            this.form.bianZhiRen = useId
-            this.form.bianZhiShiJian = this.$methCommon.time(16)
-            this.form.bianZhiBuMen = this.mainPosition===null ?  detpId : this.mainPosition.id
-            // this.form.bianZhiBuMen = detpId
+      const info = this.$store.getters.userInfo
+      const useId = info.user.id
+      const detpId = info.employee.positions
+      const para = {
+        parameters: [
+          {
+            key: 'defId',
+            value: '1056942070293331968'
+          },
+          {
+            key: 'version',
+            value: '0'
+          },
+          {
+            key: 'data',
+            value: ''
+          }
+        ]
+      }
+      // this.form.fuJian = tmpArray.join(',')
+      this.form.bianZhiRen = useId
+      this.form.bianZhiShiJian = this.$methCommon.time(16)
+      this.form.bianZhiBuMen = this.mainPosition === null ? detpId : this.mainPosition.id
+      // this.form.bianZhiBuMen = detpId
 
-            this.form.shiFouGuoShen = '已编制'
-            this.form.diDian = this.level.second
-            this.form.xuanZeKeHu = useId
-            para.parameters[2].value = JSON.stringify(this.form)
-            const that = this
+      this.form.shiFouGuoShen = '已编制'
+      this.form.diDian = this.level.second
+      this.form.xuanZeKeHu = useId
+      para.parameters[2].value = JSON.stringify(this.form)
+      const that = this
 
-            findFormJsonByBo(para)
-                .then(res => {
-                    if (res.state === 200) {
-                        that.$toast.success('提交成功!')
-                        setTimeout(() => {
-                            that.closePop()
-                        }, 1000)
-                    }
-                })
-                .catch(() => {})
-        },
-        onAgree(shiFouGuoShen, opinion, type) {
-            if (this.typeValue !== '2' && !this.getYanZheng()) {
-                return
-            }
-            // const info = this.$store.getters.userInfo
-            // const useId = info.user.id
-            // const detpId = info.employee.positions
-            const tmpArray = []
-            this.fuJianShangChuanArray.forEach(item => {
-                tmpArray.push(item.id)
-            })
-            this.form.fuJian = tmpArray.join(',')
-            this.form.shiFouGuoShen = shiFouGuoShen
-            this.form.diDian = this.level.second
-            this.form.shiFouGuoShen = shiFouGuoShen
-            const editData = {
-                data: JSON.stringify(this.form),
-                opinion: opinion,
-                taskId: this.taskId
-            }
-            agree(editData).then(res => {
-                if (res.state === 200) {
-                    if (this.typeValue === '2') {
-                        setTimeout(() => {
-                            this.getPath(this.id)
-                        }, 1000)
-                    } else {
-                        this.$toast.success(type + '成功!')
-                        this.closePop()
-                    }
-                    this.$toast.success(type + '成功!')
-                    setTimeout(() => {
-                        this.closePop()
-                    }, 1000)
-                } else {
-                    this.$toast.fail(type + '异常!')
-                }
-            })
-        },
-        // 生成快照
-        getPath(id) {
-            const org = this.level.first
+      findFormJsonByBo(para)
+        .then(res => {
+          if (res.state === 200) {
+            that.$toast.success('提交成功!')
+            setTimeout(() => {
+              that.closePop()
+            }, 1000)
+          }
+        })
+        .catch(() => {})
+    },
+    onAgree(shiFouGuoShen, opinion, type) {
+      if (this.typeValue !== '2' && !this.getYanZheng()) {
+        return
+      }
+      // const info = this.$store.getters.userInfo
+      // const useId = info.user.id
+      // const detpId = info.employee.positions
+      const tmpArray = []
+      this.fuJianShangChuanArray.forEach(item => {
+        tmpArray.push(item.id)
+      })
+      this.form.fuJian = tmpArray.join(',')
+      this.form.shiFouGuoShen = shiFouGuoShen
+      this.form.diDian = this.level.second
+      this.form.shiFouGuoShen = shiFouGuoShen
+      const editData = {
+        data: JSON.stringify(this.form),
+        opinion: opinion,
+        taskId: this.taskId
+      }
+      agree(editData).then(res => {
+        if (res.state === 200) {
+          if (this.typeValue === '2') {
+            setTimeout(() => {
+              this.getPath(this.id)
+            }, 1000)
+          } else {
+            this.$toast.success(type + '成功!')
+            this.closePop()
+          }
+          this.$toast.success(type + '成功!')
+          setTimeout(() => {
+            this.closePop()
+          }, 1000)
+        } else {
+          this.$toast.fail(type + '异常!')
+        }
+      })
+    },
+    // 生成快照
+    getPath(id) {
+      const org = this.level.first
 
-            const url = this.$common.getRequest.downloadReport(
-                '咨询活动/客户沟通记录表.rpx',
-                `id_=${id}&org_=${org}`
-            )
-            const data = {
-                url,
-                name: '用户沟通记录表' + this.$methCommon.time(19),
-                type: 'pdf'
-            }
-            snapshot(data).then(res => {
-                const result = res.data
-                if (result.state === 200) {
-                    this.updateData(id, result.data.id)
-                }
-            })
-        },
-        updateData(id, fileId) {
-            const pp = {
-                updList: [
-                    {
-                        where: {
-                            id_: id
-                        },
-                        param: {
-                            kuai_zhao_: fileId,
-                            shi_fou_guo_shen_: '已完成'
-                        }
-                    }
-                ],
-                tableName: 't_khgtjlb'
-            }
-            const data = this.$sig(pp)
-            this.$common.request('update', data).then(res => {
-                this.$methCommon.getPrompt('提交成功', 'success')
-                setTimeout(() => {
-                    this.closePop()
-                }, 1000)
-            })
-        },
-        getYanZheng() {
-            const suList = [
-                'keHuLianXiRen',
-                'keHuDanWeiMin',
-                'lianXiDianHua',
-                'yongHuYouXiang',
-                'weiTuoDanHao',
-                'gouTongNeiRong'
-            ]
-            const suListName = [
-                '用户姓名',
-                '用户单位',
-                '联系电话',
-                '用户邮箱',
-                '沟通事项',
-                '沟通内容'
-            ]
-            for (const item in suList) {
-                if (!this.form[suList[item]]) {
-                    this.$toast({
-                        duration: 2000, // 持续展示 toast
-                        message: '请输入' + suListName[item]
-                    })
-                    return false
-                }
+      const url = this.$common.getRequest.downloadReport(
+        '咨询活动/客户沟通记录表.rpx',
+        `id_=${id}&org_=${org}`
+      )
+      const data = {
+        url,
+        name: '用户沟通记录表' + this.$methCommon.time(19),
+        type: 'pdf'
+      }
+      snapshot(data).then(res => {
+        const result = res.data
+        if (result.state === 200) {
+          this.updateData(id, result.data.id)
+        }
+      })
+    },
+    updateData(id, fileId) {
+      const pp = {
+        updList: [
+          {
+            where: {
+              id_: id
+            },
+            param: {
+              kuai_zhao_: fileId,
+              shi_fou_guo_shen_: '已完成'
             }
+          }
+        ],
+        tableName: 't_khgtjlb'
+      }
+      const data = this.$sig(pp)
+      this.$common.request('update', data).then(res => {
+        this.$methCommon.getPrompt('提交成功', 'success')
+        setTimeout(() => {
+          this.closePop()
+        }, 1000)
+      })
+    },
+    getYanZheng() {
+      const suList = [
+        'keHuLianXiRen',
+        'keHuDanWeiMin',
+        'lianXiDianHua',
+        'yongHuYouXiang',
+        'weiTuoDanHao',
+        'gouTongNeiRong'
+      ]
+      const suListName = [
+        '用户姓名',
+        '用户单位',
+        '联系电话',
+        '用户邮箱',
+        '沟通事项',
+        '沟通内容'
+      ]
+      for (const item in suList) {
+        if (!this.form[suList[item]]) {
+          this.$toast({
+            duration: 2000, // 持续展示 toast
+            message: '请输入' + suListName[item]
+          })
+          return false
+        }
+      }
 
-            const selList = ['gouTongRiQi', 'gouTongLeiXing']
-            const selListName = ['沟通时间', '沟通类型']
-            for (const item in selList) {
-                if (!this.form[selList[item]]) {
-                    this.$toast({
-                        duration: 2000, // 持续展示 toast
-                        message: '请选择' + selListName[item]
-                    })
-                    return false
-                }
-            }
+      const selList = ['gouTongRiQi', 'gouTongLeiXing']
+      const selListName = ['沟通时间', '沟通类型']
+      for (const item in selList) {
+        if (!this.form[selList[item]]) {
+          this.$toast({
+            duration: 2000, // 持续展示 toast
+            message: '请选择' + selListName[item]
+          })
+          return false
+        }
+      }
 
-            if (!this.form.keHu) {
-                this.$toast({
-                    duration: 2000, // 持续展示 toast
-                    message: '请填写签名'
-                })
-                return false
-            }
+      if (!this.form.keHu) {
+        this.$toast({
+          duration: 2000, // 持续展示 toast
+          message: '请填写签名'
+        })
+        return false
+      }
 
-            if (this.form.gouTongLeiXing === '其它' && !this.form.qiTa) {
-                this.$toast({
-                    duration: 2000, // 持续展示 toast
-                    message: '请填写其他类型'
-                })
-                return false
-            }
+      if (this.form.gouTongLeiXing === '其它' && !this.form.qiTa) {
+        this.$toast({
+          duration: 2000, // 持续展示 toast
+          message: '请填写其他类型'
+        })
+        return false
+      }
 
-            return true
-        },
-        // 根据委托单id查询 taskId
-        getTaskId(id) {
-            let sql = ``
-            if (this.typeValue === '2') {
-                sql = `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '确认' and NODE_ID_ = 'Activity_02lroj1' and PROC_DEF_KEY_ = 'Process_0pjp1fy' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_02lroj1' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
-            } else if (this.typeValue === '4') {
-                sql = `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '沟通' and NODE_ID_ = 'Activity_0qy1dd7' and PROC_DEF_KEY_ = 'Process_0pjp1fy' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_0qy1dd7' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
-            }
-            this.$common.request('sql', sql).then(res => {
-                if (res.state === 200) {
-                    const result = res.variables.data[0]
-                    this.taskId = result.TASK_ID_
+      return true
+    },
+    // 根据委托单id查询 taskId
+    getTaskId(id) {
+      let sql = ``
+      let parm = {}
+      if (this.typeValue === '2') {
+        sql = `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '确认' and NODE_ID_ = 'Activity_02lroj1' and PROC_DEF_KEY_ = 'Process_0pjp1fy' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_02lroj1' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
+        parm = { key: 'yddyhgthqtaskid1', params: [id] }
+      } else if (this.typeValue === '4') {
+        sql = `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '沟通' and NODE_ID_ = 'Activity_0qy1dd7' and PROC_DEF_KEY_ = 'Process_0pjp1fy' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_0qy1dd7' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
+        parm = { key: 'yddyhgthqtaskid2', params: [id] }
+      }
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? parm : sql).then(res => {
+        if (res.state === 200) {
+          const result = res.variables.data[0]
+          this.taskId = result.TASK_ID_
 
-                    this.getProcInstId(result.PROC_INST_ID_)
-                }
-            })
-        },
-        // 根据委托单id查询 taskId
-        getProcInstId(id) {
-            const sql = `select OPTION_ from ibps_bpm_oper_log where PROC_INST_ID_ = '${id}'   order by create_time_ desc  limit 1`
-            this.$common.request('sql', sql).then(res => {
-                if (res.state === 200) {
-                    const result = res.variables.data[0]
-                    this.option = result.OPTION_
-                }
-            })
-        },
-        getShow() {
-            this.$refs['picker'].show()
-        },
-        getPageA() {
-            // const pages = getCurrentPages()
-            // const prevPage = pages[pages.length - 2]
-            // prevPage.$vm.getValue()
-            // uni.navigateBack({
-            // 	dalta: 1
-            // })
-        },
-        uploadClick(item) {
-            if (/^(pdf|png|jpg|jpeg|gif)$/.test(item.ext)) {
-                // uni.navigateTo({
-                // 	url: `/pages/fileView/fileView?id=${item.id}&ext=${item.ext}`
-                // })
-            } else {
-                this.$uploades.download(item.id, item.name, this)
-            }
-        },
-        // 退回原因
-        getBack() {
-            this.content = this.option
-            this.backShow = true
-            this.$dialog
-                .alert({
-                    title: '退回原因',
-                    message: this.option,
-                    theme: 'round-button',
-                    confirmButtonColor: '#1989fa'
-                })
-                .then(() => {
-                    // on close
-                })
-        },
-        cancel() {
-            this.backShow = false
-        },
-        formatter(type, val) {
-            if (type === 'year') {
-                return val + '年'
-            }
-            if (type === 'month') {
-                return val + '月'
-            }
-            if (type === 'day') {
-                return val + '日'
-            }
-            return val
+          this.getProcInstId(result.PROC_INST_ID_)
         }
+      })
+    },
+    // 根据委托单id查询 taskId
+    getProcInstId(id) {
+      const sql = `select OPTION_ from ibps_bpm_oper_log where PROC_INST_ID_ = '${id}'   order by create_time_ desc  limit 1`
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddyhgthqthyy', params: [id] } : sql).then(res => {
+        if (res.state === 200) {
+          const result = res.variables.data[0]
+          this.option = result.OPTION_
+        }
+      })
+    },
+    getShow() {
+      this.$refs['picker'].show()
+    },
+    getPageA() {
+      // const pages = getCurrentPages()
+      // const prevPage = pages[pages.length - 2]
+      // prevPage.$vm.getValue()
+      // uni.navigateBack({
+      // 	dalta: 1
+      // })
+    },
+    uploadClick(item) {
+      if (/^(pdf|png|jpg|jpeg|gif)$/.test(item.ext)) {
+        // uni.navigateTo({
+        // 	url: `/pages/fileView/fileView?id=${item.id}&ext=${item.ext}`
+        // })
+      } else {
+        this.$uploades.download(item.id, item.name, this)
+      }
+    },
+    // 退回原因
+    getBack() {
+      this.content = this.option
+      this.backShow = true
+      this.$dialog
+        .alert({
+          title: '退回原因',
+          message: this.option,
+          theme: 'round-button',
+          confirmButtonColor: '#1989fa'
+        })
+        .then(() => {
+          // on close
+        })
+    },
+    cancel() {
+      this.backShow = false
+    },
+    formatter(type, val) {
+      if (type === 'year') {
+        return val + '年'
+      }
+      if (type === 'month') {
+        return val + '月'
+      }
+      if (type === 'day') {
+        return val + '日'
+      }
+      return val
     }
+  }
 }
 </script>
 <style lang="scss" scoped>

+ 6 - 5
src/views/platform/bpmn/complaint/complaint.vue

@@ -326,6 +326,7 @@ import {
 } from '@/api/platform/form/transfer'
 import { agree } from '@/api/platform/bpmn/bpmTask'
 import test from './complaint.json'
+import { dbSqlConfig } from '@/constant'
 
 export default {
   components: {
@@ -602,7 +603,7 @@ export default {
     },
     getDe(id) {
       const sql = `select a.*,b.name_ from t_tsclb a left join ibps_party_employee b on a.tou_su_fen_lei_qi = b.id_ where a.id_ =  '${id}'`
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtsxqyxxcx', params: [id] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data[0]
           this.form = {
@@ -666,7 +667,7 @@ export default {
       this.form.bianZhiRen = useId
       this.form.bianZhiShiJian = this.$methCommon.time(16)
       this.form.shiFouGuoShen = '已登记'
-      this.form.bianZhiBuMen = this.mainPosition===null ?  this.orgId : this.mainPosition.id
+      this.form.bianZhiBuMen = this.mainPosition === null ? this.orgId : this.mainPosition.id
       // this.form.bianZhiBuMen = this.orgId
       this.form.diDian = this.level.second
       para.parameters[2].value = JSON.stringify(this.form)
@@ -706,7 +707,7 @@ export default {
       this.form.bianZhiRen = useId
       this.form.bianZhiShiJian = this.$methCommon.time(16)
       this.form.shiFouGuoShen = '已登记'
-      this.form.bianZhiBuMen = this.mainPosition===null ?  this.orgId : this.mainPosition.id
+      this.form.bianZhiBuMen = this.mainPosition === null ? this.orgId : this.mainPosition.id
       this.form.diDian = this.level.second
       const editData = {
         data: JSON.stringify(this.form),
@@ -765,7 +766,7 @@ export default {
     // 根据委托单id查询 taskId
     getTaskId(id) {
       const sql = `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '登记' and NODE_ID_ = 'Activity_0276m43' and PROC_DEF_KEY_ = 'Process_09j5fge' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_0276m43' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtstaskidhq', params: [id] } : sql).then(res => {
         if (res.state === 200) {
           if (res.variables.data.length > 0) {
             const result = res.variables.data[0]
@@ -780,7 +781,7 @@ export default {
     // 根据委托单id查询 taskId
     getProcInstId(id) {
       const sql = `select OPTION_ from ibps_bpm_oper_log where PROC_INST_ID_ = '${id}'   order by create_time_ desc  limit 1`
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtsthyyhq', params: [id] } : sql).then(res => {
         if (res.state === 200) {
           const result = res.variables.data[0]
           this.option = result.OPTION_

+ 252 - 249
src/views/platform/bpmn/memorandum/index.vue

@@ -104,279 +104,282 @@ import IbpsTypeTree from '@/business/platform/cat/type/tree'
 import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 import { Notify, Dialog } from 'vant'
 import Template from '../../../../business/platform/data/data-template/template.vue'
+import { dbSqlConfig } from '@/constant'
+
 export default {
-    name: 'new-process',
-    components: {
-        // IbpsMoreSearch,
-        IbpsTypeTree,
-        IbpsAvatar,
-        IbpsListResultPage,
-        IbpsBpmnFormrenderDialog,
-        IbpsToolbar
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-        const userId = this.$store.getters.userId
-        return {
-            ruleForm: {
-                title_: '',
-                content_: '',
-                state_: '未关闭',
-                user_Id_: userId
+  name: 'new-process',
+  components: {
+    // IbpsMoreSearch,
+    IbpsTypeTree,
+    IbpsAvatar,
+    IbpsListResultPage,
+    IbpsBpmnFormrenderDialog,
+    IbpsToolbar
+  },
+  mixins: [random, bpmnStatus],
+  data() {
+    const userId = this.$store.getters.userId
+    return {
+      ruleForm: {
+        title_: '',
+        content_: '',
+        state_: '未关闭',
+        user_Id_: userId
 
-            },
-            editFrom: {},
-            addShow: false,
-            tabActive: 0,
-            tabDatas: [{
-                name: 0,
-                title: '未关闭'
-            }, {
-                name: 1,
-                title: '已关闭'
-            }],
-            current: 0,
-            footText: false,
-            noData: false,
-            editOrAdd: false,
-            shiFouEdit: false,
-            stateActive: false,
-            moreSearchPopup: false,
-            typeTreePopup: false,
-            searchForms: {
-                forms: [
-                    { prop: 'Q^name_^SL', label: '流程名称', fieldType: 'text' }
-                ]
-            },
-            subject: '',
-            typeId: '',
-            moreParams: {},
+      },
+      editFrom: {},
+      addShow: false,
+      tabActive: 0,
+      tabDatas: [{
+        name: 0,
+        title: '未关闭'
+      }, {
+        name: 1,
+        title: '已关闭'
+      }],
+      current: 0,
+      footText: false,
+      noData: false,
+      editOrAdd: false,
+      shiFouEdit: false,
+      stateActive: false,
+      moreSearchPopup: false,
+      typeTreePopup: false,
+      searchForms: {
+        forms: [
+          { prop: 'Q^name_^SL', label: '流程名称', fieldType: 'text' }
+        ]
+      },
+      subject: '',
+      typeId: '',
+      moreParams: {},
 
-            listData: [],
-            pagination: {},
-            sorts: {},
+      listData: [],
+      pagination: {},
+      sorts: {},
 
-            loading: false,
-            finished: false,
-            refreshing: false,
-            resultType: 'init',
-            errorType: null,
-            resultMessage: null,
+      loading: false,
+      finished: false,
+      refreshing: false,
+      resultType: 'init',
+      errorType: null,
+      resultMessage: null,
 
-            defId: '',
-            formrenderVisible: false,
-            formrenderTitle: ''
-        }
-    },
+      defId: '',
+      formrenderVisible: false,
+      formrenderTitle: ''
+    }
+  },
 
-    created() {
-        this.loadData()
-    },
+  created() {
+    this.loadData()
+  },
 
-    methods: {
-        addData() {
-            this.shiFouEdit = false
-            this.addShow = true
-            this.ruleForm.title_ = ''
-            this.ruleForm.content_ = ''
-        },
-        onSubmit(values) {
-            if (!this.editOrAdd) {
-                const params = {
-                    tableName: 't_notes',
-                    paramWhere: [this.ruleForm]
-                }
-                this.$common.request('add', params).then(() => {
-                    Notify({ type: 'primary', message: '添加成功' })
-                    this.addShow = false
-                    this.onSearch()
-                }).catch(e => {
-                    console.log(e)
-                })
-            } else {
-                const editData = this.editFrom
-                const params = { title_: this.ruleForm.title_, content_: this.ruleForm.content_ }
-                const updateParams = {
-                    tableName: 't_notes',
-                    updList: [
-                        {
-                            where: {
-                                id_: editData.id_
-                            },
-                            param: params
-                        }
-                    ]
-                }
-                this.$common.request('update', updateParams).then(() => {
-                    Notify({ type: 'primary', message: '编辑成功' })
-                    this.addShow = false
-                    this.editOrAdd = false
-                    this.onSearch()
-                })
+  methods: {
+    addData() {
+      this.shiFouEdit = false
+      this.addShow = true
+      this.ruleForm.title_ = ''
+      this.ruleForm.content_ = ''
+    },
+    onSubmit(values) {
+      if (!this.editOrAdd) {
+        const params = {
+          tableName: 't_notes',
+          paramWhere: [this.ruleForm]
+        }
+        this.$common.request('add', params).then(() => {
+          Notify({ type: 'primary', message: '添加成功' })
+          this.addShow = false
+          this.onSearch()
+        }).catch(e => {
+          console.log(e)
+        })
+      } else {
+        const editData = this.editFrom
+        const params = { title_: this.ruleForm.title_, content_: this.ruleForm.content_ }
+        const updateParams = {
+          tableName: 't_notes',
+          updList: [
+            {
+              where: {
+                id_: editData.id_
+              },
+              param: params
             }
-        },
-        onEdit(item) {
-            this.editOrAdd = true
-            this.addShow = true
-            this.editFrom = item
-            this.ruleForm.title_ = item.title_
-            this.ruleForm.content_ = item.content_
-            if (this.tabActive === 0) {
-                this.shiFouEdit = false
-            } else {
-                this.shiFouEdit = true
+          ]
+        }
+        this.$common.request('update', updateParams).then(() => {
+          Notify({ type: 'primary', message: '编辑成功' })
+          this.addShow = false
+          this.editOrAdd = false
+          this.onSearch()
+        })
+      }
+    },
+    onEdit(item) {
+      this.editOrAdd = true
+      this.addShow = true
+      this.editFrom = item
+      this.ruleForm.title_ = item.title_
+      this.ruleForm.content_ = item.content_
+      if (this.tabActive === 0) {
+        this.shiFouEdit = false
+      } else {
+        this.shiFouEdit = true
+      }
+    },
+    // 点击关闭
+    onClose(item) {
+      Dialog.alert({
+        title: '提示',
+        message: `确定要关闭标题为<span style="color:red">${item.title_}</span>备忘信息吗?`,
+        showCancelButton: true
+      }).then(() => {
+        const params = { state_: '已关闭' }
+        const updateParams = {
+          tableName: 't_notes',
+          updList: [
+            {
+              where: {
+                id_: item.id_
+              },
+              param: params
             }
-        },
-        // 点击关闭
-        onClose(item) {
-            Dialog.alert({
-                title: '提示',
-                message: `确定要关闭标题为<span style="color:red">${item.title_}</span>备忘信息吗?`,
-                showCancelButton: true
-            }).then(() => {
-                const params = { state_: '已关闭' }
-                const updateParams = {
-                    tableName: 't_notes',
-                    updList: [
-                        {
-                            where: {
-                                id_: item.id_
-                            },
-                            param: params
-                        }
-                    ]
-                }
-                this.$common.request('update', updateParams).then(() => {
-                    Notify({ type: 'primary', message: '关闭成功' })
-                    this.onSearch()
-                })
-            }).catch((e) => {
-                console.log(e)
-            })
-        },
+          ]
+        }
+        this.$common.request('update', updateParams).then(() => {
+          Notify({ type: 'primary', message: '关闭成功' })
+          this.onSearch()
+        })
+      }).catch((e) => {
+        console.log(e)
+      })
+    },
 
-        loadData() {
-            this.loading = true
-            this.noData = false
-            this.footText = false
-            let conState = ''
-            if (this.tabActive === 0) {
-                conState = '未关闭'
-            } else {
-                conState = '已关闭'
-            }
-            let page = 0
-            if (this.current === 0) {
-                page = 0
-            } else {
-                page = this.current * 10
-            }
-            const subject = this.subject
-            const sql = `select * from t_notes where state_='${conState}' AND title_ like '%${subject}%' ORDER BY create_time_ DESC limit ${page},10`
-            this.$common.request('sql', sql).then(res => {
-                const { data = [] } = res.variables || {}
-                // this.listData = data
-                if (data.length === 0) {
-                    if (this.current === 0) {
-                        this.noData = true
-                    } else {
-                        this.footText = true
-                    }
-                    this.finished = true
-                    this.loading = false
-                    this.refreshing = false
-                    return
-                }
+    loadData() {
+      this.loading = true
+      this.noData = false
+      this.footText = false
+      let conState = ''
+      if (this.tabActive === 0) {
+        conState = '未关闭'
+      } else {
+        conState = '已关闭'
+      }
+      let page = 0
+      if (this.current === 0) {
+        page = 0
+      } else {
+        page = this.current * 10
+      }
+      const subject = this.subject
+      // sql注入接口
+      const sql = `select * from t_notes where state_='${conState}' AND title_ like '%${subject}%' ORDER BY create_time_ DESC limit ${page},10`
+      this.$common.request('sql', sql).then(res => {
+        const { data = [] } = res.variables || {}
+        // this.listData = data
+        if (data.length === 0) {
+          if (this.current === 0) {
+            this.noData = true
+          } else {
+            this.footText = true
+          }
+          this.finished = true
+          this.loading = false
+          this.refreshing = false
+          return
+        }
 
-                this.listData.push(...data)
+        this.listData.push(...data)
 
-                // 判断是否还有更多数据
-                if ((this.listData.length) % 10 !== 0) {
-                    this.footText = true
-                    this.finished = true
-                } else {
-                    this.current++
-                }
+        // 判断是否还有更多数据
+        if ((this.listData.length) % 10 !== 0) {
+          this.footText = true
+          this.finished = true
+        } else {
+          this.current++
+        }
 
-                this.loading = false
-                this.refreshing = false
-            }).catch(e => {
-                console.log('e', e)
-            })
-        },
-        generateTitle(name, title) { // generateTitle by vue-i18n
-            return i18n.generateTitle(name, title)
-        },
-        onClickTab(index) {
-        // 清空查询条件
-            this.subject = ''
-            this.typeId = ''
-            this.moreParams = {}
+        this.loading = false
+        this.refreshing = false
+      }).catch(e => {
+        console.log('e', e)
+      })
+    },
+    generateTitle(name, title) { // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    onClickTab(index) {
+      // 清空查询条件
+      this.subject = ''
+      this.typeId = ''
+      this.moreParams = {}
 
-            this.onSearch()
-        },
-        /**
+      this.onSearch()
+    },
+    /**
        * 获取格式化参数
        */
-        getSearcFormData() {
-            let params = {}
-            if (this.$utils.isNotEmpty(this.subject)) {
-                params['Q^name_^SL'] = this.subject
-            }
-            if (this.$utils.isNotEmpty(this.moreParams)) {
-                params = Object.assign(params, this.moreParams)
-            }
+    getSearcFormData() {
+      let params = {}
+      if (this.$utils.isNotEmpty(this.subject)) {
+        params['Q^name_^SL'] = this.subject
+      }
+      if (this.$utils.isNotEmpty(this.moreParams)) {
+        params = Object.assign(params, this.moreParams)
+      }
 
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts)
-        },
-        onRefresh() {
-            this.footText = false
-            this.noData = false
-            this.refreshing = true
-            this.onSearch()
-        },
+      return ActionUtils.formatParams(
+        params,
+        this.pagination,
+        this.sorts)
+    },
+    onRefresh() {
+      this.footText = false
+      this.noData = false
+      this.refreshing = true
+      this.onSearch()
+    },
 
-        /**
+    /**
        * 查询
        */
-        onSearch() {
-            this.stateActive = false
-            this.current = 0
-            ActionUtils.initListData(this)
-            this.loadData()
-        },
-        /**
+    onSearch() {
+      this.stateActive = false
+      this.current = 0
+      ActionUtils.initListData(this)
+      this.loadData()
+    },
+    /**
        * 高级查询
        */
-        onMoreSearch(params) {
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^type_id_^SL'] = this.typeId
-            }
+    onMoreSearch(params) {
+      if (this.$utils.isNotEmpty(this.typeId)) {
+        params['Q^type_id_^SL'] = this.typeId
+      }
 
-            this.moreParams = params
-            this.onSearch()
-            if (this.$utils.isNotEmpty(params)) {
-                this.stateActive = true
-            }
-        },
-        clickMoreSearch() {
-            this.moreSearchPopup = true
-            this.stateActive = false
-        },
-        resetForm() {
-            this.typeId = ''
-        },
-        clickType() {
-            this.typeTreePopup = true
-        },
-        clickTypeNode(data) {
-            this.typeId = data.id
-            this.onMoreSearch({})
-        }
+      this.moreParams = params
+      this.onSearch()
+      if (this.$utils.isNotEmpty(params)) {
+        this.stateActive = true
+      }
+    },
+    clickMoreSearch() {
+      this.moreSearchPopup = true
+      this.stateActive = false
+    },
+    resetForm() {
+      this.typeId = ''
+    },
+    clickType() {
+      this.typeTreePopup = true
+    },
+    clickTypeNode(data) {
+      this.typeId = data.id
+      this.onMoreSearch({})
     }
+  }
 }
 </script>
 <style lang="scss" scoped>

+ 7 - 4
src/views/platform/bpmn/my-reissue/components/reissueDialog.vue

@@ -161,6 +161,7 @@ import bpmnStatus from '@/mixins/bpmnStatus'
 import IbpsUploader from '@/business/platform/file/uploader'
 import { Toast } from 'vant'
 import { saveReissue } from '@/api/platform/feature/clockReissue'
+import { dbSqlConfig } from '@/constant'
 
 export default {
   components: {
@@ -376,9 +377,11 @@ export default {
     },
     async schedule(val) {
       const date = this.$common.getFormatDate('string', 10, val)
+
       const sql = `select a.id_ AS fid,a.start_date_,a.end_date_,a.config_,a.overview_,b.* FROM t_schedule_detail b JOIN t_schedule a ON a.id_ = b.parent_id_ WHERE a.status_ = '已发布' AND b.user_id_ = '${this.userId}' AND ('${date}'  BETWEEN CAST( a.start_date_ AS DATE ) AND CAST( a.end_date_ AS DATE ))`
+
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddbkpbsjhq', params: [this.userId, date] } : sql).then(res => {
           const data = res.variables.data || []
           resolve(data)
         }).catch(error => {
@@ -389,7 +392,7 @@ export default {
     async reissue() {
       const sql = `select * FROM t_attendance_reissue WHERE bian_zhi_ren_ = '${this.userId}' AND bu_ka_ri_qi_ like '%${this.form.buKaRiQi}%' and bu_ka_ban_ci_ like '%${this.form.buKaBanCi}%' and zhuang_tai_ != '已撤销'`
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'ydddksjhq', params: [this.userId, this.form.buKaRiQi, this.form.buKaBanCi] } : sql).then(res => {
           const data = res.variables.data || []
           resolve(data)
         }).catch(error => {
@@ -400,7 +403,7 @@ export default {
     async clockIn() {
       const sql = `select * FROM t_attendance_detail WHERE yong_hu_id_ = '${this.userId}' AND ri_qi_ like '%${this.form.buKaRiQi}%' and ban_ci_bie_ming_ like '%${this.form.buKaBanCi}%' order by create_time_ desc`
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'ydddkscjlhq', params: [this.userId, this.form.buKaRiQi, this.form.buKaBanCi] } : sql).then(res => {
           const data = res.variables.data || []
           resolve(data)
         }).catch(error => {
@@ -475,7 +478,7 @@ export default {
     getInfo(id) {
       const sql = `select * from t_attendance_reissue where id_ = ${id}`
 
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddbkdtsjhq', params: [id] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data[0]
           this.form = {

+ 8 - 6
src/views/platform/bpmn/my-reissue/index.vue

@@ -200,12 +200,14 @@ export default {
 
       const sql =
         `select * from t_attendance_reissue where (create_by_ = '${this.useId}' or bian_zhi_ren_ = '${this.useId}') ${itemSql}  ORDER BY create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
-      this.$common.request('sql', sql).then(response => {
-        // 处理数据
-        ActionUtils.handleListDataCommon(this, response.variables)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
+
+      // 临时注释
+      // this.$common.request('sql', sql).then(response => {
+      //   // 处理数据
+      //   ActionUtils.handleListDataCommon(this, response.variables)
+      // }).catch((e) => {
+      //   ActionUtils.handleErrorData(this, e)
+      // })
     },
     /**
      * 获取格式化参数

+ 7 - 6
src/views/platform/bpmn/my-reissue/indexTab.vue

@@ -234,12 +234,13 @@ export default {
       if (this.active === '我发起的') {
         const sql =
         `select a.id_ as id,a.tenant_id_ as tenantId,a.ip_ as ip,a.create_by_ as createBy,a.create_time_ as createTime,a.update_by_ as updateBy,a.update_time_ as updateTime,a.di_dian_ as diDian,a.reason_ as reason,a.status as status,a.executor_ as executor,a.execute_date_ as executeDate,a.overview_ as overview,a.schedule_id_ as scheduleId,a.type_ as type,a.reject_reason_ as rejectReason,a.partys from (select f.*,GROUP_CONCAT(z.party_) as partys from t_adjustment f left join t_adjustment_detail z on f.id_ = z.parent_id_  GROUP BY f.id_) a where create_by_ = '${this.useId}' ORDER BY a.create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
-        this.$common.request('sql', sql).then(response => {
-          // 处理数据
-          ActionUtils.handleListDataCommon(this, response.variables)
-        }).catch((e) => {
-          ActionUtils.handleErrorData(this, e)
-        })
+        // 临时注释
+        // this.$common.request('sql', sql).then(response => {
+        //   // 处理数据
+        //   ActionUtils.handleListDataCommon(this, response.variables)
+        // }).catch((e) => {
+        //   ActionUtils.handleErrorData(this, e)
+        // })
       } else if (this.active === '待我处理') {
         console.log('221312312321312321')
         queryAdjustment(this.getSearcFormData()).then(res => {

+ 4 - 3
src/views/platform/bpmn/my-schedule/index.vue

@@ -123,6 +123,7 @@ import clockDialogVue from './components/clockDialog.vue'
 import { clockConfig } from '@/constant'
 import meth from './scheduleJson.json'
 import reissueDialog from '@/views/platform/bpmn/my-reissue/components/reissueDialog'
+import { dbSqlConfig } from '@/constant'
 
 export default {
   components: {
@@ -362,7 +363,7 @@ export default {
       const max = this.$common.getFormatDate('string', 10, this.maxDate)
       const sql = `select a.id_ as fid, a.start_date_, a.end_date_, a.config_, a.overview_, b.* from t_schedule_detail b join t_schedule a on a.id_ = b.parent_id_ where a.status_='已发布' and b.user_id_ = '${this.userId}' and (CAST(a.start_date_ AS DATE) between '${min}' and '${max}'  or  CAST(a.end_date_ AS DATE) between '${min}' and '${max}' or (CAST(a.start_date_ AS DATE) < '${min}' and CAST(a.end_date_ AS DATE)>'${max}') )`
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddpbsjqq', params: [this.userId, min, max, min, max, min, max] } : sql).then(res => {
           const data = res.variables.data || []
           this.showChange += 1
           resolve(data)
@@ -378,7 +379,7 @@ export default {
       const max = this.$common.getFormatDate('string', 10, this.maxDate)
       const sql = `select * FROM t_attendance_detail where yong_hu_id_ = '${this.userId}' and CAST(ri_qi_ AS DATE) between '${min}' and '${max}'`
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddpbymdksjhq', params: [this.userId, min, max] } : sql).then(res => {
           const { data = [] } = res.variables || {}
           resolve(data)
         }).catch(error => {
@@ -404,7 +405,7 @@ export default {
       const max = this.$common.getFormatDate('string', 10, this.maxDate)
       const sql = `select * FROM t_attendance_reissue WHERE bian_zhi_ren_ = '${this.userId}' AND CAST(bu_ka_ri_qi_ AS DATE) between '${min}' and '${max}' and zhuang_tai_ != '已撤销'`
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddpbymbksjqq', params: [this.userId, min, max] } : sql).then(res => {
           const data = res.variables.data || []
           resolve(data)
         }).catch(error => {

+ 8 - 3
src/views/platform/bpmn/my-test/examPop.vue

@@ -205,6 +205,8 @@
 import { shuffle, round } from 'lodash'
 import { getImage } from '@/api/platform/file/attachment'
 import { BASE_API } from '@/api/baseUrl'
+import { dbSqlConfig } from '@/constant'
+
 export default {
   name: 'exam-pop',
   props: {
@@ -367,7 +369,7 @@ export default {
     getInit() {
       const sql = `select id_ as questionId, ti_gan_ as stem, ti_xing_ as questionType, fu_tu_ as img, xuan_xiang_lei_xi as optionType, da_an_ as options, xuan_xiang_shu_ as optionsLength, fen_zhi_ as score, ping_fen_fang_shi as rateType, ping_fen_ren_ as rater, zheng_que_da_an_ as rightKey, nan_du_ as questionLevel from t_questions where parent_id_ = '${this.bankId}' and zhuang_tai_ = '启用' order by field(ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
       if (this.bankId !== '') {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddkstcytmxxhq', params: [this.bankId] } : sql).then(res => {
           let { data = [] } = res.variables || {}
           if (!data.length) {
             this.$message.error('获取题目信息失败!')
@@ -424,7 +426,7 @@ export default {
               }
 
               const sql1 = `select FILE_PATH_  from ibps_file_attachment  WHERE id_ in (${astr})`
-              this.$common.request('sql', sql1).then(res => {
+              this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddkstchqwjlj', params: [astr] } : sql1).then(res => {
                 if (res.state === 200) {
                   const data = res.variables.data
                   if (data.length > 0) {
@@ -457,9 +459,12 @@ export default {
     async getExamInfo(id, bankId) {
       const sql1 = `select qb.ti_ku_ming_cheng_ as bankName, qb.ti_shu_ as questionCount, qb.zong_fen_ as totalScore, ex.kao_shi_ming_chen as examName, ex.xian_kao_ci_shu_ as limitCount, ex.xian_kao_shi_jian as limitDate, ex.kao_shi_shi_chang as duration, ex.can_kao_ren_yuan_ as examinee, ex.da_biao_zhan_bi_ as qualifiedRadio, ex.ji_fen_fang_shi_ as scoringType, ex.yun_xu_bao_ming_ as allowRegist, ex.sui_ji_chou_ti_ as isRand,ex.chou_ti_fang_shi_ as randWay, ex.sui_ji_ti_shu_ as randNumber, ex.chou_ti_zong_fen_ as randScore, ex.ti_mu_zong_shu_ as randTotal from t_exams ex, t_question_bank qb where ex.ti_ku_id_ = qb.id_ and ex.id_ = '${id}'`
       const sql2 = `select qb.ti_ku_ming_cheng_ as bankName, qb.ti_shu_ as questionCount, qb.zong_fen_ as totalScore, qb.xian_kao_ci_shu_ as limitCount, qb.kao_shi_shi_chang as duration, qb.da_biao_zhan_bi_ as qualifiedRadio, qb.ji_fen_fang_shi_ as scoringType from t_question_bank qb where qb.id_ = '${bankId}'`
+      const parm1 = { key: 'yddkstcksxxhq1', params: [id] }
+      const parm2 = { key: 'yddkstcksxxhq2', params: [bankId] }
       const sql = id ? sql1 : sql2
+      const parm = id ? parm1 : parm2
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? parm : sql).then(res => {
           const { data = [] } = res.variables || {}
           if (!data.length) {
             reject('数据异常')

+ 19 - 5
src/views/platform/bpmn/my-test/index.vue

@@ -240,6 +240,7 @@ import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 import { Notify } from 'vant'
 import examPop from './examPop.vue'
 import examDetail from './examDetail.vue'
+import { dbSqlConfig } from '@/constant'
 
 export default {
   components: {
@@ -377,10 +378,16 @@ export default {
         const examId = item.examId
         const examineeId = item.examinee
         const bankId = item.bankId
-        const param = examId ? `and e.exam_id_ = '${examId}'` : 'and e.exam_id_ is null'
-        const sql = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee,ed.nan_du_+0 as rate,ed.da_an_jie_xi_ as resolution, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join  t_question_bank q on e.ti_ku_id_ = q.id_ left join  t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${bankId}' ${param} and e.kao_shi_ren_ = '${examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题'),applyTime DESC`
+        // const param = examId ? `and e.exam_id_ = '${examId}'` : 'and e.exam_id_ is null'
+        const sql1 = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee,ed.nan_du_+0 as rate,ed.da_an_jie_xi_ as resolution, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join  t_question_bank q on e.ti_ku_id_ = q.id_ left join  t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${bankId}' and e.exam_id_ = '${examId}' and e.kao_shi_ren_ = '${examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题'),applyTime DESC`
+        const sql2 = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee,ed.nan_du_+0 as rate,ed.da_an_jie_xi_ as resolution, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join  t_question_bank q on e.ti_ku_id_ = q.id_ left join  t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${bankId}' and e.exam_id_ is null and e.kao_shi_ren_ = '${examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题'),applyTime DESC`
+        const sql = examId ? sql1 : sql2
+        const parm1 = { key: 'yddkslbtcxqxxhq1', params: [bankId, examId, examineeId] }
+        const parm2 = { key: 'yddkslbtcxqxxhq2', params: [bankId, examineeId] }
+        const parm = examId ? parm1 : parm2
+
         // return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? parm : sql).then(res => {
           const { data = [] } = res.variables || {}
           if (!data.length) {
             // this.$message.error('未查询到已提交的考试记录,请先完成考试!')
@@ -603,9 +610,14 @@ export default {
 
     async getExamCount(id) {
       const param = id ? `exam_id_ = '${id}'` : 'exam_id_ is null'
-      const sql = `select id_, zhuang_tai_ from t_examination where ${param} and kao_shi_ren_ = '${this.userId}' and zhuang_tai_ != '已取消' order by bao_ming_shi_jian asc`
+      const sql1 = `select id_, zhuang_tai_ from t_examination where exam_id_ = '${id}' and kao_shi_ren_ = '${this.userId}' and zhuang_tai_ != '已取消' order by bao_ming_shi_jian asc`
+      const sql2 = `select id_, zhuang_tai_ from t_examination where exam_id_ is null and kao_shi_ren_ = '${this.userId}' and zhuang_tai_ != '已取消' order by bao_ming_shi_jian asc`
+      const sql = id ? sql1 : sql2
+      const parm1 = { key: 'yddkslbhqksslzt1', params: [id, this.userId] }
+      const parm2 = { key: 'yddkslbhqksslzt2', params: [this.userId] }
+      const parm = id ? parm1 : parm2
       return new Promise((resolve, reject) => {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? parm : sql).then(res => {
           const { data = [] } = res.variables || {}
           const temp = data.find(item => item.zhuang_tai_ === '未开始')
           resolve({
@@ -790,6 +802,8 @@ export default {
       const sql = this.tabActive === 0 ? sql1 : sql2
       // let sql2 = `select * from (select * from t-exams ) a LEFT JOIN () B ON a.examId=b.exam_id_`
       // const { variables: { data }} = await this.$common.request('sql', sql)
+
+      // sql注入接口
       this.$common.request('sql', sql).then(res => {
         if (res.variables.data.length === 0) {
           if (this.current === 0) {

+ 441 - 438
src/views/platform/bpmn/reminders/index.vue

@@ -94,463 +94,466 @@ import Reminder from './reminder.vue'
 import { sendSmsList } from './sendSms'
 import { Notify } from 'vant'
 import { Toast } from 'vant'
+import { dbSqlConfig } from '@/constant'
 
 export default {
-    components: {
-        IbpsMoreSearch,
-        IbpsTypeTree,
-        IbpsAvatar,
-        IbpsToolbar,
-        IbpsListResultPage,
-        IbpsBpmnFormrenderDialog,
-        Reminder
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-        const { userId, userList = [], deptList = [], menus, userInfo } = this.$store.getters
-        const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
-        const N = new Date(currentTime).getTime()
-        return {
-            visible: true,
-            currentTime: N,
-            reminderSon: false,
-            sonData: '',
-            userId: userId,
-            footText: false,
-            showPop: false,
-            noData: false,
-            showConfirmationBoxList: true,
-            countTotal: {},
-            examPopup: '',
-            ReachBottomShow: false,
-            moreSearchPopup: false,
-            searchForms: {
-                forms: [
-                    // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
-                    //   { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
-                    { prop: 'examName', label: '考试名称', fieldType: 'text' },
-                    { prop: 'bankName', label: '题库名称', fieldType: 'text' },
-                    {
-                        prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
-                            { value: 'trainingExam', label: '培训考试' },
-                            { value: 'POCTtraining', label: 'POCT培训' },
-                            { value: 'selfAssessment', label: '自主考核' },
-                            { value: 'routine', label: '常规' }
-                        ]
-                    },
-                    { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
-                    { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-                    // { prop: ['Q^startDate^DL^yyyy-MM-dd', 'Q^startDate^DG^yyyy-MM-dd'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
-                    // { prop: ['Q^limitDate^DL^yyyy-MM-dd', 'Q^limitDate^DG^yyyy-MM-dd'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-                ]
-            },
-            mainActions: [{
-                'name': '信息催办',
-                'type': 'primary',
-                'callback': this.batchReminders
-            }
-            // {
-            //     'name': '消息催办',
-            //     'type': 'default',
-            //     'callback': this.smsReminders
-            // }
-            ],
-            stateActive: false,
-            subject: '',
-            moreSubject: '',
-            subjectTitle: '',
-            typeId: '',
-            moreParams: {},
-            listData: [],
-            pagination: {},
-            sorts: {},
+  components: {
+    IbpsMoreSearch,
+    IbpsTypeTree,
+    IbpsAvatar,
+    IbpsToolbar,
+    IbpsListResultPage,
+    IbpsBpmnFormrenderDialog,
+    Reminder
+  },
+  mixins: [random, bpmnStatus],
+  data() {
+    const { userId, userList = [], deptList = [], menus, userInfo } = this.$store.getters
+    const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
+    const N = new Date(currentTime).getTime()
+    return {
+      visible: true,
+      currentTime: N,
+      reminderSon: false,
+      sonData: '',
+      userId: userId,
+      footText: false,
+      showPop: false,
+      noData: false,
+      showConfirmationBoxList: true,
+      countTotal: {},
+      examPopup: '',
+      ReachBottomShow: false,
+      moreSearchPopup: false,
+      searchForms: {
+        forms: [
+          // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
+          //   { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
+          { prop: 'examName', label: '考试名称', fieldType: 'text' },
+          { prop: 'bankName', label: '题库名称', fieldType: 'text' },
+          {
+            prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
+              { value: 'trainingExam', label: '培训考试' },
+              { value: 'POCTtraining', label: 'POCT培训' },
+              { value: 'selfAssessment', label: '自主考核' },
+              { value: 'routine', label: '常规' }
+            ]
+          },
+          { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
+          { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
+          // { prop: ['Q^startDate^DL^yyyy-MM-dd', 'Q^startDate^DG^yyyy-MM-dd'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
+          // { prop: ['Q^limitDate^DL^yyyy-MM-dd', 'Q^limitDate^DG^yyyy-MM-dd'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
+        ]
+      },
+      mainActions: [{
+        'name': '信息催办',
+        'type': 'primary',
+        'callback': this.batchReminders
+      }
+        // {
+        //     'name': '消息催办',
+        //     'type': 'default',
+        //     'callback': this.smsReminders
+        // }
+      ],
+      stateActive: false,
+      subject: '',
+      moreSubject: '',
+      subjectTitle: '',
+      typeId: '',
+      moreParams: {},
+      listData: [],
+      pagination: {},
+      sorts: {},
 
-            loading: false,
-            finished: false,
-            refreshing: false,
-            resultType: 'init',
-            errorType: null,
-            resultMessage: null,
+      loading: false,
+      finished: false,
+      refreshing: false,
+      resultType: 'init',
+      errorType: null,
+      resultMessage: null,
 
-            checkMode: false,
-            checkedIds: [],
-            proInstId: '',
-            defId: '',
-            formrenderVisible: false,
-            formrenderTitle: '',
-            typeTreePopup: false,
-            keyword: '',
-            name: '全部',
-            current: 0,
-            startTime: [],
-            endTime: []
+      checkMode: false,
+      checkedIds: [],
+      proInstId: '',
+      defId: '',
+      formrenderVisible: false,
+      formrenderTitle: '',
+      typeTreePopup: false,
+      keyword: '',
+      name: '全部',
+      current: 0,
+      startTime: [],
+      endTime: []
 
-        }
-    },
-    computed: {
-        ...mapState('ibps/user', [
-            'info'
-        ]),
-        rightText() {
-            return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-        },
-        selectedIds() {
-            return this.checkedIds.join(',')
-        }
+    }
+  },
+  computed: {
+    ...mapState('ibps/user', [
+      'info'
+    ]),
+    rightText() {
+      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
     },
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
 
-    beforeRouteLeave(to, from, next) {
-        if (this.showPop === true) {
-        // this.showConfirmationBoxList = true
-            this.$refs.childPop.parentSubmit()
-            this.showPop = false
-            next(false)
-        } else {
-            next()
+  beforeRouteLeave(to, from, next) {
+    if (this.showPop === true) {
+      // this.showConfirmationBoxList = true
+      this.$refs.childPop.parentSubmit()
+      this.showPop = false
+      next(false)
+    } else {
+      next()
+    }
+  },
+  created() {
+    this.setBrowseTime()
+  },
+
+  methods: {
+    prompt(item, type) {
+      if (type === 'mesg') {
+        Notify({ type: 'warning', message: `上次消息催办时间为${item.ti_xing_shi_jian_.substring(0, 16)},距今不足两小时,请勿频繁催办!` })
+      } else {
+        Notify({ type: 'warning', message: `上次短信催办时间为${item.duan_xin_shi_jian.substring(0, 16)},距今不足两小时,请勿频繁催办!` })
+      }
+    },
+    // 设置定时器
+    setBrowseTime() {
+      this.clearTimeSet = setInterval(() => {
+        this.currentTime += 1000
+      }, 1000)
+    },
+    sendFunction(listData) {
+      const sendNotice = (req, ups) => {
+        req.forEach((item, i) => {
+          this.$common.sendMsg(item)
+        })
+        updateTimes(ups)
+      }
+      // 更新数据并重新渲染
+      const updateTimes = req => {
+        const params = {
+          tableName: 't_gqswb',
+          updList: req
+        }
+        this.$common.request('update', JSON.stringify(params)).then(() => {
+          Notify({ type: 'success', message: '消息催办成功!' })
+          this.onRefreshPage()
+        })
+        // this.$common.request('update', JSON.stringify(params)).then(() => {
+        // template.$message.success('消息催办成功')
+        // template.handleAction('search', position, [], [], 0, { button_type: 'search' })
+        // })
+      }
+      const msgContent = {
+        soon: '即将超时,请及时处理!',
+        overtime: '已超时,请及时处理!'
+      }
+      const msgTitle = {
+        soon: '计划事务即将到期提醒',
+        overtime: '事务超时提醒'
+      }
+      const noticeList = []
+      const upList = []
+      let flag = false
+      let msg = ''
+      const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
+      console.log('currentTime', currentTime)
+      listData.forEach(item => {
+        const notice = {
+          subject: msgTitle[item.guo_qi_zhuang_tai],
+          content: `${item.shi_wu_ming_cheng}【${item.shi_wu_shuo_ming_}】${msgContent[item.guo_qi_zhuang_tai]}`,
+          receiverId: item.chu_li_ren_id_,
+          canreplay: '0'
+        }
+        const up = {
+          where: {
+            id_: item.id_
+          },
+          param: {
+            ti_xing_ci_shu_: parseInt(item.ti_xing_ci_shu_) + 1,
+            ti_xing_shi_jian_: currentTime
+          }
+        }
+        noticeList.push(notice)
+        upList.push(up)
+        // 校验提醒时间 (间隔不足2小时不允许发送)
+        const D = new Date(item.ti_xing_shi_jian_).getTime()
+        const N = new Date(currentTime).getTime()
+        if (N - D < 7200000) {
+          flag = true
+          msg = `事务【${item.shi_wu_ming_cheng}】上次消息催办时间为${item.ti_xing_shi_jian_},距今不足两小时,请勿频繁催办!`
         }
+      })
+      if (flag) {
+        Notify({ type: 'primary', message: msg })
+        return
+      }
+      // updateTimes(upList)
+      sendNotice(noticeList, upList)
     },
-    created() {
-        this.setBrowseTime()
+    overlayShow(item) {
+      this.reminderSon = true
+      this.sonData = item
     },
-
-    methods: {
-        prompt(item, type) {
-            if (type === 'mesg') {
-                Notify({ type: 'warning', message: `上次消息催办时间为${item.ti_xing_shi_jian_.substring(0, 16)},距今不足两小时,请勿频繁催办!` })
-            } else {
-                Notify({ type: 'warning', message: `上次短信催办时间为${item.duan_xin_shi_jian.substring(0, 16)},距今不足两小时,请勿频繁催办!` })
-            }
-        },
-        // 设置定时器
-        setBrowseTime() {
-            this.clearTimeSet = setInterval(() => {
-                this.currentTime += 1000
-            }, 1000)
-        },
-        sendFunction(listData) {
-            const sendNotice = (req, ups) => {
-                req.forEach((item, i) => {
-                    this.$common.sendMsg(item)
-                })
-                updateTimes(ups)
-            }
-            // 更新数据并重新渲染
-            const updateTimes = req => {
-                const params = {
-                    tableName: 't_gqswb',
-                    updList: req
-                }
-                this.$common.request('update', JSON.stringify(params)).then(() => {
-                    Notify({ type: 'success', message: '消息催办成功!' })
-                    this.onRefreshPage()
-                })
-                // this.$common.request('update', JSON.stringify(params)).then(() => {
-                // template.$message.success('消息催办成功')
-                // template.handleAction('search', position, [], [], 0, { button_type: 'search' })
-                // })
-            }
-            const msgContent = {
-                soon: '即将超时,请及时处理!',
-                overtime: '已超时,请及时处理!'
-            }
-            const msgTitle = {
-                soon: '计划事务即将到期提醒',
-                overtime: '事务超时提醒'
-            }
-            const noticeList = []
-            const upList = []
-            let flag = false
-            let msg = ''
-            const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
-            console.log('currentTime', currentTime)
-            listData.forEach(item => {
-                const notice = {
-                    subject: msgTitle[item.guo_qi_zhuang_tai],
-                    content: `${item.shi_wu_ming_cheng}【${item.shi_wu_shuo_ming_}】${msgContent[item.guo_qi_zhuang_tai]}`,
-                    receiverId: item.chu_li_ren_id_,
-                    canreplay: '0'
-                }
-                const up = {
-                    where: {
-                        id_: item.id_
-                    },
-                    param: {
-                        ti_xing_ci_shu_: parseInt(item.ti_xing_ci_shu_) + 1,
-                        ti_xing_shi_jian_: currentTime
-                    }
-                }
-                noticeList.push(notice)
-                upList.push(up)
-                // 校验提醒时间 (间隔不足2小时不允许发送)
-                const D = new Date(item.ti_xing_shi_jian_).getTime()
-                const N = new Date(currentTime).getTime()
-                if (N - D < 7200000) {
-                    flag = true
-                    msg = `事务【${item.shi_wu_ming_cheng}】上次消息催办时间为${item.ti_xing_shi_jian_},距今不足两小时,请勿频繁催办!`
-                }
-            })
-            if (flag) {
-                Notify({ type: 'primary', message: msg })
-                return
-            }
-            // updateTimes(upList)
-            sendNotice(noticeList, upList)
-        },
-        overlayShow(item) {
-            this.reminderSon = true
-            this.sonData = item
-        },
-        son() {
-            this.reminderSon = false
-        },
-        onClick(item, index) {
-            if (this.checkMode) {
-                this.$refs.checkboxes[index].toggle()
-            }
-        },
-        // 信息批量催办
-        batchReminders() {
-            // console.log('进入催办函数', this.checkedIds)
-            if (this.checkedIds.length === 0) {
-                this.$notify({
-                    type: 'warning',
-                    message: this.$t('common.dialog.selectedRecords')
-                })
-                return
-            }
-            this.getSMSInfo(this.checkedIds).then(res => {
-                this.sendFunction(res)
-            })
-        },
-        // 消息批量催办
-        smsReminders() {
-            if (this.checkedIds.length === 0) {
-                this.$notify({
-                    type: 'warning',
-                    message: this.$t('common.dialog.selectedRecords')
-                })
-                return
+    son() {
+      this.reminderSon = false
+    },
+    onClick(item, index) {
+      if (this.checkMode) {
+        this.$refs.checkboxes[index].toggle()
+      }
+    },
+    // 信息批量催办
+    batchReminders() {
+      // console.log('进入催办函数', this.checkedIds)
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
+      this.getSMSInfo(this.checkedIds).then(res => {
+        this.sendFunction(res)
+      })
+    },
+    // 消息批量催办
+    smsReminders() {
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
+      this.getSMSInfo(this.checkedIds).then(res => {
+        res.forEach(item => {
+          this.smsFunction(item)
+        })
+      })
+    },
+    // 查询所有详细信息
+    getSMSInfo(list) {
+      const sql = `select * from t_gqswb`
+      return new Promise((resolve, reject) => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddksgqswbcx', params: [null] } : sql).then(res => {
+          const listData = []
+          res.variables.data.forEach(item => {
+            if (list.includes(item.id_)) {
+              listData.push(item)
             }
-            this.getSMSInfo(this.checkedIds).then(res => {
-                res.forEach(item => {
-                    this.smsFunction(item)
-                })
-            })
-        },
-        // 查询所有详细信息
-        getSMSInfo(list) {
-            const sql = `select * from t_gqswb`
-            return new Promise((resolve, reject) => {
-                this.$common.request('sql', sql).then(res => {
-                    const listData = []
-                    res.variables.data.forEach(item => {
-                        if (list.includes(item.id_)) {
-                            listData.push(item)
-                        }
-                    })
-                    resolve(listData)// 将处理后的数据作为参数传递给resolve
-                }).catch(err => {
-                    reject(err)
-                })
-            })
-        },
-        // 单条数据催办
-        sendSystemInfo(item) {
-            this.sendFunction([item])
-        },
-        // 单条短信信息发布
-        sendSmsInfo(item) {
-            // console.log('发送短信消息', item)
-            this.smsFunction(item)
-            // sendSmsList().then(res=>{
-            //   console.log('发送短信成功', res);
-            // })
-        },
-        // 短信催办函数
-        smsFunction(item) {
-            if (item.chu_li_ren_dian_h) {
-                const obj = {
-                    sig: item.id_,
-                    list: [
-                        { chu_li_ren_: item.chu_li_ren_ming_, chu_li_ren_dian_h: item.chu_li_ren_dian_h, ren_wu_ming_cheng: item.shi_wu_ming_cheng }
-                    ]
-                }
-                // 获取当时时间
-                const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
-                const D = new Date(item.duan_xin_shi_jian).getTime()
-                const N = new Date(currentTime).getTime()
-                if (N - D < 7200000) {
-                    Notify({ type: 'primary', message: `事务【${item.shi_wu_ming_cheng}】上次信息催办时间为${item.duan_xin_shi_jian},距今不足两小时,请勿频繁催办!` })
-                    return
+          })
+          resolve(listData)// 将处理后的数据作为参数传递给resolve
+        }).catch(err => {
+          reject(err)
+        })
+      })
+    },
+    // 单条数据催办
+    sendSystemInfo(item) {
+      this.sendFunction([item])
+    },
+    // 单条短信信息发布
+    sendSmsInfo(item) {
+      // console.log('发送短信消息', item)
+      this.smsFunction(item)
+      // sendSmsList().then(res=>{
+      //   console.log('发送短信成功', res);
+      // })
+    },
+    // 短信催办函数
+    smsFunction(item) {
+      if (item.chu_li_ren_dian_h) {
+        const obj = {
+          sig: item.id_,
+          list: [
+            { chu_li_ren_: item.chu_li_ren_ming_, chu_li_ren_dian_h: item.chu_li_ren_dian_h, ren_wu_ming_cheng: item.shi_wu_ming_cheng }
+          ]
+        }
+        // 获取当时时间
+        const currentTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
+        const D = new Date(item.duan_xin_shi_jian).getTime()
+        const N = new Date(currentTime).getTime()
+        if (N - D < 7200000) {
+          Notify({ type: 'primary', message: `事务【${item.shi_wu_ming_cheng}】上次信息催办时间为${item.duan_xin_shi_jian},距今不足两小时,请勿频繁催办!` })
+          return
+        }
+        sendSmsList(obj).then((res) => {
+          // console.log('短信催办成功', res)
+          const up = {
+            tableName: 't_gqswb',
+            updList: [
+              {
+                where: {
+                  id_: item.id_
+                },
+                param: {
+                  duan_xin_ci_shu_: parseInt(item.duan_xin_ci_shu_) + 1,
+                  duan_xin_shi_jian: this.getCurrentDateTime()
                 }
-                sendSmsList(obj).then((res) => {
-                    // console.log('短信催办成功', res)
-                    const up = {
-                        tableName: 't_gqswb',
-                        updList: [
-                            {
-                                where: {
-                                    id_: item.id_
-                                },
-                                param: {
-                                    duan_xin_ci_shu_: parseInt(item.duan_xin_ci_shu_) + 1,
-                                    duan_xin_shi_jian: this.getCurrentDateTime()
-                                }
-                            }]
-                    }
-                    this.$common.request('update', JSON.stringify(up)).then(() => {
-                        // 更改数据库信息成功
-                        console.log('更改数据库信息成功')
-                        Notify({ type: 'success', message: '短信催办成功!' })
-                        this.onRefreshPage()
-                    })
-                })
-            } else {
-                Notify({ type: 'danger', message: '还未上传手机号' })
-            }
-        },
-        getCurrentDateTime() {
-            const now = new Date()
-            const year = now.getFullYear()
-            const month = ('0' + (now.getMonth() + 1)).slice(-2) // 月份从0开始,所以加1,并补零
-            const day = ('0' + now.getDate()).slice(-2) // 补零
-            const hours = ('0' + now.getHours()).slice(-2) // 补零
-            const minutes = ('0' + now.getMinutes()).slice(-2) // 补零
-            const seconds = ('0' + now.getSeconds()).slice(-2) // 补零
-            return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
-        },
-        updataSet(v) {
-            this.showPop = v
-        },
-        generateTitle(name, title) { // generateTitle by vue-i18n
-            return i18n.generateTitle(name, title)
-        },
-        toCheckMode() {
-            if (this.$utils.isEmpty(this.listData)) {
-                return
-            }
-            if (this.checkMode) {
-                // this.show = true
-                this.checkedIds = []
-            }
-            this.checkMode = !this.checkMode
-        },
-        clickType() {
-            this.typeTreePopup = true
-        },
-        onSearch() {
-            this.stateActive = false
-            ActionUtils.initListData(this)
-            this.current = 0
-            this.listData = []
-            this.loadData()
-        },
-        clickMoreSearch() {
-            this.moreSearchPopup = true
-            this.stateActive = false
-        },
-        clickTypeNode(data) {
-            this.typeId = data.id
-            this.onMoreSearch({})
-        },
-        // 高级查询
-        onMoreSearch(params) {
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^type_id_^SL'] = this.typeId
-            }
-            this.moreParams = params
-            this.onSearch()
-            if (this.$utils.isNotEmpty(params)) {
-                this.stateActive = true
-            }
-        },
-        resetForm() {
-            this.typeId = ''
-        },
-        // 下拉刷新
-        onRefresh() {
-            this.footText = false
-            this.noData = false
-            this.refreshing = true
-            this.finished = false
-            this.loading = true
-            this.onSearch()
-        },
-        onRefreshPage() {
-            this.checkedIds = []
-            this.checkMode = false
-            this.onRefresh()
-        },
-        /**
+              }]
+          }
+          this.$common.request('update', JSON.stringify(up)).then(() => {
+            // 更改数据库信息成功
+            console.log('更改数据库信息成功')
+            Notify({ type: 'success', message: '短信催办成功!' })
+            this.onRefreshPage()
+          })
+        })
+      } else {
+        Notify({ type: 'danger', message: '还未上传手机号' })
+      }
+    },
+    getCurrentDateTime() {
+      const now = new Date()
+      const year = now.getFullYear()
+      const month = ('0' + (now.getMonth() + 1)).slice(-2) // 月份从0开始,所以加1,并补零
+      const day = ('0' + now.getDate()).slice(-2) // 补零
+      const hours = ('0' + now.getHours()).slice(-2) // 补零
+      const minutes = ('0' + now.getMinutes()).slice(-2) // 补零
+      const seconds = ('0' + now.getSeconds()).slice(-2) // 补零
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+    },
+    updataSet(v) {
+      this.showPop = v
+    },
+    generateTitle(name, title) { // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    toCheckMode() {
+      if (this.$utils.isEmpty(this.listData)) {
+        return
+      }
+      if (this.checkMode) {
+        // this.show = true
+        this.checkedIds = []
+      }
+      this.checkMode = !this.checkMode
+    },
+    clickType() {
+      this.typeTreePopup = true
+    },
+    onSearch() {
+      this.stateActive = false
+      ActionUtils.initListData(this)
+      this.current = 0
+      this.listData = []
+      this.loadData()
+    },
+    clickMoreSearch() {
+      this.moreSearchPopup = true
+      this.stateActive = false
+    },
+    clickTypeNode(data) {
+      this.typeId = data.id
+      this.onMoreSearch({})
+    },
+    // 高级查询
+    onMoreSearch(params) {
+      if (this.$utils.isNotEmpty(this.typeId)) {
+        params['Q^type_id_^SL'] = this.typeId
+      }
+      this.moreParams = params
+      this.onSearch()
+      if (this.$utils.isNotEmpty(params)) {
+        this.stateActive = true
+      }
+    },
+    resetForm() {
+      this.typeId = ''
+    },
+    // 下拉刷新
+    onRefresh() {
+      this.footText = false
+      this.noData = false
+      this.refreshing = true
+      this.finished = false
+      this.loading = true
+      this.onSearch()
+    },
+    onRefreshPage() {
+      this.checkedIds = []
+      this.checkMode = false
+      this.onRefresh()
+    },
+    /**
        * 加载数据
        */
-        // 用户下拉时refreshing 为true,调用onRefresh函数,获取数据之后设置为false
-        // 当用户滚动到底部时,loading 变为 true,执行 onLoad 方法,完成后将 loading 设置为 false
-        // 当 finished 为 true 时,表示已经没有更多数据可加载。
-        // 当 finished 为 false 时,表示还有更多数据可以加载
-        // 当 finished 为 true 时,即使用户继续上拉,也不会触发 @load 事件,从而避免重复加载数据。
-        loadData() {
-            this.loading = true
-            this.noData = false
-            this.footText = false
-            let page = 0
-            if (this.current === 0) {
-                page = 0
-            } else {
-                page = this.current * 10
-            }
-            const key = this.subject
-            const sql = `select * from t_gqswb where t_gqswb.shi_wu_ming_cheng like'%` + key + `%'  ORDER BY t_gqswb.create_time_ DESC LIMIT ${page},10 `
-            this.$common.request('sql', sql).then(res => {
-                if (res.variables.data.length === 0) {
-                    if (this.current === 0) {
-                        this.noData = true
-                    } else {
-                        this.footText = true
-                    }
-                    this.finished = true
-                    this.loading = false
-                    this.refreshing = false
-                    return
-                }
-
-                this.listData.push(...res.variables.data)
+    // 用户下拉时refreshing 为true,调用onRefresh函数,获取数据之后设置为false
+    // 当用户滚动到底部时,loading 变为 true,执行 onLoad 方法,完成后将 loading 设置为 false
+    // 当 finished 为 true 时,表示已经没有更多数据可加载。
+    // 当 finished 为 false 时,表示还有更多数据可以加载
+    // 当 finished 为 true 时,即使用户继续上拉,也不会触发 @load 事件,从而避免重复加载数据。
+    loadData() {
+      this.loading = true
+      this.noData = false
+      this.footText = false
+      let page = 0
+      if (this.current === 0) {
+        page = 0
+      } else {
+        page = this.current * 10
+      }
+      const key = this.subject
+      const sql = `select * from t_gqswb where t_gqswb.shi_wu_ming_cheng like'%` + key + `%'  ORDER BY t_gqswb.create_time_ DESC LIMIT ${page},10 `
 
-                // 判断是否还有更多数据
-                if ((this.listData.length) % 10 !== 0) {
-                    this.footText = true
-                    this.finished = true
-                } else {
-                    this.current++
-                }
+      // sql注入接口
+      this.$common.request('sql', sql).then(res => {
+        if (res.variables.data.length === 0) {
+          if (this.current === 0) {
+            this.noData = true
+          } else {
+            this.footText = true
+          }
+          this.finished = true
+          this.loading = false
+          this.refreshing = false
+          return
+        }
 
-                this.loading = false
-                this.refreshing = false
-            }).catch(err => {
-                console.log(err)
-            })
-        },
-        // 获取格式化参数
-        getSearcFormData() {
-            let params = {}
-            if (this.$utils.isNotEmpty(this.subject)) {
-                params['Q^subject_^SL'] = this.subject
-            }
-            if (this.$utils.isNotEmpty(this.moreParams)) {
-                params = Object.assign(params, this.moreParams)
-            }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts)
-        },
+        this.listData.push(...res.variables.data)
 
-        transformTime(timeStamp) {
-            const hours = Math.floor(parseInt(timeStamp) / 3600000)
-            const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
-            return hours + '小时' + minutes + '分钟'
+        // 判断是否还有更多数据
+        if ((this.listData.length) % 10 !== 0) {
+          this.footText = true
+          this.finished = true
+        } else {
+          this.current++
         }
+
+        this.loading = false
+        this.refreshing = false
+      }).catch(err => {
+        console.log(err)
+      })
+    },
+    // 获取格式化参数
+    getSearcFormData() {
+      let params = {}
+      if (this.$utils.isNotEmpty(this.subject)) {
+        params['Q^subject_^SL'] = this.subject
+      }
+      if (this.$utils.isNotEmpty(this.moreParams)) {
+        params = Object.assign(params, this.moreParams)
+      }
+      return ActionUtils.formatParams(
+        params,
+        this.pagination,
+        this.sorts)
+    },
+
+    transformTime(timeStamp) {
+      const hours = Math.floor(parseInt(timeStamp) / 3600000)
+      const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
+      return hours + '小时' + minutes + '分钟'
     }
+  }
 }
 </script>
 <style scoped lang="scss">

+ 259 - 256
src/views/platform/bpmn/report/delayReport.vue

@@ -200,289 +200,292 @@ import IbpsListResultPage from '@/components/ibps-list-result-page'
 import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
 export default {
-    components: {
-        IbpsMoreSearch,
-        IbpsTypeTree,
-        IbpsAvatar,
-        IbpsToolbar,
-        IbpsListResultPage,
-        IbpsBpmnFormrenderDialog
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-        return {
-            footText: false,
-            noData: false,
-            oralPopup: '',
-            ReachBottomShow: false,
-            stateActive: false,
-            moreSearchPopup: false,
-            typeTreePopup: false,
-            searchForms: {
-                forms: [
-                    { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
-                    // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
-                    { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
-                    { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-                ]
-            },
+  components: {
+    IbpsMoreSearch,
+    IbpsTypeTree,
+    IbpsAvatar,
+    IbpsToolbar,
+    IbpsListResultPage,
+    IbpsBpmnFormrenderDialog
+  },
+  mixins: [random, bpmnStatus],
+  data() {
+    return {
+      footText: false,
+      noData: false,
+      oralPopup: '',
+      ReachBottomShow: false,
+      stateActive: false,
+      moreSearchPopup: false,
+      typeTreePopup: false,
+      searchForms: {
+        forms: [
+          { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
+          // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
+        ]
+      },
 
-            subject: '',
-            typeId: '',
-            moreParams: {},
+      subject: '',
+      typeId: '',
+      moreParams: {},
 
-            listData: [],
-            pagination: {},
-            sorts: {},
+      listData: [],
+      pagination: {},
+      sorts: {},
 
-            loading: false,
-            finished: false,
-            refreshing: false,
-            resultType: 'init',
-            errorType: null,
-            resultMessage: null,
+      loading: false,
+      finished: false,
+      refreshing: false,
+      resultType: 'init',
+      errorType: null,
+      resultMessage: null,
 
-            checkMode: false,
-            checkedIds: [],
-            mainActions: [{
-                'name': this.$t('common.button.remove'),
-                'type': 'danger',
-                'callback': this.onRemove
-            }],
+      checkMode: false,
+      checkedIds: [],
+      mainActions: [{
+        'name': this.$t('common.button.remove'),
+        'type': 'danger',
+        'callback': this.onRemove
+      }],
 
-            proInstId: '',
-            defId: '',
-            formrenderVisible: false,
-            formrenderTitle: '',
-            current: 0
-        }
-    },
+      proInstId: '',
+      defId: '',
+      formrenderVisible: false,
+      formrenderTitle: '',
+      current: 0
+    }
+  },
 
-    computed: {
-        ...mapState('ibps/user', [
-            'info'
-        ]),
-        rightText() {
-            return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-        },
-        selectedIds() {
-            return this.checkedIds.join(',')
-        }
+  computed: {
+    ...mapState('ibps/user', [
+      'info'
+    ]),
+    rightText() {
+      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
     },
-    methods: {
-        generateTitle(name, title) { // generateTitle by vue-i18n
-            return i18n.generateTitle(name, title)
-        },
-        /**
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
+  methods: {
+    generateTitle(name, title) { // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    /**
        * 加载数据
        *
       */
-        async loadData() {
-            this.loading = true
-            this.noData = false
-            this.footText = false
-            await this.getPositionobj()
-            let page = 0
-            if (this.current === 0) {
-                page = 0
-            } else {
-                page = this.current * 10
-            }
-            const key = this.subject
-            const sql = `select t_ycbgjlb.*,(case t_ycbgjlb.fu_jian_ when '' then '空' else t_ycbgjlb.fu_jian_ END) as aa,g.bianzhibumen,g.bianzhiren,g.shenheren,g.jieshouzhe from t_ycbgjlb LEFT JOIN (select e.*,f.jieshouzhe from (select c.*,d.shenheren from (select a.*,b.bianzhiren from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_ycbgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ = b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as shenheren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.shen_he_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.jie_shou_zhe_)) as jieshouzhe from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_zhe_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_)as g on t_ycbgjlb.id_ =g.id_ where find_in_set(t_ycbgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ycbgjlb.yang_pin_hao_ like'%` + key + `%' ORDER BY t_ycbgjlb.create_time_ DESC LIMIT ${page},10`
-            this.$common.request('sql', sql).then(res => {
-                if (res.variables.data.length === 0) {
-                    if (this.current === 0) {
-                        this.noData = true
-                    } else {
-                        this.footText = true
-                    }
-                    this.finished = true
-                    this.loading = false
-                    this.refreshing = false
-                    return
-                }
-                this.listData.push(...res.variables.data)
-                // 判断是否还有更多数据
-                if ((this.listData.length) % 10 !== 0) {
-                    this.footText = true
-                    this.finished = true
-                } else {
-                    this.current++
-                }
+    async loadData() {
+      this.loading = true
+      this.noData = false
+      this.footText = false
+      await this.getPositionobj()
+      let page = 0
+      if (this.current === 0) {
+        page = 0
+      } else {
+        page = this.current * 10
+      }
+      const key = this.subject
+
+      // sql注入接口
+      const sql = `select t_ycbgjlb.*,(case t_ycbgjlb.fu_jian_ when '' then '空' else t_ycbgjlb.fu_jian_ END) as aa,g.bianzhibumen,g.bianzhiren,g.shenheren,g.jieshouzhe from t_ycbgjlb LEFT JOIN (select e.*,f.jieshouzhe from (select c.*,d.shenheren from (select a.*,b.bianzhiren from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_ycbgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ = b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as shenheren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.shen_he_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.jie_shou_zhe_)) as jieshouzhe from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_zhe_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as f on e.id_ = f.id_)as g on t_ycbgjlb.id_ =g.id_ where find_in_set(t_ycbgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ycbgjlb.yang_pin_hao_ like'%` + key + `%' ORDER BY t_ycbgjlb.create_time_ DESC LIMIT ${page},10`
+      this.$common.request('sql', sql).then(res => {
+        if (res.variables.data.length === 0) {
+          if (this.current === 0) {
+            this.noData = true
+          } else {
+            this.footText = true
+          }
+          this.finished = true
+          this.loading = false
+          this.refreshing = false
+          return
+        }
+        this.listData.push(...res.variables.data)
+        // 判断是否还有更多数据
+        if ((this.listData.length) % 10 !== 0) {
+          this.footText = true
+          this.finished = true
+        } else {
+          this.current++
+        }
 
-                this.loading = false
-                this.refreshing = false
-            })
-        },
-        // 获取positionobj数据
-        async getPositionobj() {
-            if (this.info && this.info.positions && this.info.positions.length > 0) {
-                let posiList = []
-                this.info.positions.forEach(item => {
-                    const obj = `${item.id}.`
-                    const objList = item.path.split(obj)
-                    objList.forEach(it => {
-                        posiList.push(it)
-                    })
-                })
-                const position = this.info.positions.map(item => {
-                    return item.id
-                })
-                let posiSql = ``
-                position.forEach((item, index) => {
-                    if (index === 0) {
-                        const obj = `path_ like '%${item}%'`
-                        posiSql += obj
-                    } else {
-                        const obj = `or path_ like '%${item}%'`
-                        posiSql += obj
-                    }
-                })
-                const sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
-                await this.$common.request('sql', sql).then(res => {
-                    if (res.state === 200) {
-                        const data = res.variables.data
-                        if (data.length > 0) {
-                            data.forEach(item => {
-                                posiList.push(item.ID_)
-                            })
-                            // 数组去空值
-                            posiList = posiList.filter(item => item)
-                            // 部门上下级的id去重
-                            const positionSet = Array.from(new Set(posiList))
-                            this.positionObj = positionSet.join(',')
-                        } else {
-                            this.positionObj = ''
-                        }
-                    }
-                })
+        this.loading = false
+        this.refreshing = false
+      })
+    },
+    // 获取positionobj数据
+    async getPositionobj() {
+      if (this.info && this.info.positions && this.info.positions.length > 0) {
+        let posiList = []
+        this.info.positions.forEach(item => {
+          const obj = `${item.id}.`
+          const objList = item.path.split(obj)
+          objList.forEach(it => {
+            posiList.push(it)
+          })
+        })
+        const position = this.info.positions.map(item => {
+          return item.id
+        })
+        let posiSql = ``
+        position.forEach((item, index) => {
+          if (index === 0) {
+            const obj = `path_ like '%${item}%'`
+            posiSql += obj
+          } else {
+            const obj = `or path_ like '%${item}%'`
+            posiSql += obj
+          }
+        })
+        // sql注入接口 列表查询使用专用sql后可取消
+        const sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
+        await this.$common.request('sql', sql).then(res => {
+          if (res.state === 200) {
+            const data = res.variables.data
+            if (data.length > 0) {
+              data.forEach(item => {
+                posiList.push(item.ID_)
+              })
+              // 数组去空值
+              posiList = posiList.filter(item => item)
+              // 部门上下级的id去重
+              const positionSet = Array.from(new Set(posiList))
+              this.positionObj = positionSet.join(',')
             } else {
-                this.positionObj = ''
+              this.positionObj = ''
             }
-        },
-        /**
+          }
+        })
+      } else {
+        this.positionObj = ''
+      }
+    },
+    /**
        * 获取格式化参数
        */
-        getSearcFormData() {
-            let params = {}
-            if (this.$utils.isNotEmpty(this.subject)) {
-                params['Q^subject_^SL'] = this.subject
-            }
-            if (this.$utils.isNotEmpty(this.moreParams)) {
-                params = Object.assign(params, this.moreParams)
-            }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts)
-        },
-        /**
+    getSearcFormData() {
+      let params = {}
+      if (this.$utils.isNotEmpty(this.subject)) {
+        params['Q^subject_^SL'] = this.subject
+      }
+      if (this.$utils.isNotEmpty(this.moreParams)) {
+        params = Object.assign(params, this.moreParams)
+      }
+      return ActionUtils.formatParams(
+        params,
+        this.pagination,
+        this.sorts)
+    },
+    /**
        * 下拉刷新
        */
-        onRefresh() {
-            this.footText = false
-            this.refreshing = true
-            this.finished = false
-            this.loading = true
-            this.onSearch()
-        },
-        /**
+    onRefresh() {
+      this.footText = false
+      this.refreshing = true
+      this.finished = false
+      this.loading = true
+      this.onSearch()
+    },
+    /**
        * 查询
        */
-        onSearch() {
-            this.stateActive = false
-            ActionUtils.initListData(this)
-            this.loadData()
-        },
-        /**
+    onSearch() {
+      this.stateActive = false
+      ActionUtils.initListData(this)
+      this.loadData()
+    },
+    /**
        * 高级查询
        */
-        onMoreSearch(params) {
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^type_id_^SL'] = this.typeId
-            }
-            this.moreParams = params
-            this.onSearch()
-            if (this.$utils.isNotEmpty(params)) {
-                this.stateActive = true
-            }
-        },
-        /**
+    onMoreSearch(params) {
+      if (this.$utils.isNotEmpty(this.typeId)) {
+        params['Q^type_id_^SL'] = this.typeId
+      }
+      this.moreParams = params
+      this.onSearch()
+      if (this.$utils.isNotEmpty(params)) {
+        this.stateActive = true
+      }
+    },
+    /**
        * 弹窗更多查询条件
        */
-        clickMoreSearch() {
-            this.moreSearchPopup = true
-            this.stateActive = false
-        },
-        /**
+    clickMoreSearch() {
+      this.moreSearchPopup = true
+      this.stateActive = false
+    },
+    /**
        * 重置表单
        */
-        resetForm() {
-            this.typeId = ''
-        },
-        getTaskDesc(v) {
-            if (!v.includes('#')) {
-                return ''
-            }
-            return v.split('#')[1] || ''
-        },
-        // 点击左边显示
-        clickType() {
-            this.typeTreePopup = true
-        },
-        clickTypeNode(data) {
-            this.typeId = data.id
-            this.onMoreSearch({})
-        },
-        onClick(item, index) {
-            this.ReachBottomShow = true
-            this.oralPopup = item
-        },
-        onRefreshPage() {
-            this.checkedIds = []
-            this.checkMode = false
-            this.onRefresh()
-        },
-        toCheckMode() {
-            if (this.$utils.isEmpty(this.listData)) {
-                return
-            }
-            if (this.checkMode) {
-                // this.show = true
-                this.checkedIds = []
-            }
-            this.checkMode = !this.checkMode
-        },
-        onRemove() {
-            if (this.checkedIds.length === 0) {
-                this.$notify({
-                    type: 'warning',
-                    message: this.$t('common.dialog.selectedRecords')
-                })
-                return
-            }
-            this.$dialog.confirm({
-                title: this.$t('common.dialog.warn'),
-                message: this.$t('common.operate.makeSure')
-            }).then(() => {
-                removeDraft({ ids: this.selectedIds }).then(response => {
-                    this.$notify({
-                        type: 'success',
-                        message: '删除草稿成功!'
-                    })
-                    this.onRefreshPage()
-                }).catch((e) => {
-                    console.error(e)
-                })
-            })
-        },
-        onClose() {
-            this.ReachBottomShow = false
-        }
-
+    resetForm() {
+      this.typeId = ''
+    },
+    getTaskDesc(v) {
+      if (!v.includes('#')) {
+        return ''
+      }
+      return v.split('#')[1] || ''
+    },
+    // 点击左边显示
+    clickType() {
+      this.typeTreePopup = true
+    },
+    clickTypeNode(data) {
+      this.typeId = data.id
+      this.onMoreSearch({})
+    },
+    onClick(item, index) {
+      this.ReachBottomShow = true
+      this.oralPopup = item
+    },
+    onRefreshPage() {
+      this.checkedIds = []
+      this.checkMode = false
+      this.onRefresh()
+    },
+    toCheckMode() {
+      if (this.$utils.isEmpty(this.listData)) {
+        return
+      }
+      if (this.checkMode) {
+        // this.show = true
+        this.checkedIds = []
+      }
+      this.checkMode = !this.checkMode
+    },
+    onRemove() {
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
+      this.$dialog.confirm({
+        title: this.$t('common.dialog.warn'),
+        message: this.$t('common.operate.makeSure')
+      }).then(() => {
+        removeDraft({ ids: this.selectedIds }).then(response => {
+          this.$notify({
+            type: 'success',
+            message: '删除草稿成功!'
+          })
+          this.onRefreshPage()
+        }).catch((e) => {
+          console.error(e)
+        })
+      })
+    },
+    onClose() {
+      this.ReachBottomShow = false
     }
 
+  }
+
 }
 </script>
 <style lang="scss" scoped>

+ 287 - 285
src/views/platform/bpmn/report/oralReport.vue

@@ -225,322 +225,324 @@ import IbpsListResultPage from '@/components/ibps-list-result-page'
 import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
 export default {
-    components: {
-        IbpsMoreSearch,
-        IbpsTypeTree,
-        IbpsAvatar,
-        IbpsToolbar,
-        IbpsListResultPage,
-        IbpsBpmnFormrenderDialog,
-        IbpsUploader
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-        return {
-            id: '',
-            footText: false,
-            noData: false,
-            oralPopup: '',
-            ReachBottomShow: false,
-            stateActive: false,
-            moreSearchPopup: false,
-            typeTreePopup: false,
-            searchForms: {
-                forms: [
-                    { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
-                    // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
-                    { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
-                    { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-                ]
-            },
+  components: {
+    IbpsMoreSearch,
+    IbpsTypeTree,
+    IbpsAvatar,
+    IbpsToolbar,
+    IbpsListResultPage,
+    IbpsBpmnFormrenderDialog,
+    IbpsUploader
+  },
+  mixins: [random, bpmnStatus],
+  data() {
+    return {
+      id: '',
+      footText: false,
+      noData: false,
+      oralPopup: '',
+      ReachBottomShow: false,
+      stateActive: false,
+      moreSearchPopup: false,
+      typeTreePopup: false,
+      searchForms: {
+        forms: [
+          { prop: 'Q^subject_^SL', label: '事务名称', fieldType: 'text' },
+          // { prop: 'Q^proc_def_name_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: 'Q^inst.subject_^SL', label: '事务说明', fieldType: 'text' },
+          { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
+        ]
+      },
 
-            subject: '',
-            typeId: '',
-            moreParams: {},
+      subject: '',
+      typeId: '',
+      moreParams: {},
 
-            listData: [],
-            pagination: {},
-            sorts: {},
+      listData: [],
+      pagination: {},
+      sorts: {},
 
-            loading: false,
-            finished: false,
-            refreshing: false,
-            resultType: 'init',
-            errorType: null,
-            resultMessage: null,
+      loading: false,
+      finished: false,
+      refreshing: false,
+      resultType: 'init',
+      errorType: null,
+      resultMessage: null,
 
-            checkMode: false,
-            checkedIds: [],
-            mainActions: [{
-                'name': this.$t('common.button.remove'),
-                'type': 'danger',
-                'callback': this.onRemove
-            }],
+      checkMode: false,
+      checkedIds: [],
+      mainActions: [{
+        'name': this.$t('common.button.remove'),
+        'type': 'danger',
+        'callback': this.onRemove
+      }],
 
-            proInstId: '',
-            defId: '',
-            formrenderVisible: false,
-            formrenderTitle: '',
-            current: 0
-        }
-    },
+      proInstId: '',
+      defId: '',
+      formrenderVisible: false,
+      formrenderTitle: '',
+      current: 0
+    }
+  },
 
-    computed: {
-        ...mapState('ibps/user', [
-            'info'
-        ]),
-        rightText() {
-            return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-        },
-        selectedIds() {
-            return this.checkedIds.join(',')
-        }
+  computed: {
+    ...mapState('ibps/user', [
+      'info'
+    ]),
+    rightText() {
+      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
     },
-    methods: {
-        generateTitle(name, title) { // generateTitle by vue-i18n
-            return i18n.generateTitle(name, title)
-        },
-        /**
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
+  methods: {
+    generateTitle(name, title) { // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
+    },
+    /**
        * 加载数据
        *
       */
-        async loadData() {
-            this.loading = true
-            this.noData = false
-            this.footText = false
-            await this.getPositionobj()
-            let page = 0
-            if (this.current === 0) {
-                page = 0
-            } else {
-                page = this.current * 10
-            }
-            const key = this.subject
-            const sql = `select t_ktbglcjgjlb.*,(case t_ktbglcjgjlb.fu_jian_ when '' then '空' else t_ktbglcjgjlb.fu_jian_ END) as aa,c.bianzhibumen,c.bianzhiren from t_ktbglcjgjlb LEFT JOIN (select a.*,b.bianzhiren from(select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_ktbglcjgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN(select t.id_ ,u.NAME_ as bianzhiren from t_ktbglcjgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ = b.id_) as c on c.id_ =t_ktbglcjgjlb.id_ where find_in_set(t_ktbglcjgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ktbglcjgjlb.xing_ming_ like'%` + key + `%' ORDER BY  t_ktbglcjgjlb.create_time_ DESC LIMIT ${page},10`
-            this.$common.request('sql', sql).then(res => {
-                if (res.variables.data.length === 0) {
-                    if (this.current === 0) {
-                        this.noData = true
-                    } else {
-                        this.footText = true
-                    }
-                    this.finished = true
-                    this.loading = false
-                    this.refreshing = false
-                    return
-                }
+    async loadData() {
+      this.loading = true
+      this.noData = false
+      this.footText = false
+      await this.getPositionobj()
+      let page = 0
+      if (this.current === 0) {
+        page = 0
+      } else {
+        page = this.current * 10
+      }
+      const key = this.subject
+      // sql注入接口
+      const sql = `select t_ktbglcjgjlb.*,(case t_ktbglcjgjlb.fu_jian_ when '' then '空' else t_ktbglcjgjlb.fu_jian_ END) as aa,c.bianzhibumen,c.bianzhiren from t_ktbglcjgjlb LEFT JOIN (select a.*,b.bianzhiren from(select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen  from t_ktbglcjgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as a LEFT JOIN(select t.id_ ,u.NAME_ as bianzhiren from t_ktbglcjgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY  t.create_time_ DESC) as b on a.id_ = b.id_) as c on c.id_ =t_ktbglcjgjlb.id_ where find_in_set(t_ktbglcjgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ktbglcjgjlb.xing_ming_ like'%` + key + `%' ORDER BY  t_ktbglcjgjlb.create_time_ DESC LIMIT ${page},10`
+      this.$common.request('sql', sql).then(res => {
+        if (res.variables.data.length === 0) {
+          if (this.current === 0) {
+            this.noData = true
+          } else {
+            this.footText = true
+          }
+          this.finished = true
+          this.loading = false
+          this.refreshing = false
+          return
+        }
 
-                this.listData.push(...res.variables.data)
+        this.listData.push(...res.variables.data)
 
-                // 判断是否还有更多数据
-                if ((this.listData.length) % 10 !== 0) {
-                    this.footText = true
-                    this.finished = true
-                } else {
-                    this.current++
-                }
+        // 判断是否还有更多数据
+        if ((this.listData.length) % 10 !== 0) {
+          this.footText = true
+          this.finished = true
+        } else {
+          this.current++
+        }
 
-                this.loading = false
-                this.refreshing = false
-            })
-        },
-        // 获取positionobj数据
-        async getPositionobj() {
-            if (this.info && this.info.positions && this.info.positions.length > 0) {
-                let posiList = []
-                this.info.positions.forEach(item => {
-                    const obj = `${item.id}.`
-                    const objList = item.path.split(obj)
-                    objList.forEach(it => {
-                        posiList.push(it)
-                    })
-                })
-                const position = this.info.positions.map(item => {
-                    return item.id
-                })
-                let posiSql = ``
-                position.forEach((item, index) => {
-                    if (index === 0) {
-                        const obj = `path_ like '%${item}%'`
-                        posiSql += obj
-                    } else {
-                        const obj = `or path_ like '%${item}%'`
-                        posiSql += obj
-                    }
-                })
-                const sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
-                await this.$common.request('sql', sql).then(res => {
-                    if (res.state === 200) {
-                        const data = res.variables.data
-                        if (data.length > 0) {
-                            data.forEach(item => {
-                                posiList.push(item.ID_)
-                            })
-                            // 数组去空值
-                            posiList = posiList.filter(item => item)
-                            // 部门上下级的id去重
-                            const positionSet = Array.from(new Set(posiList))
-                            this.positionObj = positionSet.join(',')
-                        } else {
-                            this.positionObj = ''
-                        }
-                    }
-                })
+        this.loading = false
+        this.refreshing = false
+      })
+    },
+    // 获取positionobj数据
+    async getPositionobj() {
+      if (this.info && this.info.positions && this.info.positions.length > 0) {
+        let posiList = []
+        this.info.positions.forEach(item => {
+          const obj = `${item.id}.`
+          const objList = item.path.split(obj)
+          objList.forEach(it => {
+            posiList.push(it)
+          })
+        })
+        const position = this.info.positions.map(item => {
+          return item.id
+        })
+        let posiSql = ``
+        position.forEach((item, index) => {
+          if (index === 0) {
+            const obj = `path_ like '%${item}%'`
+            posiSql += obj
+          } else {
+            const obj = `or path_ like '%${item}%'`
+            posiSql += obj
+          }
+        })
+        // sql注入接口 列表查询使用专用sql后可取消
+        const sql = `select * from ibps_party_entity where party_type_ = 'position' and (${posiSql})`
+        await this.$common.request('sql', sql).then(res => {
+          if (res.state === 200) {
+            const data = res.variables.data
+            if (data.length > 0) {
+              data.forEach(item => {
+                posiList.push(item.ID_)
+              })
+              // 数组去空值
+              posiList = posiList.filter(item => item)
+              // 部门上下级的id去重
+              const positionSet = Array.from(new Set(posiList))
+              this.positionObj = positionSet.join(',')
             } else {
-                this.positionObj = ''
+              this.positionObj = ''
             }
-        },
-        /**
+          }
+        })
+      } else {
+        this.positionObj = ''
+      }
+    },
+    /**
        * 获取格式化参数
        */
-        getSearcFormData() {
-            let params = {}
-            if (this.$utils.isNotEmpty(this.subject)) {
-                params['Q^subject_^SL'] = this.subject
-            }
-            if (this.$utils.isNotEmpty(this.moreParams)) {
-                params = Object.assign(params, this.moreParams)
-            }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts)
-        },
-        /**
+    getSearcFormData() {
+      let params = {}
+      if (this.$utils.isNotEmpty(this.subject)) {
+        params['Q^subject_^SL'] = this.subject
+      }
+      if (this.$utils.isNotEmpty(this.moreParams)) {
+        params = Object.assign(params, this.moreParams)
+      }
+      return ActionUtils.formatParams(
+        params,
+        this.pagination,
+        this.sorts)
+    },
+    /**
        * 下拉刷新
        */
-        onRefresh() {
-            this.footText = false
-            this.refreshing = true
-            this.finished = false
-            this.loading = true
-            this.onSearch()
-        },
-        /**
+    onRefresh() {
+      this.footText = false
+      this.refreshing = true
+      this.finished = false
+      this.loading = true
+      this.onSearch()
+    },
+    /**
        * 查询
        */
-        onSearch() {
-            this.stateActive = false
-            ActionUtils.initListData(this)
-            this.loadData()
-        },
-        /**
+    onSearch() {
+      this.stateActive = false
+      ActionUtils.initListData(this)
+      this.loadData()
+    },
+    /**
        * 高级查询
        */
-        onMoreSearch(params) {
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^type_id_^SL'] = this.typeId
-            }
-            this.moreParams = params
-            this.onSearch()
-            if (this.$utils.isNotEmpty(params)) {
-                this.stateActive = true
-            }
-        },
-        /**
+    onMoreSearch(params) {
+      if (this.$utils.isNotEmpty(this.typeId)) {
+        params['Q^type_id_^SL'] = this.typeId
+      }
+      this.moreParams = params
+      this.onSearch()
+      if (this.$utils.isNotEmpty(params)) {
+        this.stateActive = true
+      }
+    },
+    /**
        * 弹窗更多查询条件
        */
-        clickMoreSearch() {
-            this.moreSearchPopup = true
-            this.stateActive = false
-        },
-        /**
+    clickMoreSearch() {
+      this.moreSearchPopup = true
+      this.stateActive = false
+    },
+    /**
        * 重置表单
        */
-        resetForm() {
-            this.typeId = ''
-        },
-        getTaskDesc(v) {
-            if (!v.includes('#')) {
-                return ''
-            }
-            return v.split('#')[1] || ''
-        },
-        // 点击左边显示
-        clickType() {
-            this.typeTreePopup = true
-        },
-        clickTypeNode(data) {
-            this.typeId = data.id
-            this.onMoreSearch({})
-        },
-        onClick(item, index) {
-            this.id = item.id_
-            this.ReachBottomShow = true
-            this.oralPopup = item
-        },
-        onRefreshPage() {
-            this.checkedIds = []
-            this.checkMode = false
-            this.onRefresh()
-        },
-        toCheckMode() {
-            if (this.$utils.isEmpty(this.listData)) {
-                return
-            }
-            if (this.checkMode) {
-                // this.show = true
-                this.checkedIds = []
-            }
-            this.checkMode = !this.checkMode
-        },
-        onRemove() {
-            if (this.checkedIds.length === 0) {
-                this.$notify({
-                    type: 'warning',
-                    message: this.$t('common.dialog.selectedRecords')
-                })
-                return
-            }
-            this.$dialog.confirm({
-                title: this.$t('common.dialog.warn'),
-                message: this.$t('common.operate.makeSure')
-            }).then(() => {
-                removeDraft({ ids: this.selectedIds }).then(response => {
-                    this.$notify({
-                        type: 'success',
-                        message: '删除草稿成功!'
-                    })
-                    this.onRefreshPage()
-                }).catch((e) => {
-                    console.error(e)
-                })
-            })
-        },
-        onClose() {
-            this.ReachBottomShow = false
-        }
+    resetForm() {
+      this.typeId = ''
+    },
+    getTaskDesc(v) {
+      if (!v.includes('#')) {
+        return ''
+      }
+      return v.split('#')[1] || ''
+    },
+    // 点击左边显示
+    clickType() {
+      this.typeTreePopup = true
+    },
+    clickTypeNode(data) {
+      this.typeId = data.id
+      this.onMoreSearch({})
+    },
+    onClick(item, index) {
+      this.id = item.id_
+      this.ReachBottomShow = true
+      this.oralPopup = item
+    },
+    onRefreshPage() {
+      this.checkedIds = []
+      this.checkMode = false
+      this.onRefresh()
+    },
+    toCheckMode() {
+      if (this.$utils.isEmpty(this.listData)) {
+        return
+      }
+      if (this.checkMode) {
+        // this.show = true
+        this.checkedIds = []
+      }
+      this.checkMode = !this.checkMode
+    },
+    onRemove() {
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
+      this.$dialog.confirm({
+        title: this.$t('common.dialog.warn'),
+        message: this.$t('common.operate.makeSure')
+      }).then(() => {
+        removeDraft({ ids: this.selectedIds }).then(response => {
+          this.$notify({
+            type: 'success',
+            message: '删除草稿成功!'
+          })
+          this.onRefreshPage()
+        }).catch((e) => {
+          console.error(e)
+        })
+      })
+    },
+    onClose() {
+      this.ReachBottomShow = false
+    }
 
-        //   lookPosition(str) {
-        //     return new Promise((resolve, reject) => {
-        //       let sql = `select * from ibps_party_entity where find_in_set(ID_,'${str}') order by DEPTH_`
-        //       this.$getCommon.getRepust('sql', sql).then(res => {
-        //         const data = res.data.variables.data
-        //         if (data.length > 0) {
-        //           data.forEach(item => {
-        //             item.id = item.ID_
-        //             item.name = item.NAME_
-        //             item.path = item.PATH_
-        //             item.text = item.NAME_
-        //           })
-        //           uni.setStorageSync('mainPosition', data[0])
-        //           uni.setStorageSync('positionList', data)
-        //           this.getPosition(data).then(res => {
-        //             console.log("获得什么数据啊data", data);
-        //             resolve(data)
-        //           })
+    //   lookPosition(str) {
+    //     return new Promise((resolve, reject) => {
+    //       let sql = `select * from ibps_party_entity where find_in_set(ID_,'${str}') order by DEPTH_`
+    //       this.$getCommon.getRepust('sql', sql).then(res => {
+    //         const data = res.data.variables.data
+    //         if (data.length > 0) {
+    //           data.forEach(item => {
+    //             item.id = item.ID_
+    //             item.name = item.NAME_
+    //             item.path = item.PATH_
+    //             item.text = item.NAME_
+    //           })
+    //           uni.setStorageSync('mainPosition', data[0])
+    //           uni.setStorageSync('positionList', data)
+    //           this.getPosition(data).then(res => {
+    //             console.log("获得什么数据啊data", data);
+    //             resolve(data)
+    //           })
 
-        //         } else {
-        //           resolve(data)
-        //         }
+    //         } else {
+    //           resolve(data)
+    //         }
 
-        //       }).catch(err => {
-        //         reject(err)
-        //       })
-        //     })
+    //       }).catch(err => {
+    //         reject(err)
+    //       })
+    //     })
 
-        //   },
-    }
+    //   },
+  }
 
 }
 </script>

+ 39 - 39
src/views/platform/bpmn/satisfaction/satisfaction.vue

@@ -71,16 +71,16 @@
         />
         <van-field
           v-model="keHuLianXiRen"
-    
+
           label="用户姓名:"
           placeholder="请输入用户姓名"
           label-width="6em"
           clearable
         />
-        
+
         <van-field
           v-model="lianxidianhua"
-      
+
           label="用户电话:"
           placeholder="请输入用户电话"
           label-width="6em"
@@ -94,7 +94,7 @@
         />
         <van-field
           v-model="keHuLianXiYouXian"
-  
+
           label="用户邮箱:"
           placeholder="请输入用户邮箱"
           label-width="6em"
@@ -107,7 +107,7 @@
           ]"
         />
       </van-form>
-      <van-cell-group v-if="peizhi.length>0" v-for="(item,i) in peizhi" :key="i" class="marginF">
+      <van-cell-group v-for="(item,i) in peizhi" v-if="peizhi.length>0" :key="i" class="marginF">
         <div
           class="verticalLine"
           style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
@@ -256,13 +256,13 @@
         </van-radio-group>
 
         <van-field
+          v-if="touSu!='无'"
           v-model="qingNinTianXie"
           autosize
           class="typeStyle"
           type="textarea"
           placeholder="请填写对检验科意见与建议"
           label-width="0"
-          v-if="touSu!='无'"
           clearable
         />
       </van-cell-group>
@@ -334,7 +334,7 @@ export default {
         '非常满意'
       ],
       level: null,
-      peizhi:[],
+      peizhi: [],
       peiZhi1: '服务态度',
       peiZhi2: '检验服务能力',
       peiZhi3: '检验报告及时性',
@@ -426,9 +426,9 @@ export default {
         // 'keHuLianXiYouXian'
       ]
       const list2 = [
-        // '用户姓名', 
-        '用户单位',
-        // '用户电话', 
+        // '用户姓名',
+        '用户单位'
+        // '用户电话',
         // '用户邮箱'
       ]
       for (const item in list1) {
@@ -439,7 +439,7 @@ export default {
           })
         }
       }
-      if (!this.qingNinTianXie&&this.touSu=='有') {
+      if (!this.qingNinTianXie && this.touSu == '有') {
         return this.$toast({
           duration: 2000, // 持续展示 toast
           message: '请输入对检验科意见与建议'
@@ -481,10 +481,10 @@ export default {
         // pingFen3: this.setRote(this.wenTiSanDaAn),
         // pingFen4: this.setRote(this.wenTiSiDaAn),
         // pingFen5: this.setRote(this.wenTiWuDaAn),
-        yiJianNeiRong: this.touSu=='无'?'':this.qingNinTianXie,
+        yiJianNeiRong: this.touSu == '无' ? '' : this.qingNinTianXie,
         bianZhiRen: useId,
         bianZhiShiJian: this.$methCommon.time(16),
-        bianZhiBuMen: this.mainPosition===null ? detpId : this.mainPosition.id,
+        bianZhiBuMen: this.mainPosition === null ? detpId : this.mainPosition.id,
 
         shiFouGuoShen: '已编制',
         // shiWuShuoMing: this.shiWuShuoMing,
@@ -497,7 +497,7 @@ export default {
         // peiZhi4: this.peiZhi4,
         // peiZhi5: this.peiZhi5,
         fuJian: this.fuJianShangChuanArray,
-        myddczb:[]
+        myddczb: []
       }
       this.peizhi.forEach(element => {
         paraValue.myddczb.push({
@@ -535,32 +535,32 @@ export default {
     getMu() {
       const { first, second } = this.$store.getters.level || {}
       const sql = `select id_ as configId, pei_zhi_xiang_ as configData from t_mydpz where di_dian_ = '${second || first}' order by create_time_ desc`
-      this.$common.request('sql', sql).then(res => {
-        const { data = [] } = res.variables || {}
-        if (!data.length) {
-          return
-        }
-        const { configId, configData } = data[0]
-        // this.configId = configId
-        this.peizhi = configData.split('@#@').map(item => {
-          return { name: item, val:6 }
-        })
-        console.log(this.peizhi, 'sdaesiuodhiudhqwiudhqwi')
+      // this.$common.request('sql', sql).then(res => {
+      //   const { data = [] } = res.variables || {}
+      //   if (!data.length) {
+      //     return
+      //   }
+      //   const { configId, configData } = data[0]
+      //   // this.configId = configId
+      //   this.peizhi = configData.split('@#@').map(item => {
+      //     return { name: item, val:6 }
+      //   })
+      //   console.log(this.peizhi, 'sdaesiuodhiudhqwiudhqwi')
 
-        // if (data.length > 0) {
-        //   this.peiZhi1 = data[0].pei_zhi_1_
-        //   this.peiZhi2 = data[0].pei_zhi_2_
-        //   this.peiZhi3 = data[0].pei_zhi_3_
-        //   this.peiZhi4 = data[0].pei_zhi_4_
-        //   this.peiZhi5 = data[0].pei_zhi_5_
-        // } else {
-        //   this.peiZhi1 = '服务态度'
-        //   this.peiZhi2 = '检验服务能力'
-        //   this.peiZhi3 = '检验报告及时性'
-        //   this.peiZhi4 = '检验结果准确率'
-        //   this.peiZhi5 = '工作规范性'
-        // }
-      })
+      // if (data.length > 0) {
+      //   this.peiZhi1 = data[0].pei_zhi_1_
+      //   this.peiZhi2 = data[0].pei_zhi_2_
+      //   this.peiZhi3 = data[0].pei_zhi_3_
+      //   this.peiZhi4 = data[0].pei_zhi_4_
+      //   this.peiZhi5 = data[0].pei_zhi_5_
+      // } else {
+      //   this.peiZhi1 = '服务态度'
+      //   this.peiZhi2 = '检验服务能力'
+      //   this.peiZhi3 = '检验报告及时性'
+      //   this.peiZhi4 = '检验结果准确率'
+      //   this.peiZhi5 = '工作规范性'
+      // }
+      // })
     },
     // 获取上传状态
     select(file) {

+ 4 - 3
src/views/platform/bpmn/shiftTransferApplication/staForm.vue

@@ -254,6 +254,7 @@ import {
   snapshot
 } from '@/api/platform/form/transfer'
 // import { agree } from '@/api/platform/bpmn/bpmTask'
+import { dbSqlConfig } from '@/constant'
 
 export default {
   components: {
@@ -382,7 +383,7 @@ export default {
       this.list = []
       const sql = `select a.* from t_schedule a LEFT JOIN t_schedule_detail b on a.id_=b.parent_id_ where a.status_='已发布' and b.user_id_ = '${val}' and CAST(a.end_date_ AS DATE)>='${this.$common.getFormatDate('string', 10, this.nowDate)}'`
 
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtbhqsjfwnpbsj', params: [val, this.$common.getFormatDate('string', 10, this.nowDate)] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data || []
           data.forEach((item, i) => {
@@ -395,7 +396,7 @@ export default {
       const sql = `select a.id_ as fid, a.start_date_, a.end_date_, a.config_, a.overview_, b.* from t_schedule a JOIN t_schedule_detail b on a.id_=b.parent_id_ where a.status_='已发布' and a.id_ = '${val}'`
       Object.assign(this.showDateArr, {})
       const showData = {}
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtbgjidhqpbsj', params: [val] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data || []
           data.forEach((item, i) => {
@@ -541,7 +542,7 @@ export default {
     getDe(id) {
       const sql = `select c.*,d.title_,d.start_date_, d.end_date_,d.config_ from (select a.id_ as fid, a.schedule_id_,a.reason_,a.status,a.type_,a.executor_,a.reject_reason_ as frejectReason,b.* from t_adjustment_detail b join t_adjustment a on a.id_ = b.parent_id_ where a.id_ = '${id}') c join t_schedule d on c.schedule_id_ = d.id_`
 
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtbhqpbsjxqsj', params: [id] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data
           this.form = {

+ 9 - 8
src/views/platform/bpmn/shiftTransferApplication/staList.vue

@@ -208,14 +208,15 @@ export default {
       // const sql =
       // 		`select * from t_adjustment where ${typeActive} ${itemSql}  ORDER BY create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
       if (this.active === '我发起的') {
-        const sql =
-					`select a.id_ as id,a.tenant_id_ as tenantId,a.ip_ as ip,a.create_by_ as createBy,a.create_time_ as createTime,a.update_by_ as updateBy,a.update_time_ as updateTime,a.di_dian_ as diDian,a.reason_ as reason,a.status as status,a.executor_ as executor,a.execute_date_ as executeDate,a.overview_ as overview,a.schedule_id_ as scheduleId,a.type_ as type,a.reject_reason_ as rejectReason,a.partys from (select f.*,GROUP_CONCAT(z.party_) as partys from t_adjustment f left join t_adjustment_detail z on f.id_ = z.parent_id_  GROUP BY f.id_) a where create_by_ = '${this.useId}' ORDER BY a.create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
-        this.$common.request('sql', sql).then(response => {
-        // 处理数据
-          ActionUtils.handleListDataCommon(this, response.variables)
-        }).catch((e) => {
-          ActionUtils.handleErrorData(this, e)
-        })
+        // 临时注释
+        // const sql =
+        // 	`select a.id_ as id,a.tenant_id_ as tenantId,a.ip_ as ip,a.create_by_ as createBy,a.create_time_ as createTime,a.update_by_ as updateBy,a.update_time_ as updateTime,a.di_dian_ as diDian,a.reason_ as reason,a.status as status,a.executor_ as executor,a.execute_date_ as executeDate,a.overview_ as overview,a.schedule_id_ as scheduleId,a.type_ as type,a.reject_reason_ as rejectReason,a.partys from (select f.*,GROUP_CONCAT(z.party_) as partys from t_adjustment f left join t_adjustment_detail z on f.id_ = z.parent_id_  GROUP BY f.id_) a where create_by_ = '${this.useId}' ORDER BY a.create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
+        // this.$common.request('sql', sql).then(response => {
+        // // 处理数据
+        //   ActionUtils.handleListDataCommon(this, response.variables)
+        // }).catch((e) => {
+        //   ActionUtils.handleErrorData(this, e)
+        // })
       } else if (this.active === '待我处理') {
         console.log('221312312321312321')
         queryAdjustment(this.getSearcFormData()).then(res => {

+ 4 - 2
src/views/platform/bpmn/siginin/index.vue

@@ -29,6 +29,8 @@ name="wap-home-o"
 import { mapState } from 'vuex'
 import Vue from 'vue'
 import { Toast } from 'vant'
+import { dbSqlConfig } from '@/constant'
+
 Vue.use(Toast)
 export default {
   data() {
@@ -55,7 +57,7 @@ export default {
       // this.$route.query.codeId = '1244662627406184448'
       const sql = `select * from t_qrcodeb where id_='${this.$route.query.codeId}'`
       if (this.$route.query.codeId) {
-        this.$common.request('sql', sql).then(res => {
+        this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddgjidhqewm', params: [this.$route.query.codeId] } : sql).then(res => {
           console.log('根据id查询得到的数据', res)
           const data = res.variables.data || []
           if (data.length > 0) {
@@ -79,7 +81,7 @@ export default {
     getAlreadyQD() {
       // t_qdxxb签到信息表
       const sql = `select * from t_qdxxb where er_wei_ma_id_='${this.$route.query.codeId}' and ren_yuan_id_ = '${this.info.employee.id}'`
-      this.$common.request('sql', sql).then(res => {
+      this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddgjewmryhqqdxx', params: [this.$route.query.codeId, this.info.employee.id] } : sql).then(res => {
         // console.log("根据this.$route.query.codeId和用户id查询数据库", res);
         const data = res.variables.data || []
         if (data.length > 0) {

+ 2 - 1
src/views/system/dashboard/index.vue

@@ -169,6 +169,7 @@ import IbpsAvatar from '@/components/ibps-avatar'
 import NoticeDialog from '@/views/platform/notice/edit'
 import menu from './menu.json'
 import { findAllByCurrUserId } from '@/api/platform/system/desktop'
+import { dbSqlConfig } from '@/constant'
 
 // 透明图片
 const BLANK =
@@ -384,7 +385,7 @@ export default {
           }
 
           const sql = `select a.id_ as fid, a.start_date_, a.end_date_, a.config_, a.overview_, b.* from t_schedule_detail b join t_schedule a on a.id_ = b.parent_id_ where a.status_='已发布' and b.user_id_ = '${that.userInfo.user.id}' and (CAST(a.start_date_ AS DATE) like '%${time}%' or  CAST(a.end_date_ AS DATE) like '%${time}%' or (CAST(a.start_date_ AS DATE) < '${time}' and CAST(a.end_date_ AS DATE)>'${time}') )`
-          this.$common.request('sql', sql).then(resp => {
+          this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddsywdpbhqdtzs', params: [that.userInfo.user.id, time, time, time, time] } : sql).then(resp => {
             const vdata = resp.variables.data || []
             if (vdata.length > 0) {
               objArr1 = {}