Browse Source

添加外部系统流转

preview
13176889840 5 years ago
parent
commit
b572eecdff
  1. 6
      epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
  2. 564
      epmet-oper-web/src/views/modules/customer/customize/MostList.vue
  3. 176
      epmet-oper-web/src/views/modules/customer/customize/editSys.vue

6
epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue

@ -87,7 +87,7 @@
:tableKeywork="'FootBarCustomize'"
@cancleBack="cancleBack"></footbar-list>
</div>
<div v-show="showType==='mostedit'">
<div v-if="showType==='mostedit'">
<most-list ref="ref_mostlist" @cancleBack="cancleBack"></most-list>
</div>
@ -214,7 +214,9 @@ export default {
showMost (customerId, customerName) {
this.showType = 'mostedit'
console.log('ref_mostlist', this.$refs['ref_mostlist'])
this.$refs['ref_mostlist'].initData(customerId, customerName)
this.$nextTick(() => {
this.$refs['ref_mostlist'].initData(customerId, customerName)
})
},
//
showLimitConfig (customerId, customerName) {

564
epmet-oper-web/src/views/modules/customer/customize/MostList.vue

@ -1,128 +1,192 @@
<template>
<div class="m-body">
<!-- 项目滞留超期提醒 -->
<!-- 项目外部系统流转设置-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
项目滞留超期提醒
</div>
<div class="line">项目外部系统流转设置</div>
</div>
<div class="h-right">
<button class="h-right-two" @click="saveSys">保存设置</button>
<button class="h-right-one" @click="resetSys">恢复默认</button>
<el-button class="diaCancel" @click="diaCancel()">取消返回</el-button>
</div>
</el-tag>
<div class="mh-child">
<el-tag class="set-overtime">项目外部系统流转</el-tag>
<el-switch
v-model="sendProjectSwitch"
active-text="开启"
inactive-text="关闭"
element
style="width: 200px"
>
</el-switch>
</div>
<div v-if="selectSys.length > 0" class="mh-child" style="display: flex;">
<el-tag class="set-overtime">已选外部系统</el-tag>
<div class="sys-list">
<div v-for="(item, index) in selectSys" :key="item.platformId" class="sys-list-item">
<img :src="item.icon" />
<span>{{ item.platformName }}</span>
<el-button type="text" size="small" @click="handleEditSys(item)">编辑</el-button>
<el-button type="text" style="color: red;" size="small" @click="handleSysDel(item, index)" >删除</el-button>
</div>
</div>
</div>
<div class="mh-child">
<el-tag class="set-overtime">外部系统</el-tag>
<el-select v-model="sysOptions" multiple placeholder="请选择" @remove-tag="handlesysTag" @change="handleSys" class="overtime-input">
<el-option
v-for="item in sysList"
:key="item.platformId"
:label="item.platformName"
:value="item.platformId"
>
</el-option>
</el-select>
<el-tag
style="
font-size: 14px;
background-color: white;
border: white;
color: black;
"
>可多选</el-tag>
</div>
<button class="h-right-two"
@click="saveRemind()">保存设置</button>
<button class="h-right-one"
@click="defaultRemind()">恢复默认</button>
<el-button class="diaCancel"
@click="diaCancel()">取消返回</el-button>
<!-- 项目滞留超期提醒 -->
<el-tag class="mh">
<div class="h-left">
<div class="line">项目滞留超期提醒</div>
</div>
<div class="h-right">
<button class="h-right-two" @click="saveRemind()">保存设置</button>
<button class="h-right-one" @click="defaultRemind()">恢复默认</button>
</div>
</el-tag>
<el-form :inline="false"
:model="remindForm"
ref="remindForm"
:label-width="'200px'">
<el-form-item class="mh-child"
label="设定核算单位天/日起止时间:"
prop="startTime">
<el-time-picker class="overtime-input"
arrow-control
prefix-icon=el-icon-date
v-model="remindForm.startTime"
:picker-options="{
selectableRange: '00:00:00'+ '-' + '23:59:59' ,
}"
placeholder="任意时间点"
value-format="HH:mm:ss">
<el-form
:inline="false"
:model="remindForm"
ref="remindForm"
:label-width="'200px'"
>
<el-form-item
class="mh-child"
label="设定核算单位天/日起止时间:"
prop="startTime"
>
<el-time-picker
class="overtime-input"
arrow-control
prefix-icon="el-icon-date"
v-model="remindForm.startTime"
:picker-options="{
selectableRange: '00:00:00' + '-' + '23:59:59'
}"
placeholder="任意时间点"
value-format="HH:mm:ss"
>
</el-time-picker>
<span style=" padding: 20px;"></span>
<el-time-picker class="overtime-input"
arrow-control
prefix-icon=el-icon-date
v-model="remindForm.endTime"
:picker-options="{
selectableRange: remindForm.startTime + '-' + '23:59:59' ,
}"
placeholder="任意时间点"
value-format="HH:mm:ss">
<span style="padding: 20px"></span>
<el-time-picker
class="overtime-input"
arrow-control
prefix-icon="el-icon-date"
v-model="remindForm.endTime"
:picker-options="{
selectableRange: remindForm.startTime + '-' + '23:59:59'
}"
placeholder="任意时间点"
value-format="HH:mm:ss"
>
</el-time-picker>
</el-form-item>
<el-form-item class="mh-child"
label="设定滞留超期时间:"
prop="detentionDays">
<el-input-number class="overtime-input"
v-model="remindForm.detentionDays"></el-input-number>
<span style=" padding: 25px;">/</span>
<el-select v-model="remindForm.calculation"
placeholder="请选择"
class="overtime-input">
<el-option v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
<el-form-item
class="mh-child"
label="设定滞留超期时间:"
prop="detentionDays"
>
<el-input-number
class="overtime-input"
v-model="remindForm.detentionDays"
></el-input-number>
<span style="padding: 25px">/</span>
<el-select
v-model="remindForm.calculation"
placeholder="请选择"
class="overtime-input"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!-- 设定即将超期时间提醒 -->
<el-form-item class="mh-child"
label="设定即将超期时间提醒:"
prop="remindTime">
<el-input-number class="overtime-input"
v-model="remindForm.remindTime"></el-input-number>
<span style=" padding: 25px;">单位天</span>
<el-form-item
class="mh-child"
label="设定即将超期时间提醒:"
prop="remindTime"
>
<el-input-number
class="overtime-input"
v-model="remindForm.remindTime"
></el-input-number>
<span style="padding: 25px">单位天</span>
</el-form-item>
<!-- 统一定时消息推送时间 -->
<el-form-item class="mh-child"
label="统一定时消息推送时间:"
prop="pushTime">
<el-time-select class="overtime-input"
v-model="remindForm.pushTime"
:picker-options="{
start: '00:00',
step: '00:5',
end: '23:59'
}"
placeholder="选择时间">
<el-form-item
class="mh-child"
label="统一定时消息推送时间:"
prop="pushTime"
>
<el-time-select
class="overtime-input"
v-model="remindForm.pushTime"
:picker-options="{
start: '00:00',
step: '00:5',
end: '23:59'
}"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
</el-form>
<!-- 议题发布前经网络员审核 -->
<el-tag class="mh">
<div class="h-left">
<div class="line">
议题发布前经网络员审核
</div>
<div class="line">议题发布前经网络员审核</div>
</div>
<div class="h-right">
<button class="h-right-two"
@click="saveReview()">保存设置</button>
<button class="h-right-one"
@click="defaultReview()">恢复默认</button>
<button class="h-right-two" @click="saveReview()">保存设置</button>
<button class="h-right-one" @click="defaultReview()">恢复默认</button>
</div>
</el-tag>
<el-form :inline="false"
:model="reviewForm"
ref="reviewForm"
:label-width="'200px'">
<el-form-item class="mh-child"
label="议题发布前经网络员审核:"
prop="auditSwitch">
<el-switch v-model="auditSwitchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input">
<el-form
:inline="false"
:model="reviewForm"
ref="reviewForm"
:label-width="'200px'"
>
<el-form-item
class="mh-child"
label="议题发布前经网络员审核:"
prop="auditSwitch"
>
<el-switch
v-model="auditSwitchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input"
>
</el-switch>
</el-form-item>
</el-form>
@ -130,67 +194,70 @@
<!-- 待办事项短信通知 -->
<el-tag class="mh">
<div class="h-left">
<div class="line">
待办事项短信通知
</div>
<div class="line">待办事项短信通知</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one"
@click="daibanshi()">恢复默认</button>
<button class="h-right-one" @click="daibanshi()">恢复默认</button>
</div>
</el-tag>
<el-form :inline="false"
:model="msgForm"
ref="msgForm"
:label-width="'200px'">
<el-form-item class="mh-child"
label="待办事项发送短信通知:"
prop="switch">
<el-switch v-model="msgForm.switchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input">
<el-form
:inline="false"
:model="msgForm"
ref="msgForm"
:label-width="'200px'"
>
<el-form-item
class="mh-child"
label="待办事项发送短信通知:"
prop="switch"
>
<el-switch
v-model="msgForm.switchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input"
>
</el-switch>
</el-form-item>
<el-form-item class="mh-child"
label="剩余短信数量:"
prop="remindTime">
<el-input-number class="overtime-input"
v-model="msgForm.remain"></el-input-number>
<span style=" padding: 25px;">单位条</span>
<el-form-item class="mh-child" label="剩余短信数量:" prop="remindTime">
<el-input-number
class="overtime-input"
v-model="msgForm.remain"
></el-input-number>
<span style="padding: 25px">单位条</span>
</el-form-item>
</el-form>
<!-- 小组审核机制-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
小组审核机制
</div>
<div class="line">小组审核机制</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one">恢复默认</button>
</div>
</el-tag>
<el-form :inline="false"
:model="groupForm"
ref="groupForm"
:label-width="'200px'">
<el-form-item class="mh-child"
label="新建小组进组需小组审核:"
prop="switch">
<el-switch v-model="reviewForm.switchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input">
<el-form
:inline="false"
:model="groupForm"
ref="groupForm"
:label-width="'200px'"
>
<el-form-item
class="mh-child"
label="新建小组进组需小组审核:"
prop="switch"
>
<el-switch
v-model="reviewForm.switchShow"
active-text="开启"
inactive-text="关闭"
class="overtime-input"
>
</el-switch>
</el-form-item>
</el-form>
@ -198,76 +265,82 @@
<!-- 其他设置-->
<el-tag class="mh">
<div class="h-left">
<div class="line">
其他设置
</div>
<div class="line">其他设置</div>
</div>
<div class="h-right">
<button class="h-right-two">保存设置</button>
<button class="h-right-one">恢复默认</button>
</div>
</el-tag>
</div>
<editSys ref="edit-sys" />
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from "@/js/dai/request";
import { requestPost } from '@/js/dai/request'
import editSys from './editSys.vue'
let loading //
export default {
components: {
editSys
},
data () {
return {
options: [{
value: 'work',
label: '工作日'
}, {
value: 'calendar',
label: '日历天'
}],
customerId: "",
customerName: "",
options: [
{
value: 'work',
label: '工作日'
},
{
value: 'calendar',
label: '日历天'
}
],
customerId: '',
customerName: '',
remindForm: {
startTime: '10:10:10',
endTime: '12:15:16',
detentionDays: "",//
calculation: "calendar",// work calendar
remindTime: "",//
pushTime: "08:00",// 8
detentionDays: '', //
calculation: 'calendar', // work calendar
remindTime: '', //
pushTime: '08:00' // 8
},
reviewForm: {
auditSwitch: "open",//open close
auditSwitch: 'open' // open close
},
auditSwitchShow: true,//open close
auditSwitchShow: true, // open close
msgForm: {
switch: "open",
switch: 'open',
switchShow: true,
remain: 3//
remain: 3 //
},
groupForm: {
switch: "open",
switchShow: true,
switch: 'open',
switchShow: true
},
sysVisible: true,
sendProjectSwitch: false,
sysList: [],
sysOptions: [],
selectSys: []
}
},
props: {
},
watch: {
},
props: {},
watch: {},
mounted () {
// this.init()
},
methods: {
//
//
async initData (customerId, customerName) {
this.customerId = customerId
this.customerName = customerName
@ -275,12 +348,88 @@ export default {
await this.initRemind()
await this.initReview()
this.endLoading()
this.initSysList()
},
//
handleSys (e) {
console.log('eeeeww', e)
this.sysOptions.forEach(item => {
this.sysList.forEach(n => {
if (item === n.platformId) {
this.selectSys.push(n)
}
})
})
},
handleEditSys (item) {
this.$refs['edit-sys'].initData(item, this.customerId)
},
handleSysDel (item, index) {
this.selectSys.splice(index, 1)
this.sysOptions.forEach((n, i) => {
if (n === item.platformId) this.sysOptions.splice(i, 1)
})
},
handlesysTag (n) {
this.sysOptions.forEach((item, i) => {
if (n === item) this.sysOptions.splice(i, 1)
})
this.selectSys.forEach((item, i) => {
if (n === item.platformId) this.selectSys.splice(i, 1)
})
},
initSysList () {
let params = {
customerId: this.customerId,
actionKey: 'PROJECT_ASSIST'
}
this.$http
.post('/third/thirdplatform/customer/list-selectable-platforms-by-action', params)
.then(({ data: res }) => {
if (res.code === 0) {
this.sysList = res.data
}
})
this.$http
.post('/gov/project/parameter/load-thirdplatform-config', { customerId: this.customerId })
.then(({ data: res }) => {
if (res.code === 0) {
this.selectSys = res.data.customerSelectedPlatformList
this.sendProjectSwitch = Number(res.data.sendProjectSwitch) === 1 || false
this.sysOptions = res.data.customerSelectedPlatformList.map(item => item.platformId)
}
})
},
saveSys () {
// if (!this.sendProjectSwitch) {
// return this.$message.warning('')
// }
let params = {
customerId: this.customerId,
sendProjectSwitch: this.sendProjectSwitch ? 1 : 0,
customerSelectedPlatformList: this.selectSys.map(item => {
return {
...item,
customerId: this.customerId
}
})
}
this.$http
.post('/gov/project/parameter/save-thirdplatform-config', params)
.then(({ data: res }) => {
if (res.code === 0) {
this.$message.success('保存成功')
}
})
},
resetSys () {
this.selectSys = []
this.sysOptions = []
this.sendProjectSwitch = false
},
//
async initRemind () {
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/project/parameter/remindinit"
const url = "/gov/project/parameter/remindinit"
const url = '/gov/project/parameter/remindinit'
const params = {
customerId: this.customerId
@ -289,40 +438,37 @@ export default {
if (code === 0) {
this.remindForm = data
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
},
//
//
async initReview () {
this.startLoading()
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/issue/parameter/reviewinit"
const url = "/gov/issue/parameter/reviewinit"
const url = '/gov/issue/parameter/reviewinit'
const params = {
customerId: this.customerId
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.reviewForm = data
if (data.auditSwitch === "open") {
if (data.auditSwitch === 'open') {
this.auditSwitchShow = true
} else {
this.auditSwitchShow = false
}
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
},
//
//
async saveRemind () {
this.startLoading()
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/project/parameter/remindsave"
const url = "/gov/project/parameter/remindsave"
const url = '/gov/project/parameter/remindsave'
const params = {
customerId: this.customerId,
@ -330,18 +476,18 @@ export default {
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success("保存成功")
this.$message.success('保存成功')
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
this.endLoading()
},
//
//
async saveReview () {
this.startLoading()
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/issue/parameter/reviewsave"
const url = "/gov/issue/parameter/reviewsave"
const url = '/gov/issue/parameter/reviewsave'
this.reviewForm.auditSwitch = this.auditSwitchShow ? 'open' : 'close'
const params = {
customerId: this.customerId,
@ -349,13 +495,13 @@ export default {
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.$message.success("保存成功")
this.$message.success('保存成功')
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
this.endLoading()
},
//
//
async defaultRemind () {
this.startLoading()
await this.setDefaultRemind()
@ -363,20 +509,17 @@ export default {
this.endLoading()
},
async setDefaultRemind () {
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/project/parameter/reminddefault"
const url = "/gov/project/parameter/reminddefault"
const url = '/gov/project/parameter/reminddefault'
const params = {
customerId: this.customerId,
customerId: this.customerId
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
},
async defaultReview () {
this.startLoading()
@ -384,24 +527,19 @@ export default {
await this.initReview()
this.endLoading()
},
//
//
async setDefaultReview () {
// const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/gov/issue/parameter/reviewdefault"
const url = "/gov/issue/parameter/reviewdefault"
const url = '/gov/issue/parameter/reviewdefault'
const params = {
customerId: this.customerId,
customerId: this.customerId
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
} else {
this.$message.error(msg + ":" + internalMsg)
this.$message.error(msg + ':' + internalMsg)
}
},
diaCancel () {
this.$emit('cancleBack')
@ -421,9 +559,7 @@ export default {
loading.close()
}
}
},
}
}
</script>
@ -460,7 +596,7 @@ export default {
position: relative;
}
/* div.el-switch.is-checked{
} */
div.el-switch {
margin-left: 60px;
@ -611,4 +747,20 @@ input.el-input__inner {
div.set-overtime.el-input.el-input--medium.el-input--suffix {
padding-right: 0px;
}
.sys-list {
.sys-list-item {
display: flex;
align-items: center;
padding: 5px 0;
border-bottom: 1px solid #eee;
img {
width: 30px;
height: 30px;
}
span {
margin: 0 20px;
}
}
}
</style>

176
epmet-oper-web/src/views/modules/customer/customize/editSys.vue

@ -0,0 +1,176 @@
<template>
<div>
<c-dialog :title="'修改系统信息'"
:visible="diaVisible"
:width="40"
@ok="save"
@cancel="diaCancel">
<el-card shadow="never"
class="aui-card--fill">
<el-form
:model="formData"
:rules="dataRule"
ref="ref_form"
style="margin:0 auto;width:860px"
:label-width="'100px'">
<el-form-item prop="platformName"
label="系统名称">
<el-input v-model="formData.platformName" style="width: 100%;"></el-input>
</el-form-item>
<el-form-item prop="icon"
label="Logo">
<el-upload class="item_width_1 avatar-uploader"
:action="uploadUlr"
:show-file-list="false"
:on-success="handleImgSuccess"
:before-upload="beforeImgUpload">
<img v-if="formData.icon"
:src="formData.icon"
style="width:70px;height:70px"
class="function-icon">
<i v-else
class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-form>
</el-card>
</c-dialog>
</div>
</template>
<script>
/* eslint-disable */
import CForm from '@c/CForm'
import CDialog from '@c/CDialog'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
diaVisible: false,
formData: {},//
formData2: {
logo: ''
},
optionData: {
},
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/function/upload',
customerId: ''
}
},
components: {
CForm, CDialog
},
mounted () {
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50 - 400
},
...mapGetters(['clientHeight']),
dataRule () {
return {
logo: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
// eslint-disable-next-line
initData (row, customerId) {
this.diaVisible = true
this.$nextTick(() => {
this.formData = row
this.formData2.logo = row.logo
this.customerId = customerId
})
},
// logo
handleImgSuccess (res, file) {
if (res.code === 0 && res.msg === 'success') {
this.formData.icon = res.data.url
} else {
this.$message.error(res.msg)
}
},
beforeImgUpload (file) {
// const isPNG = file.type === 'image/png'
const isLt1M = file.size / 1024 / 1024 < 1
// if (!isPNG) {
// this.$message.error(' PNG !')
// }
if (!isLt1M) {
this.$message.error('上传图片大小不能超过 1MB!')
}
// return isPNG && isLt1M
return isLt1M
},
save () {
this.$refs['ref_form'].validate((valid) => {
if (valid) {
if (!this.formData.icon || this.formData.icon === '') {
this.$message.error('请上传Logo!')
return false
}
this.startLoading()
// let url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/crm/customer/updatecustomer'
let url = '/third/thirdplatform/customer/update-customize-platform-info'
//
let _data = {
...this.formData,
customerId: this.customerId
}
window.app.ajax.post(url, _data,
(data, rspMsg) => {
this.endLoading()
this.$message.success('修改成功')
this.$emit('refresh', this.formData)
this.diaCancel()
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
})
}
})
},
diaCancel () {
this.diaVisible = false
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
}
}
</script>
Loading…
Cancel
Save