jiangping
2024-08-21 dd033b96c11cb484a6b7b99381b9b7bc820307de
最新版本
已添加2个文件
已修改15个文件
941 ■■■■■ 文件已修改
admin/src/api/business/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/system/common.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaPlatformApproveTemplWindow.vue 708 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/RichEditor.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/system/dict/DictDataManagerWindow.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/system/dict/OperaDictDataWindow.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/platformReason.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/set/application.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/Constants.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/index.js
@@ -11,4 +11,7 @@
export function approveTemplByType (type) {
  return request.get(`/visitsAdmin/cloudService/business/approveTempl/${type}`)
}
export function approveTemplById (id) {
  return request.get(`/visitsAdmin/cloudService/business/approveTempl/findById/${id}`)
}
export const uploadUrl = 'visitsAdmin/cloudService/public/upload'
admin/src/api/system/common.js
@@ -41,6 +41,15 @@
export function updateVisitConfig (data) {
  return request.post('/visitsAdmin/cloudService/system/dictData/updateVisitConfig', data)
}
// æœˆå°åŸºç¡€è®¾ç½®é…ç½®
export function getPlatformConfigDTO () {
  return request.get('/visitsAdmin/cloudService/system/dictData/getPlatformConfigDTO')
}
// æœˆå°åŸºç¡€è®¾ç½®é…ç½®ä¿®æ”¹
export function updatePlatformConfig (data) {
  return request.post('/visitsAdmin/cloudService/system/dictData/updatePlatformConfig', data)
}
// ä¿®æ”¹åŠ³åŠ¡æ¥è®¿é…ç½®
export function updateLaborConfigDTO (data) {
admin/src/components/business/OperaPlatformApproveTemplWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,708 @@
<template>
  <GlobalWindow
      :title="title"
      width="100%"
      :visible.sync="visible"
      :confirm-working="isWorking"
      @confirm="confirm"
  >
    <TableLayout>
      <template v-slot:table-wrap>
        <div class="config">
          <div class="config_list">
            <div class="config_list_head">
              <span>配置流程</span>
            </div>
            <div class="config_content">
              <div class="item">
                <div class="head">发起人</div>
                <div class="content">物流司机</div>
              </div>
              <div class="arrows">
                <div class="line"></div>
                <img src="@/assets/images/peizhi_ar@2x.png" alt="" />
              </div>
              <div v-for="(item, index) in apprList" :key="index">
                <div
                    class="item yellow"
                    :class="{
                  active: activeIndex == index,
                  blue: item.type == '1',
                }"
                    @click="flowClick(index)"
                >
                  <div class="head">{{ item.remark }}</div>
                  <div class="content">
                    <!-- å®¡æ‰¹ -->
                    <template v-if="item.type == 0">
                      <template v-if="item.memberType == '2'">
                        <div>部门主管</div>
                      </template>
                      <template v-if="item.memberType == '1'">
                        <div v-if="item.objIds && item.objIds.length === 1">
                        <span
                        >{{ item.objIds[0].name }}
                          {{ item.objIds[0].companyName }}</span
                        >
                          <span v-if="item.approveType == 0 && item.type == '0'">
                          æˆ–ç­¾</span
                          >
                          <span v-if="item.approveType == 1 && item.type == '0'">
                          ä¼šç­¾</span
                          >
                        </div>
                        <div v-else-if="item.objIds && item.objIds.length > 1">
                          <span>{{ item.objIds[0].name }} ç­‰</span>
                          <span v-if="item.approveType == 0 && item.type == '0'">
                          æˆ–ç­¾</span
                          >
                          <span v-if="item.approveType == 1 && item.type == '0'">
                          ä¼šç­¾</span
                          >
                        </div>
                        <div v-else>请选择</div>
                        <i class="el-icon-arrow-right"></i>
                      </template>
                    </template>
                    <!-- æŠ„送 -->
                    <template v-if="item.type == 1">
                      <div v-if="item.objIds && item.objIds.length === 1">
                        <span
                        >{{ item.objIds[0].name }}
                          {{ item.objIds[0].companyName }}</span
                        >
                      </div>
                      <div v-else-if="item.objIds && item.objIds.length > 1">
                        <span>{{ item.objIds[0].name }} ç­‰</span>
                      </div>
                      <div v-else>请选择</div>
                      <i
                          v-if="item.memberType == '1'"
                          class="el-icon-arrow-right"
                      ></i>
                    </template>
                  </div>
                </div>
                <div class="arrows">
                  <template v-if="apprList.length - 1 !== index">
                    <div class="line"></div>
                    <img src="@/assets/images/peizhi_ar@2x.png" alt="" />
                  </template>
                  <i
                      v-if="apprList.length - 2 === index"
                      @click="handleAddAppr()"
                      class="el-icon-circle-plus add"
                  ></i>
                </div>
              </div>
            </div>
          </div>
          <div class="config_data">
            <div class="config_data_item">
              <div class="config_data_item_label">选择该节点的审批人</div>
              <div class="df_ac mb10">
                <div>审批节点名称</div>
                <el-input
                    class="w200 ml10"
                    v-model="apprList[activeIndex].remark"
                ></el-input>
              </div>
              <!-- æŠ„送人 -->
              <template v-if="apprList[activeIndex].type == '1'">
                <div class="config_data_item_reviewed_content">
                  <div
                      v-for="mem in apprList[activeIndex].objIds"
                      :key="mem.id"
                      class="config_data_item_reviewed_content_item"
                  >
                    <span>{{ mem.name }}</span>
                    <i class="el-icon-close"></i>
                  </div>
                  <span class="add" @click="selStaff">+添加</span>
                </div>
              </template>
              <el-radio-group
                  v-if="apprList[activeIndex].type == '0'"
                  v-model="apprList[activeIndex].memberType"
              >
<!--                <el-radio :label="0">申请人</el-radio>-->
                <el-radio :label="1">指定人员</el-radio>
                <el-radio :label="2">部门主管</el-radio>
              </el-radio-group>
              <div
                  class="config_data_item_reviewed"
                  v-if="apprList[activeIndex].memberType == 1"
              >
                <div class="config_data_item_reviewed_label">
                  <span>指定审核人</span>
                  <span>不超过20人</span>
                </div>
                <div class="config_data_item_reviewed_content">
                  <div
                      v-for="(mem, memIndex) in apprList[activeIndex].objIds"
                      :key="mem.id"
                      class="config_data_item_reviewed_content_item"
                  >
                    <span>{{ mem.name }}</span>
                    <i class="el-icon-close" @click="memDel(memIndex)"></i>
                  </div>
                  <span class="add" @click="selStaff">+添加</span>
                </div>
              </div>
              <div
                  class="config_data_item_reviewed"
                  v-if="apprList[activeIndex].memberType == 2"
              >
                <div class="config_data_item_reviewed_label">
                  <span>部门主管</span>
                </div>
                <div class="config_data_item_reviewed_r">
                  <span>申请人的</span>
                  <el-select
                      v-model="apprList[activeIndex].objLevel"
                      placeholder="请选择"
                      style="margin: 0 20px 0 10px"
                  >
                    <el-option label="直接主管" :value="0" />
                    <el-option label="二级主管" :value="1" />
                    <el-option label="三级主管" :value="2" />
                    <el-option label="四级主管" :value="4" />
                  </el-select>
                  <el-checkbox
                      v-model="apprList[activeIndex].noleaderOpt"
                      :true-label="1"
                      :false-label="0"
                  >找不到主管时,由上级主管代审核</el-checkbox>
                </div>
              </div>
            </div>
            <div
                class="config_data_item"
                v-if="
              (apprList[activeIndex].memberType == 1 ||
                apprList[activeIndex].memberType == 2) &&
              apprList[activeIndex].type == '0'
            "
            >
              <div class="config_data_item_label">
                å®¡æ‰¹æ–¹å¼
                <span>审批人为多个时,采用的审批方式</span>
              </div>
              <el-radio-group
                  v-model="apprList[activeIndex].approveType"
                  style="display: flex; flex-direction: column"
              >
                <el-radio :label="0" style="margin-bottom: 20px"
                >或签(其中一名审批人同意或拒绝即可)</el-radio
                >
                <el-radio :label="1">会签(所有审批人都同意才可通过)</el-radio>
              </el-radio-group>
            </div>
            <div class="config_data_submit">
              <el-button
                  @click="onSubmit"
                  :loading="subLoading"
                  style="background: #435ebe"
                  type="primary"
              >保存配置项</el-button
              >
              <el-button
                  v-if="activeIndex !== 0 && activeIndex !== apprList.length - 1"
                  type="danger"
                  plain
                  @click="handleDel"
              >删除节点</el-button
              >
            </div>
          </div>
        </div>
      </template>
      <!--  -->
      <el-dialog title="选择员工" :visible.sync="isShowTransfer" width="1000px" style="z-index: 99999" append-to-body>
        <div class="staff_modal">
          <div class="left">
            <div
                style="
              width: 100%;
              height: 50px;
              background: rgba(242, 242, 242, 1);
              line-height: 50px;
              text-align: center;
              font-size: 14px;
            "
            >
              ä¼ä¸šç»„织架构
            </div>
            <div style="width: 100%; height: 100%; overflow-y: scroll">
              <Tree
                  :list="companyTree"
                  :defaultProps="{
                name: 'name',
                status: 'fsStatus',
                children: 'childList',
                id: 'id',
              }"
                  @callback="callback"
              />
            </div>
          </div>
          <el-transfer
              filterable
              :title="['未选', '已选']"
              openAll
              :props="{ label: 'name', key: 'keyTemp' }"
              filter-placeholder="搜索员工"
              v-model="searchForm.objIds"
              :data="memberList"
              class="transfer"
          >
          </el-transfer>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button @click="isShowTransfer = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="TransferSub">ç¡® å®š</el-button>
      </span>
      </el-dialog>
    </TableLayout>
    <span slot="footer" class="dialog-footer">
        <el-button @click="visible= false">返回</el-button>
      </span>
  </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import TableLayout from '@/layouts/TableLayout'
import Tree from '@/components/common/Tree'
import {approveTemplSave, approveTemplById} from '@/api'
import { fetchList } from '@/api/business/company'
import { fetchList as memberListPost } from '@/api/business/member'
import GlobalWindow from '@/components/common/GlobalWindow'
export default {
  name: 'OperaPlatformReasonWindow',
  extends: BaseOpera,
  components: { Tree, GlobalWindow, TableLayout },
  data () {
    return {
      model:{},
      reasonId: null,
      activeType: '6',
      subLoading: false,
      apprList: [
        { remark: '审批人', active: false,memberType:1, type: '1', objIds: [] },
        { remark: '抄送人', active: false, type: '1', objIds: [] }
      ],
      activeIndex: 0,
      param: {},
      searchForm: {},
      isShowTransfer: false,
      memberList: [],
      companyTree: []
    }
  },
  created () {
  },
  methods: {
    open (title, row) {
      this.title = title + '【' + row.reason + '】'
      this.visible = true
      this.reasonId = row.id
      this.model = row
      this.getfindCompanyTreePage()
      this.apprList = [
        { remark: '审批人', active: false, type: '0',memberType:1, objIds: [] },
        { remark: '抄送人', active: false, type: '1', objIds: [] }
      ]
      this.param = {}
      this.searchForm = {}
      this.isShowTransfer = false
      this.memberList = []
      this.companyTree = []
      this.initDate()
    },
    flowClick (i) {
      this.activeIndex = i
      this.apprList.forEach((item, index) => {
        if (i === index) {
          item.active = true
          if (item.objIds && item.objIds.length > 0) {
            const objIds = item.objIds.map(i => {
              return `${i.id}-${i.name}${i.companyName ? '-' + i.companyName : ''}`
            })
            this.$set(this.searchForm, 'objIds', objIds)
          } else {
            this.$set(this.searchForm, 'objIds', [])
          }
        } else {
          item.active = false
        }
      })
    },
    initDate () {
      if(this.model.approveTemplId){
        approveTemplById(this.model.approveTemplId).then(res => {
          if (res && res.paramList) {
            const arr = res.paramList || []
            arr.forEach(item => {
              if (item.memberList && item.memberList.length > 0) {
                item.objIds = item.memberList.map(i => {
                  return {
                    id: i.id,
                    name: i.name,
                    companyName: i.companyName
                  }
                })
              }
            })
            this.apprList = arr
            this.flowClick(0)
            this.$forceUpdate()
          }
          // console.log(res);
        })
      }
    },
    onSubmit () {
      const { apprList, activeType } = this
      const temp = JSON.parse(JSON.stringify(apprList))
      temp.forEach((item, index) => {
        item.level = index + 1
        if (item.objIds && item.objIds.length > 0) {
          item.objIds = item.objIds.map(i => i.id).join(',')
        } else {
          item.objIds = ''
        }
      })
      this.subLoading = true
      approveTemplSave({
        type: activeType,
        reasonId:this.model.id,
        paramList: temp
      }).then(res => {
        this.subLoading = false
        this.$emit('success')
        this.$tip.success('保存成功')
      }, () => {
        this.subLoading = false
      })
    },
    handleDel () {
      const { activeIndex } = this
      this.apprList.splice(activeIndex, 1)
      this.activeIndex = 0
    },
    handleAddAppr () {
      this.apprList.splice(this.apprList.length - 1, 0, { remark: '审批人', active: false,memberType:1, type: 0, objIds: [] })
      // this.apprList.push({ remark: '审批人', active: false, type: '0' })
    },
    // èŽ·å–ç»„ç»‡æ ‘
    getfindCompanyTreePage () {
      fetchList()
        .then(res => {
          if (res && res.length > 0) {
            res[0].fsStatus = 1
            this.companyTree = res
            // // this.searchForm.erpOrgId = res[0].erpId
            // this.search()
            // this.department = this.getDepartmentTree(res)
          }
        })
    },
    getMemberList () {
      memberListPost({
        model: {
          companyId: this.searchForm.companyId || '',
          canVisit: '',
          companyType: 1,
          erpOrgId: '',
          hasFace: '',
          hkStatus: '',
          includeChild: false,
          type: 2
        },
        page: 1,
        capacity: 30
      }).then(res => {
        this.memberList = res.records || []
        this.memberList.forEach(item => {
          item.keyTemp = item.id + '-' + item.name + '-' + item.companyName || ''
        })
        // console.log('defaultProps', res)
      })
    },
    callback (row) {
      console.log(row)
      this.$set(this.searchForm, 'companyId', row.id)
      this.$set(this.searchForm, 'erpOrgId', row.erpId)
      this.getMemberList()
    },
    TransferSub () {
      const { activeIndex } = this
      if (this.searchForm.objIds && this.searchForm.objIds.length > 0) {
        if (this.searchForm.objIds.length > 20) return this.$message.warning('最多选择20人')
        const arr = this.searchForm.objIds.map(ii => {
          const obj = ii.split('-')
          return {
            id: Number(obj[0]),
            name: obj[1],
            companyName: obj[2] || ''
          }
        })
        this.apprList.forEach((item, index) => {
          if (activeIndex === index) {
            item.objIds = arr
          }
        })
      }
      this.isShowTransfer = false
      console.log(this.searchForm.objIds)
    },
    memDel (memIndex) {
      const { activeIndex } = this
      this.apprList.forEach((item, index) => {
        if (activeIndex === index) {
          item.objIds.splice(memIndex, 1)
          const objIds = item.objIds.map(i => {
            return i.id + '-' + i.name
          })
          this.$set(this.searchForm, 'objIds', objIds)
        }
      })
    },
    selStaff () {
      this.isShowTransfer = true
      this.getMemberList()
    },
    seleItem (i) {
      this.list.forEach((item, index) => {
        item.active = index === i
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.labelTip{
  font-size: 12px;
  color: #666666;
}
.config {
 width: 100%;
 padding-bottom: 20px;
 box-sizing: border-box;
 height: calc(100vh - 140px);
 display: flex;
 align-items: center;
 justify-content: space-between;
.config_list {
  width: 543px;
  height: 100%;
  flex-shrink: 0;
  border-radius: 2px;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid #eeeeee;
  background: #f7f7f7;
.config_list_head {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
span {
  font-size: 18px;
  font-weight: 500;
  color: #222222;
}
}
.config_content {
  width: 100%;
  height: calc(100% - 40px);
  padding-top: 45px;
  box-sizing: border-box;
  overflow-y: scroll;
  display: flex;
  align-items: center;
  flex-direction: column;
&::-webkit-scrollbar {
   width: 0;
 }
.active {
  border: 2px solid #4456ac !important;
}
.yellow {
  background: #e89e42 !important;
}
.blue {
  background: #5094f3 !important;
}
.arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
.line {
  width: 1px;
  height: 60px;
  background-color: #ccc;
}
.add {
  font-size: 40px;
  color: #2080f7;
  position: absolute;
  cursor: pointer;
  z-index: 999;
  top: 10px;
}
img {
  width: 12px;
}
}
.item {
  width: 200px;
  cursor: pointer;
  border: 2px solid #f7f7f7;
  height: 80px;
  background: #4456ac;
  border-radius: 2px;
  position: relative;
  display: flex;
  flex-direction: column;
.head {
  height: 32px;
  line-height: 32px;
  padding: 2px 12px;
  color: #fff;
}
.content {
  flex: 1;
  background-color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  justify-content: space-between;
}
&:last-child {
   margin: 0 !important;
 }
}
}
}
.config_data {
  flex: 1;
  height: 100%;
  margin-left: 20px;
.config_data_submit {
  margin-top: 50px;
}
.config_data_item {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
&:last-child {
   margin: 0 !important;
 }
.config_data_item_label {
  font-size: 16px;
  font-weight: 500;
  color: #222222;
  margin-bottom: 20px;
span {
  font-size: 12px;
  font-weight: 400;
  color: #999999;
  margin-left: 10px;
}
}
.config_data_item_reviewed {
  width: 100%;
  margin-top: 20px;
.config_data_item_reviewed_r {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
span {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}
}
.config_data_item_reviewed_label {
  display: flex;
  align-items: center;
span {
&:nth-child(1) {
   font-size: 14px;
   font-weight: 400;
   color: #222222;
 }
&:nth-child(2) {
   font-size: 12px;
   font-weight: 400;
   color: #999999;
   margin-left: 8px;
 }
}
}
}
}
}
}
.config_data_item_reviewed_content {
  width: 400px;
  margin-top: 10px;
  height: 110px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 2px;
  border: 1px solid #dfe2e8;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
.add {
  font-size: 12px;
  font-weight: 400;
  color: #435ebe;
  cursor: pointer;
  margin-top: 3px;
}
.config_data_item_reviewed_content_item {
  padding: 3px 5px;
  background: #f4f7fc;
  border-radius: 2px;
  box-sizing: border-box;
  margin-right: 10px;
  margin-bottom: 10px;
span {
  font-size: 12px;
  font-weight: 400;
  color: #333333;
}
i {
  color: #949ba2;
  margin-left: 10px;
  cursor: pointer;
}
}
}
.staff_modal {
  display: flex;
.left {
  width: 300px;
  margin-right: 20px;
}
.transfer {
  height: 600px;
::v-deep .el-transfer-panel__body {
  height: 500px;
}
::v-deep .el-transfer-panel__list.is-filterable {
  height: 480px;
}
}
}
</style>
admin/src/components/common/RichEditor.vue
@@ -85,7 +85,7 @@
            ] // ä¸‹çº§èœå• key ï¼Œå¿…å¡«
          },*/
          // ä¸Šä¼ å›¾ç‰‡åˆ†ç»„
         /* {
          {
            key: 'img-style', // å¿…填,要以 group å¼€å¤´
            title: '图片', // å¿…å¡«
            // iconSvg: '<svg>....</svg>', // å¯é€‰
@@ -98,9 +98,9 @@
              "imageWidth50", // å›¾ç‰‡å®½åº¦ç›¸å¯¹äºŽç¼–辑器宽度的百分比50
              "imageWidth100", // å›¾ç‰‡å®½åº¦ç›¸å¯¹äºŽç¼–辑器宽度的百分比100
            ] // ä¸‹çº§èœå• key ï¼Œå¿…å¡«
          },*/
          },
          // è§†é¢‘分组
         /* {
          {
            key: 'video-style', // å¿…填,要以 group å¼€å¤´
            title: '视频', // å¿…å¡«
            // iconSvg: '<svg>....</svg>', // å¯é€‰
@@ -109,7 +109,7 @@
              "uploadVideo", // ä¸Šä¼ è§†é¢‘
              "editVideoSize", // ä¿®æ”¹è§†é¢‘尺寸
            ] // ä¸‹çº§èœå• key ï¼Œå¿…å¡«
          },*/
          },
          "fullScreen", // å…¨å±
        ],
        excludeKeys: [ // éšè—æŒ‡å®šçš„菜单项
@@ -128,7 +128,7 @@
        MENU_CONF: {
          // å›¾ç‰‡ä¸Šä¼ 
          uploadImage: {
            server: process.env.VUE_APP_BASE_API + "/common/upload",
            server: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload?folder=richeditor',
            fieldName: 'file',
            // å•个文件的最大体积限制,默认为 2M
            maxFileSize: 10 * 1024 * 1024, // 10M
@@ -177,7 +177,7 @@
                //     message: `${res.data.originalName} ä¸Šä¼ å¤±è´¥ï¼Œè¯·é‡æ–°å°è¯•`
                // });
              }
              insertFn(res.url, res.originalFilename, res.newFileName);
              insertFn(res.data.url, res.data.originname, res.data.imgname);
            },
            // å•个文件上传成功之后
@@ -201,7 +201,7 @@
          // è§†é¢‘上传
          uploadVideo: {
            fieldName: 'file',
            server: process.env.VUE_APP_BASE_API + "/common/upload",
            server: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=richeditor',
            // å•个文件的最大体积限制,默认为 10M
            maxFileSize: 50 * 1024 * 1024, // 50M
            // æœ€å¤šå¯ä¸Šä¼ å‡ ä¸ªæ–‡ä»¶ï¼Œé»˜è®¤ä¸º 5
@@ -243,7 +243,7 @@
                //     message: `${res.data.originalName} ä¸Šä¼ å¤±è´¥ï¼Œè¯·é‡æ–°å°è¯•`
                // });
              }
              insertFn(res.data.link, res.data.link);
              insertFn(res.data.url, res.data.url);
            },
            // ä¸Šä¼ è¿›åº¦çš„回调函数
            onProgress(progress) {
admin/src/components/system/dict/DictDataManagerWindow.vue
@@ -37,6 +37,7 @@
          <el-table-column prop="updateUser" label="更新人" min-width="100px">
            <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template>
          </el-table-column>
          <el-table-column prop="remark" label="说明" min-width="100px"></el-table-column>
          <el-table-column prop="createTime" label="创建时间" min-width="100px"></el-table-column>
          <el-table-column prop="updateTime" label="更新时间" min-width="100px"></el-table-column>
          <el-table-column
admin/src/components/system/dict/OperaDictDataWindow.vue
@@ -6,6 +6,9 @@
      @confirm="confirm"
  >
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="数据说明" prop="label" required>
        <el-input v-model="form.remark" placeholder="请输入数据说明" v-trim maxlength="50"/>
      </el-form-item>
      <el-form-item label="数据标签" prop="label" required>
        <el-input v-model="form.label" placeholder="请输入数据标签" v-trim maxlength="50"/>
      </el-form-item>
@@ -43,7 +46,8 @@
        code: '',
        label: '',
        disabled: false,
        istext: false
        istext: false,
        remark:''
      },
      // éªŒè¯è§„则
      rules: {
admin/src/views/platform/platformReason.vue
@@ -60,7 +60,7 @@
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('编辑月台入园原因', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">审批流</el-button>
            <el-button type="text" @click="$refs.OperaPlatformApproveTemplWindow.open('月台入园原因审批流', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">审批流</el-button>
            <el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('编辑月台入园原因', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:platformreason:delete']">删除</el-button>
          </template>
@@ -75,6 +75,7 @@
    </template>
    <!-- æ–°å»º/修改 -->
    <OperaPlatformReasonWindow ref="OperaPlatformReasonWindow" @success="handlePageChange"/>
    <OperaPlatformApproveTemplWindow ref="OperaPlatformApproveTemplWindow" @success="handlePageChange"/>
  </TableLayout>
</template>
@@ -84,11 +85,12 @@
import SearchFormCollapse from '@/components/common/SearchFormCollapse'
import Pagination from '@/components/common/Pagination'
import OperaPlatformReasonWindow from '@/components/business/OperaPlatformReasonWindow'
import OperaPlatformApproveTemplWindow from '@/components/business/OperaPlatformApproveTemplWindow'
import { allList } from '@/api/platform/platformGroup'
export default {
  name: 'Platform',
  extends: BaseTable,
  components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformReasonWindow },
  components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformReasonWindow, OperaPlatformApproveTemplWindow },
  data () {
    return {
      groupList: [],
admin/src/views/platform/set/application.vue
@@ -1,7 +1,7 @@
<template>
    <div class="main_app">
    <el-form
      :model="param"
      :model="form"
      :rules="rules"
      label-suffix=":"
      ref="ruleForm"
@@ -11,19 +11,19 @@
        <el-select v-model="param.aa" class="w400" placeholder="请选择,多选">
          <el-option></el-option>
        </el-select>
      </el-form-item> -->
      </el-form-item>
      <el-form-item label="市公司日作业量">
        <el-input v-model="param.bbb" class="w400" placeholder="请输入"></el-input>
        <span>万支</span>
      </el-form-item>-->
      <el-form-item label="物流车预约指南" required label-width="180px">
        <RichEditor  :richData="form.bookTips" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/>
      </el-form-item>
      <el-form-item label="物流车预约指南">
        <RichEditor v-model="param.context" style="width: 900px" :default="param.context" />
      </el-form-item>
      <el-form-item label="物流车园区导览图">
        <RichEditor v-model="param.context" style="width: 900px" placeholder="请输入内容" :default="param.context" />
      <el-form-item label="物流车园区导览图" required  label-width="180px">
        <RichEditor  :richData="form.tipsImg" :styleEditor="styleEditor" @getWangedditor="getWangedditor1" :readonly="false"/>
      </el-form-item>
      <el-form-item>
          <el-button type="primary">保存配置项</el-button>
          <el-button type="primary" @click="submit">保存配置项</el-button>
      </el-form-item>
    </el-form>
@@ -32,17 +32,48 @@
<script>
import RichEditor from '@/components/common/RichEditor'
import { getPlatformConfigDTO, updatePlatformConfig } from '@/api/system/common'
export default {
  components: {
    RichEditor: RichEditor
  },
  data () {
    return {
      param: {
        context: 'qqq'
      styleEditor:'border: 1px solid #ccc;display: inline-block;',
      form: {
        bookTips: '',
        tipsImg: ''
      },
      rules: {}
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getWangedditor(val){
      this.form.bookTips =val
    },
    getWangedditor1(val){
      this.form.tipsImg =val
    },
    getData: function () {
      getPlatformConfigDTO({})
        .then(res => {
          this.form.tipsImg = res.tipsImg
          this.form.bookTips = res.bookTips
        })
    },
    submit () {
      updatePlatformConfig({
        tipsImg: this.form.tipsImg,
        bookTips: this.form.bookTips
      }).then(res => {
        this.$message.success('保存成功')
        this.getData()
      })
    }
  }
}
</script>
server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
@@ -9,6 +9,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDictData;
@@ -121,4 +122,25 @@
        systemDictDataService.updateVisitConfig(visitConfigDTO);
        return ApiResponse.success(null);
    };
    /**
     * è®¿å®¢æ¥è®¿é…ç½®
     * @return
     */
    @ApiOperation(value = "访客来访配置" )
    @GetMapping("/getPlatformConfigDTO")
    public ApiResponse<PlatformConfigDTO> getPlatformConfigDTO(){
        return ApiResponse.success(systemDictDataService.getPlatformConfigDTO());
    };
    /**
     * ä¿®æ”¹è®¿å®¢æ¥è®¿é…ç½®
     * @param visitConfigDTO
     */
    @ApiOperation(value = "修改访客来访配置" )
    @PostMapping("/updatePlatformConfig")
    public ApiResponse updatePlatformConfig(@RequestBody PlatformConfigDTO visitConfigDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
        visitConfigDTO.setLoginUserInfo(this.getLoginUser(token));
        systemDictDataService.updatePlatformConfig(visitConfigDTO);
        return ApiResponse.success(null);
    };
}
server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -112,6 +112,8 @@
    public static final String LOG_DEL_DAYS_LIMIT ="LOG_DEL_DAYS_LIMIT" ;
    public static final String HK_LOG_DEL_DAYS_LIMIT ="HK_LOG_DEL_DAYS_LIMIT" ;
    public static final String HK_NGINX_URL = "HK_NGINX_URL";
    public static final String PLATFORM_BOOKING_TIPS = "PLATFORM_BOOKING_TIPS";
    public static final String PLATFORM_GUIDEMAP = "PLATFORM_GUIDEMAP";
    public static  boolean DEALING_HK_SYNCPRIVILEGE= false;
    public static  boolean DEALING_HK_SYNCDEVICE = false;
    public static  boolean DEALING_HK_SYNCPLATFORM = false;
@@ -801,6 +803,7 @@
        IN_CITY_CAR_USE(3, "公车市内用车 ", "公车市内用车 "),
        OUT_CITY_CAR_USE(4, "公车室外用车 ", "公车室外用车 "),
        CITY_WLC_BOOK(5, "市公司物流车预约 ", "5市公司物流车预约 "),
        PLATFROM_REASON(6, "月台入园原因审批 ", "月台入园原因审批 "),
        ;
        // æˆå‘˜å˜é‡
        private String name;
server/system_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.dao.system.dto;
import com.doumee.core.model.LoginUserModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author T14
 */
@Data
@ApiModel("月台基础置")
public class PlatformConfigDTO extends LoginUserModel {
    @ApiModelProperty(value = "物流车预约指南")
    private String  bookTips;
    @ApiModelProperty(value = "物流车园区导览图")
    private String  tipsImg;
}
server/system_service/src/main/java/com/doumee/service/system/SystemDictDataService.java
@@ -2,6 +2,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDictData;
@@ -117,4 +118,8 @@
     * @param miniProgrammeDTO
     */
    void updateVisitConfig(VisitConfigDTO miniProgrammeDTO);
    PlatformConfigDTO getPlatformConfigDTO();
    void updatePlatformConfig(PlatformConfigDTO visitConfigDTO);
}
server/system_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -10,6 +10,7 @@
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.SystemDictDataMapper;
import com.doumee.dao.system.SystemDictMapper;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.dto.VisitConfigDTO;
import com.doumee.dao.system.model.SystemDict;
@@ -173,6 +174,55 @@
        }
        return "";
    }
    @Override
    public PlatformConfigDTO getPlatformConfigDTO(){
        PlatformConfigDTO visitConfigDTO = new PlatformConfigDTO();
        SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM));
        if(Objects.isNull(systemDict)){
            throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"字典类不存在");
        }
        List<SystemDictData> systemDictList = systemDictDataMapper.selectList(
                new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId()));
        if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){
            throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"字典不存在");
        }
        visitConfigDTO.setBookTips( setDataByLabel(systemDictList,Constants.PLATFORM_BOOKING_TIPS));
        visitConfigDTO.setTipsImg( setDataByLabel(systemDictList,Constants.PLATFORM_GUIDEMAP));
        return visitConfigDTO;
    }
    @Override
    @Transactional
    public void updatePlatformConfig(PlatformConfigDTO visitConfigDTO) {
        if(Objects.isNull(visitConfigDTO)
                && Objects.isNull(visitConfigDTO.getBookTips())
                && Objects.isNull(visitConfigDTO.getTipsImg())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(loginUserInfo == null){
            loginUserInfo = visitConfigDTO.getLoginUserInfo();
        }
        SystemDict systemDict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda().eq(SystemDict::getCode,Constants.PLATFORM));
        if(Objects.isNull(systemDict)){
            systemDict = new SystemDict();
            systemDict.setCreateUser(loginUserInfo.getId());
            systemDict.setCreateTime(new Date());
            systemDict.setUpdateUser(systemDict.getCreateUser());
            systemDict.setUpdateTime(systemDict.getCreateTime());
            systemDict.setCode(Constants.PLATFORM);
            systemDict.setRemark("月台相关配置");
            systemDict.setDeleted(Boolean.FALSE);
            systemDictMapper.insert(systemDict);
        }
        List<SystemDictData> systemDictList = systemDictDataMapper.selectList(
                new QueryWrapper<SystemDictData>().lambda().eq(SystemDictData::getDictId,systemDict.getId()));
        if(!com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictList)){
            throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"字典不存在");
        }
        dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_GUIDEMAP,"物流车园区导览图",loginUserInfo, visitConfigDTO.getTipsImg()==null?"":visitConfigDTO.getTipsImg().toString());
        dealDictData(systemDictList,systemDict.getId(),Constants.PLATFORM_BOOKING_TIPS,"物流车预约指南",loginUserInfo, visitConfigDTO.getBookTips()==null?"":visitConfigDTO.getBookTips().toString());
    }
    @Override
    @Transactional
server/system_service/src/main/resources/mappers/SystemDictDataMapper.xml
@@ -16,7 +16,7 @@
  </resultMap>
  <select id="selectManageList" parameterType="com.doumee.dao.system.dto.QuerySystemDictDataDTO" resultMap="SystemDictDataListVO">
    SELECT
      dict_data.`ID`, dict_data.`DICT_ID`, dict_data.`CODE`, dict_data.`LABEL`, dict_data.`SORT`, dict_data.`DISABLED`, dict_data.`CREATE_TIME`, dict_data.`UPDATE_TIME`, dict_data.`CREATE_USER`, dict_data.`UPDATE_USER`,
    dict_data.`ID`, dict_data.`remark`, dict_data.`DICT_ID`, dict_data.`CODE`, dict_data.`LABEL`, dict_data.`SORT`, dict_data.`DISABLED`, dict_data.`CREATE_TIME`, dict_data.`UPDATE_TIME`, dict_data.`CREATE_USER`, dict_data.`UPDATE_USER`,
      create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME,
      update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME
    FROM SYSTEM_DICT_DATA dict_data
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/ApproveTemplCloudController.java
@@ -95,6 +95,15 @@
        templ.setType(type);
        return ApiResponse.success(approveTemplService.findOne(templ));
    }
    @ApiOperation("根据reasonId查询")
    @GetMapping("/findById/{id}")
    @CloudRequiredPermission("business:approvetempl:query")
    public ApiResponse<ApproveTempl> findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){
        ApproveTempl templ =new ApproveTempl();
        templ.setIsdeleted(Constants.ZERO);
        templ.setId(id);
        return ApiResponse.success(approveTemplService.findOne(templ));
    }
//    @ApiOperation("根据ID查询")
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/ApproveTempl.java
@@ -67,5 +67,8 @@
    @ApiModelProperty(value = "审批模版配置明细集合")
    @TableField(exist = false)
    private List<ApproveParam> paramList;
    @ApiModelProperty(value = "月台入园区原因编码")
    @TableField(exist = false)
    private Integer reasonId;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveTemplServiceImpl.java
@@ -9,6 +9,7 @@
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.ApproveParamMapper;
import com.doumee.dao.business.ApproveTemplMapper;
import com.doumee.dao.business.PlatformReasonMapper;
import com.doumee.dao.business.join.MemberJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.service.business.ApproveTemplService;
@@ -41,6 +42,8 @@
    private ApproveParamMapper approveParamMapper;
    @Autowired
    private MemberJoinMapper memberJoinMapper;
    @Autowired
    private PlatformReasonMapper platformReasonMapper;
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
@@ -52,9 +55,21 @@
        if(model.getType() == null || Constants.ApproveTmplType.getName(model.getType()) == null){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        PlatformReason reason = null;
        if(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey())){
            if(model.getReasonId() ==null){
                throw new BusinessException(ResponseStatus.BAD_REQUEST);
            }
            reason = platformReasonMapper.selectById(model.getReasonId());
            if(reason ==null){
                throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,入园原因信息不存在,请返回刷新页面重试!");
            }
        }
        ApproveTempl template = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda()
                .eq(ApproveTempl::getType,model.getType() )
                .eq(ApproveTempl::getIsdeleted,Constants.ZERO)
                //如果是入园原因配置,根据ID查询对应的模版信息
                .eq(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey()),ApproveTempl::getId,model.getReasonId())
                .last("limit 1"));
        Date date =new Date();
        if(template == null){
@@ -73,6 +88,7 @@
        if(model.getParamList()!=null && model.getParamList().size()>0){
            for(ApproveParam param : model.getParamList()){
                param.setCreateDate(date);
                param.setId(null);
                param.setCreator(loginUserInfo.getId());
                param.setEditDate(date);
                param.setEditor(loginUserInfo.getId());
@@ -92,6 +108,14 @@
            //批量插入新的配置
            approveParamMapper.insert(model.getParamList());
        }
        if(Constants.equalsInteger(model.getType(),Constants.ApproveTmplType.PLATFROM_REASON.getKey())){
            PlatformReason r = new PlatformReason();
            r.setApproveTemplId(template.getId());
            r.setId(model.getReasonId());
            r.setEditor(template.getEditor());
            r.setEditDate(new Date());
            platformReasonMapper.updateById(r);
        }
        return 1;
    }