43 changed files with 1751 additions and 354 deletions
@ -0,0 +1,268 @@ |
|||
<template> |
|||
|
|||
<div :class="['div_sub_table',{'table2': tableType==='nosync'}]"> |
|||
<div class="span_sub_title">{{talbeTitle}}</div> |
|||
<el-button class="btn_sub" |
|||
type="primary" |
|||
size="mini" |
|||
@click="tableType==='sync'?delSubSure():syncSubSure()">{{btnName}}</el-button> |
|||
<el-table :height="subTabHeight" |
|||
ref="ref_table" |
|||
v-loading="tableLoading" |
|||
:data="tableData" |
|||
border |
|||
style="width: 100%;" |
|||
@selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" |
|||
width="55"> |
|||
</el-table-column> |
|||
<el-table-column prop="tmplId" |
|||
label="公共模板ID" |
|||
header-align="left" |
|||
:min-width="150" |
|||
align="left"></el-table-column> |
|||
<el-table-column v-if="showCustomerTempId" |
|||
prop="personalTempId" |
|||
label="客户模板ID" |
|||
header-align="left" |
|||
:min-width="160" |
|||
align="left"></el-table-column> |
|||
<el-table-column prop="title" |
|||
label="标题" |
|||
header-align="left" |
|||
:min-width="120" |
|||
align="left"></el-table-column> |
|||
|
|||
<!-- <el-table-column prop="state" |
|||
label="状态" |
|||
header-align="left" |
|||
:min-width="80"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.state==='0'" |
|||
style="color: red">未同步</span> |
|||
<span v-else-if="scope.row.state==='1'">同步</span> |
|||
|
|||
</template> |
|||
</el-table-column> --> |
|||
|
|||
</el-table> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
tableLoading: false, |
|||
selCustomerId: '', |
|||
resiAppid: '', |
|||
workAppid: '', |
|||
tableData: [], |
|||
selList: [],//选中的list |
|||
title: "aaa" |
|||
} |
|||
}, |
|||
components: {}, |
|||
activated () { |
|||
|
|||
}, |
|||
mounted () { |
|||
|
|||
}, |
|||
computed: { |
|||
subTabHeight () { |
|||
return this.clientHeight * 0.57 / 2 |
|||
}, |
|||
...mapGetters(['clientHeight', 'env']) |
|||
}, |
|||
methods: { |
|||
handleSelectionChange (val) { |
|||
this.selList = val |
|||
|
|||
}, |
|||
setTableLoading () { |
|||
this.tableLoading = !this.tableLoading |
|||
}, |
|||
getSelIdList () { |
|||
let selIdList = [] |
|||
this.selList.forEach(element => { |
|||
selIdList.push(element.id) |
|||
}) |
|||
return selIdList |
|||
}, |
|||
getSelPersonalIdList () { |
|||
let personalIdList = [] |
|||
this.selList.forEach(element => { |
|||
personalIdList.push(element.personalId) |
|||
}) |
|||
return personalIdList |
|||
}, |
|||
|
|||
setTableData (tableData, selCustomerId, resiAppid, workAppid) { |
|||
this.tableData = tableData |
|||
this.selCustomerId = selCustomerId |
|||
this.workAppid = workAppid |
|||
this.resiAppid = resiAppid |
|||
}, |
|||
|
|||
//同步客户的订阅消息为默认订阅消息 |
|||
async syncSubSure (message, type) { |
|||
this.$confirm('确认同步客户的订阅消息', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
let selList = this.getSelIdList() |
|||
if (selList.length === 0) { |
|||
this.$message.info("请选择要同步的模板") |
|||
} else { |
|||
console.log(selList) |
|||
this.syncSub(selList) |
|||
|
|||
} |
|||
|
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
|
|||
//同步客户的订阅消息为默认订阅消息 |
|||
async delSubSure () { |
|||
this.$confirm('确认删除客户的订阅消息', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
let selList = this.getSelPersonalIdList() |
|||
if (selList.length === 0) { |
|||
this.$message.info("请选择要删除的模板") |
|||
} else { |
|||
this.delSub(selList) |
|||
} |
|||
|
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
|
|||
async syncSub (selList) { |
|||
this.startLoading() |
|||
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init' |
|||
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/init' |
|||
|
|||
let params = { |
|||
customerId: this.selCustomerId, |
|||
workAppId: this.workAppid, |
|||
resiAppId: this.resiAppid |
|||
} |
|||
|
|||
if (this.activeName === 'resi') { |
|||
params.resiTempIdList = selList |
|||
} else { |
|||
params.workTempIdList = selList |
|||
} |
|||
|
|||
const { data, code, msg, internalMsg } = await requestPost(url, params) |
|||
if (code === 0) { |
|||
this.$message.success('同步成功') |
|||
this.$emit('refresh') |
|||
|
|||
} else { |
|||
this.$message.error(msg + ":" + internalMsg) |
|||
} |
|||
this.endLoading() |
|||
|
|||
}, |
|||
async delSub (selList) { |
|||
this.startLoading() |
|||
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/delpersonaltemp' |
|||
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/delpersonaltemp' |
|||
|
|||
let params = { |
|||
customerId: this.selCustomerId, |
|||
clientType: this.activeName, |
|||
tempIdList: selList |
|||
} |
|||
|
|||
const { data, code, msg, internalMsg } = await requestPost(url, params) |
|||
if (code === 0) { |
|||
this.$message.success('删除成功') |
|||
this.$emit('refresh') |
|||
|
|||
} else { |
|||
this.$message.error(msg + ":" + internalMsg) |
|||
} |
|||
this.endLoading() |
|||
|
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
props: { |
|||
//是否显示客户模板id |
|||
showCustomerTempId: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
//列表类型 sync 已同步的 nosync 未同步的 |
|||
tableType: { |
|||
type: String, |
|||
default: 'sync' |
|||
}, |
|||
// |
|||
talbeTitle: { |
|||
type: String, |
|||
default: '已同步模板' |
|||
}, |
|||
// |
|||
btnName: { |
|||
type: String, |
|||
default: '删除订阅模板' |
|||
}, |
|||
activeName: { |
|||
type: String, |
|||
default: 'resi' |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style lang="css" > |
|||
.div_sub_table { |
|||
/* margin: 10px 10px; */ |
|||
position: relative; |
|||
} |
|||
.table2 { |
|||
margin-top: 20px; |
|||
} |
|||
.span_sub_title { |
|||
/* height: 30px; |
|||
line-height: 30px; */ |
|||
font-size: 16px; |
|||
padding: 5px 0 10px 0; |
|||
} |
|||
.btn_sub { |
|||
position: absolute; |
|||
right: 10px; |
|||
top: 0px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,370 @@ |
|||
<template> |
|||
<div class="role-container"> |
|||
<el-card class="flex1"> |
|||
<!-- <div class="now-name"> |
|||
当前客户: {{customerName}} |
|||
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button> |
|||
</div> --> |
|||
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border style="width: 100%"> |
|||
<el-table-column type="index" width="50"></el-table-column> |
|||
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> --> |
|||
<el-table-column prop="roleName" label="角色名称" width="160"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-if="scope.row.isEdit" v-model="scope.row.roleName" clearable> |
|||
</el-input> |
|||
<span v-else>{{scope.row.constName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column> |
|||
<el-table-column label="操作"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button> |
|||
<!-- <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;"> |
|||
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button> |
|||
<el-button size="small" @click="scope.row.isEdit=false">取消</el-button> |
|||
</span> |
|||
<el-button v-else type="primary" size="mini" @click="handleChangeName(scope.row)">修改名称</el-button> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-card> |
|||
<el-dialog :visible.sync="funcShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
width="70%" |
|||
top="30px" |
|||
title="功能列表" |
|||
@closed="handleDialogClosed"> |
|||
<div class="role-flex" v-if="funcShow"> |
|||
<el-card class="flex1"> |
|||
<div class="now-name">当前角色: {{roleName}}</div> |
|||
<div class="now-name"> |
|||
<el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button> |
|||
</div> |
|||
<el-table |
|||
v-loading="loading2" |
|||
height="580" |
|||
ref="opeTable" |
|||
:data="opeList" |
|||
border |
|||
@select="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55"></el-table-column> |
|||
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> --> |
|||
<el-table-column prop="operationName" label="操作名称"></el-table-column> |
|||
<!-- <el-table-column prop="brief" label="简介"></el-table-column> --> |
|||
<el-table-column label="操作"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="small" @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-card> |
|||
<el-card v-show="roleShow" style="width: 250px; margin-left: 10px;"> |
|||
<div class="now-name">当前功能: {{funcName}}</div> |
|||
<div class="now-name"><el-button type="primary" size="small" @click="saveSettings">保存范围</el-button></div> |
|||
<div> |
|||
<el-row :gutter="12"> |
|||
<el-col v-loading="loading3"> |
|||
<el-card shadow="hover"> |
|||
<el-checkbox-group class="t" v-model="checkedScopes" @change="roleChange"> |
|||
<el-checkbox |
|||
v-for="scope in scopeOptions" |
|||
:label="scope.scopeKey" |
|||
:key="scope.scopeKey" |
|||
>{{scope.scopeName}}</el-checkbox> |
|||
</el-checkbox-group> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Sortable from 'sortablejs' |
|||
export default { |
|||
name: 'RoleList', |
|||
props: { |
|||
customerId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
customerName: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
data () { |
|||
return { |
|||
loading1: false, |
|||
loading2: false, |
|||
loading3: false, |
|||
funcShow: false, |
|||
roleShow: false, |
|||
roleName: '', |
|||
funcName: '', |
|||
roleList: [], |
|||
opeList: [], |
|||
roleKey: '', |
|||
operationKey: '', |
|||
scopeOptions: [], |
|||
settingOptions: [], |
|||
checkedScopes: [], |
|||
checkedSettings: [], |
|||
operateSection: [], // 功能选择列表 |
|||
scopeSection: [] // 范围选择列表 |
|||
} |
|||
}, |
|||
created () { |
|||
this.listRolesByCustomerId() |
|||
}, |
|||
mounted () { |
|||
this.dragRoleSort() |
|||
}, |
|||
beforeDestroy () { |
|||
let _data = this.$data |
|||
for (let n in _data) { |
|||
if (typeof _data[n] === 'boolean') _data[n] = false |
|||
if (typeof _data[n] === 'string') _data[n] = '' |
|||
if (typeof _data[n] === 'object') _data[n] = [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleDialogClosed () { |
|||
this.roleName = '' |
|||
this.roleKey = '' |
|||
this.funcName = '' |
|||
this.operateSection = [] |
|||
this.scopeSection = [] |
|||
this.funcShow = false |
|||
this.roleShow = false |
|||
}, |
|||
listRolesByCustomerId (customerId) { |
|||
this.loading1 = true |
|||
this.$http |
|||
.post('/epmetuser/govstaffrole/roletemplates') |
|||
.then(({ data: res }) => { |
|||
console.log('ressss', res) |
|||
if (res.code === 0) { |
|||
this.roleList = res.data.map(item => { |
|||
return { |
|||
...item, |
|||
constName: item.roleName, |
|||
isEdit: false |
|||
} |
|||
}) |
|||
} |
|||
setTimeout(() => { |
|||
this.loading1 = false |
|||
}, 500) |
|||
}) |
|||
}, |
|||
listOperations4AccessConfig (roleKey) { |
|||
this.roleKey = roleKey |
|||
this.loading2 = true |
|||
this.$http.post('/gov/access/config/roledefaultops/' + roleKey).then((resp) => { |
|||
this.opeList = resp.data.data |
|||
this.$nextTick(function () { |
|||
this.defaultCheck() // 每次更新了数据,触发这个函数即可。 |
|||
}) |
|||
setTimeout(() => { |
|||
this.loading2 = false |
|||
}, 500) |
|||
}) |
|||
}, |
|||
listSettingOptions (operationKey) { |
|||
let params = { |
|||
roleKey: this.roleKey, |
|||
operationKey: operationKey |
|||
} |
|||
console.log('checkedScopes', this.checkedScopes) |
|||
this.loading3 = true |
|||
this.$http |
|||
.post('/gov/access/config/opedefaultscopes/list', params) |
|||
.then(resp => { |
|||
console.log('scopeOptions', resp.data) |
|||
this.scopeOptions = resp.data.data |
|||
resp.data.data.forEach(item => { |
|||
if (item.assigned) this.checkedScopes.push(item.scopeKey) |
|||
}) |
|||
console.log('checkedScopes222', this.checkedScopes) |
|||
this.settingOptions = resp.data.data |
|||
setTimeout(() => { |
|||
this.loading3 = false |
|||
}, 500) |
|||
}) |
|||
}, |
|||
defaultCheck () { |
|||
for (var index in this.opeList) { |
|||
let role = this.opeList[index] |
|||
if (role.assigned) { |
|||
this.$refs.opeTable.toggleRowSelection(role, true) |
|||
} |
|||
} |
|||
}, |
|||
toOperationConfig (roleKey, roleName) { |
|||
this.roleName = roleName |
|||
this.funcShow = true |
|||
this.opeList = [] |
|||
this.listOperations4AccessConfig(roleKey) |
|||
}, |
|||
toScopeConfig (operationKey, operationName) { |
|||
this.roleShow = true |
|||
this.operationKey = operationKey |
|||
this.funcName = operationName |
|||
this.checkedScopes = [] |
|||
this.listSettingOptions(operationKey) |
|||
}, |
|||
saveOperations4Role () { |
|||
let param = { |
|||
roleKey: this.roleKey, |
|||
operationKeys: this.operateSection.map(item => item.operationKey) |
|||
} |
|||
this.$http.post('/gov/access/config/roledefaultopes/save', param).then( |
|||
resp => { |
|||
const { code, msg } = resp.data |
|||
if (code === 0 && msg === 'success') { |
|||
this.$message({ |
|||
message: '操作成功', |
|||
type: 'success' |
|||
}) |
|||
this.listOperations4AccessConfig(this.roleKey) |
|||
} else { |
|||
this.$message({ |
|||
message: msg, |
|||
type: 'error' |
|||
}) |
|||
} |
|||
} |
|||
) |
|||
}, |
|||
saveSettings () { |
|||
let param = { |
|||
roleKey: this.roleKey, |
|||
operationKey: this.operationKey, |
|||
scopeKeys: this.scopeSection |
|||
} |
|||
|
|||
this.$http.post('/gov/access/config/opedefaultscopes/save', param).then( |
|||
resp => { |
|||
const { code, msg } = resp.data |
|||
if (code === 0 && msg === 'success') { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.listSettingOptions(this.operationKey) |
|||
} else { |
|||
this.$message({ |
|||
message: msg, |
|||
type: 'error' |
|||
}) |
|||
} |
|||
} |
|||
) |
|||
}, |
|||
roleChange (val) { |
|||
// console.log('valooo', val) |
|||
this.scopeSection = val |
|||
// this.saveSettings(val) |
|||
}, |
|||
handleSelectionChange (val) { |
|||
// console.log('val', val) |
|||
this.operateSection = val |
|||
// this.saveOperations4Role(val) |
|||
}, |
|||
handleChangeName (row) { |
|||
row.isEdit = true |
|||
}, |
|||
handleSaveChange (row) { |
|||
let data = { |
|||
roleKey: row.roleKey, |
|||
roleName: row.roleName |
|||
} |
|||
this.$http |
|||
.post('/epmetuser/govstaffrole/update-role', data) |
|||
.then(({ data: res }) => { |
|||
console.log('ressss', res) |
|||
if (res.code === 0 && res.msg === 'success') { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.listRolesByCustomerId(this.customerId) |
|||
} else { |
|||
this.$message({ |
|||
type: 'error', |
|||
message: res.internalMsg |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
dragRoleSort () { |
|||
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0] |
|||
this.sortTable = Sortable.create(el, { |
|||
group: 'dragTable', |
|||
ghostClass: 'sortable-ghost', // Class name for the drop placeholder, |
|||
// setData: function(dataTransfer, dragEl) { |
|||
// dataTransfer.setData("Text", dragEl.textContent); |
|||
// }, |
|||
delay: 0, |
|||
onChange: evt => { |
|||
// console.log(evt) |
|||
}, |
|||
onEnd: evt => { |
|||
const targetRow = this.roleList.splice(evt.oldIndex, 1)[0] |
|||
this.roleList.splice(evt.newIndex, 0, targetRow) |
|||
} |
|||
}) |
|||
}, |
|||
handleSaveSort () { |
|||
let data = { |
|||
roleIdList: this.roleList.map(item => { |
|||
return item.roleKey |
|||
}) |
|||
} |
|||
this.$http |
|||
.post('/epmetuser/govstaffrole/save-sortorder', data) |
|||
.then(({ data: res }) => { |
|||
console.log('ressss', res) |
|||
if (res.code === 0 && res.msg === 'success') { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.listRolesByCustomerId(this.customerId) |
|||
} else { |
|||
this.$message({ |
|||
type: 'error', |
|||
message: res.internalMsg |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.role-container, .role-flex { |
|||
display: flex; |
|||
} |
|||
.flex1 { |
|||
flex: 1; |
|||
} |
|||
.now-name { |
|||
/* display: flex; |
|||
justify-content: space-between; */ |
|||
margin-bottom: 10px; |
|||
} |
|||
.aui-wrapper .el-card + .el-card { |
|||
margin-top: 0; |
|||
} |
|||
.role-container .el-dialog__body { |
|||
padding: 0 20px 20px; |
|||
} |
|||
</style> |
|||
@ -1,19 +1,559 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
|
|||
ffffffffff |
|||
|
|||
|
|||
</div> |
|||
<!-- 项目滞留超期提醒 --> |
|||
<div v-show="showType==='customize'" class="m-body"> |
|||
<el-tag class="mh"> |
|||
<div class="h-left"> |
|||
<div class="line"> |
|||
项目滞留超期提醒 |
|||
</div> |
|||
</div> |
|||
<div class="h-right"> |
|||
|
|||
<button class="h-right-two" @click="one_two()">保存设置</button> |
|||
<button class="h-right-one" @click="stayover()">恢复默认</button> |
|||
<el-button class="diaCancel" @click="diaCancel()">取消返回</el-button> |
|||
</div> |
|||
</el-tag> |
|||
<!-- 设定核算单位prefix-icon="el-icon-date" --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-accont">设定核算单位天/日起止时间:</el-tag> |
|||
<el-time-picker |
|||
class="overtime-input" |
|||
arrow-control |
|||
prefix-icon=el-icon-date |
|||
v-model="startTime" |
|||
:picker-options="{ |
|||
selectableRange: '00:00:00'+ '-' + '23:59:59' , |
|||
}" |
|||
placeholder="任意时间点" |
|||
value-format="HH:mm:ss"> |
|||
</el-time-picker> |
|||
<text-align style=" padding: 20px;">至</text-align> |
|||
<el-time-picker |
|||
class="overtime-input" |
|||
arrow-control |
|||
prefix-icon=el-icon-date |
|||
v-model="endTime" |
|||
:picker-options="{ |
|||
selectableRange: startTime + '-' + '23:59:59' , |
|||
}" |
|||
placeholder="任意时间点" |
|||
value-format="HH:mm:ss"> |
|||
</el-time-picker> |
|||
</div> |
|||
<!-- 设定滞留超期时间 start: '08:30:00', |
|||
step: '00:15:00', |
|||
end: '23:30:00' --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">设定滞留超期时间:</el-tag> |
|||
<el-from-item class="el-from-item"> |
|||
<button class="btn btn-delet" @click="staytime_subtract()">-</button> |
|||
</el-from-item> |
|||
<el-input class="overtime-input" v-model="detentionDays"></el-input> |
|||
<el-from-item class="el-from-item"> |
|||
<button class="btn btn-add" @click="staytime_add()">+</button> |
|||
</el-from-item> |
|||
<el-tag style="padding-left: 14px;padding-right: 14px;font-size: 15px;background-color: white;border: 0px;color: #000000;">/</el-tag> |
|||
<el-select v-model="value" placeholder="请选择" class="overtime-input"> |
|||
<el-option |
|||
v-for="item in options" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
|
|||
<!-- 设定即将超期时间提醒 --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">设定即将超期时间提醒:</el-tag> |
|||
<el-from-item class="el-from-item"> |
|||
<button class="btn btn-delet" @click="subtract_remind()">-</button> |
|||
</el-from-item> |
|||
<el-from-item> |
|||
<el-input class="overtime-input" v-model="remindTime" ></el-input> |
|||
</el-from-item> |
|||
<el-from-item class="el-from-item"> |
|||
<button class="btn btn-add" @click="add_remind()">+</button> |
|||
</el-from-item> |
|||
<el-tag style="font-size: 14px; background-color: white;border: white;color: black;">单位天</el-tag> |
|||
</div> |
|||
<!-- 统一定时消息推送时间 --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">统一定时消息推送时间:</el-tag> |
|||
<el-time-select |
|||
class="overtime-input" |
|||
v-model="pushTime" |
|||
:picker-options="{ |
|||
start: '06:00', |
|||
step: '00:05', |
|||
end: '23:00' |
|||
}" |
|||
placeholder="选择时间"> |
|||
</el-time-select> |
|||
</div> |
|||
|
|||
|
|||
|
|||
<!-- 议题发布前经网络员审核--> |
|||
<el-tag class="mh"> |
|||
<div class="h-left"> |
|||
<div class="line"> |
|||
议题发布前经网络员审核 |
|||
</div> |
|||
</div> |
|||
<div class="h-right"> |
|||
|
|||
<button class="h-right-two">保存设置</button> |
|||
<button class="h-right-one" @click="yitimoren()">恢复默认</button> |
|||
</div> |
|||
</el-tag> |
|||
<!-- 议题发布前经网络员审核 --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">议题发布前经网络员审核:</el-tag> |
|||
<el-switch |
|||
v-model="button1" |
|||
active-text="开启" |
|||
inactive-text="关闭" |
|||
element style="width: 200px;"> |
|||
</el-switch> |
|||
</div> |
|||
<!-- 待办事项短信通知 --> |
|||
<el-tag class="mh"> |
|||
<div class="h-left"> |
|||
<div class="line"> |
|||
待办事项短信通知 |
|||
</div> |
|||
</div> |
|||
<div class="h-right"> |
|||
|
|||
<button class="h-right-two">保存设置</button> |
|||
<button class="h-right-one" @click="daibanshi()">恢复默认</button> |
|||
</div> |
|||
</el-tag> |
|||
<!-- 代办事项发送短信通知 --> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">待办事项发送短信通知:</el-tag> |
|||
<el-switch |
|||
v-model="button2" |
|||
active-text="开启" |
|||
inactive-text="关闭"> |
|||
</el-switch> |
|||
</div> |
|||
<!-- 剩余短信数量--> |
|||
<div class="mh-child"> |
|||
<el-tag class="set-overtime">剩余短信数量:</el-tag> |
|||
<el-input |
|||
placeholder="请输入内容" |
|||
v-model="input" |
|||
clearable |
|||
class="overtime-input"> |
|||
</el-input> |
|||
<el-tag style="font-size: 14px; background-color: white;border: white;color: black;">单位条</el-tag> |
|||
</div> |
|||
<!-- 小组审核机制--> |
|||
<el-tag class="mh"> |
|||
<div class="h-left"> |
|||
<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 class="mh-child"> |
|||
<el-tag class="set-overtime">新建小组进组需小组审核:</el-tag> |
|||
<el-switch |
|||
v-model="button3" |
|||
active-text="开启" |
|||
inactive-text="关闭"> |
|||
</el-switch> |
|||
</div> |
|||
<!-- 其他设置--> |
|||
<el-tag class="mh"> |
|||
<div class="h-left"> |
|||
<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> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
options:[{ |
|||
value: 'work', |
|||
label: '工作日' |
|||
}, { |
|||
value: 'rest', |
|||
label: '休息日' |
|||
}], |
|||
value: 'rest', |
|||
button1: false, |
|||
button2: true, |
|||
button3: true, |
|||
input: 2, |
|||
startTime: '10:10:10', |
|||
endTime:'12:15:16', |
|||
code: ' ', |
|||
auditSwitch: "", |
|||
customerId: '81776', // 客户id,父组件传 |
|||
customerName: '', // 客户名称,父组件传 |
|||
detentionDays:'1', |
|||
calculation: '', |
|||
remindTime: '1', |
|||
pushTime: "18:10", |
|||
showType:'customize', |
|||
} |
|||
}, |
|||
watch: { |
|||
input: function(val){ |
|||
this.input = val.replace(/\D/g,'') |
|||
}, |
|||
detentionDays: function(val){ |
|||
this.detentionDays = val.replace(/\D/g,'') |
|||
}, |
|||
remindTime: function(val){ |
|||
this.remindTime = val.replace(/\D/g,'') |
|||
} |
|||
}, |
|||
// mounted:function(){ |
|||
// this.one_one(); |
|||
// }, |
|||
|
|||
methods:{ |
|||
staytime_subtract:function(detentionDays){ |
|||
|
|||
if(this.detentionDays>=1){ |
|||
this.detentionDays-- |
|||
} |
|||
else if(this.detentionDays==0){ |
|||
alert("已达最小值","注意","ss"); |
|||
} |
|||
}, |
|||
staytime_add:function(detentionDays){ |
|||
this.detentionDays++; |
|||
}, |
|||
subtract_remind:function(remindTime){ |
|||
|
|||
if(this.remindTime>=1){ |
|||
this.remindTime--; |
|||
} |
|||
else if(this.remindTime==0){ |
|||
alert("已达最小值","注意","ss"); |
|||
} |
|||
}, |
|||
add_remind:function(remindTime){ |
|||
this.remindTime++; |
|||
}, |
|||
//取消返回 |
|||
// cancleBack:function(){ |
|||
// this.showType = 'customize'; |
|||
|
|||
// }, |
|||
diaCancel() { |
|||
this.$emit('cancleBack') |
|||
}, |
|||
|
|||
// 议题默认设置 |
|||
yitimoren (row) { |
|||
this.$confirm('确认恢复默认值', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const url = '/gov/issue/parameter/reviewinit' |
|||
const param = { |
|||
customerId: this.customerId, |
|||
} |
|||
window.app.ajax.post(url, param, |
|||
(data, rspMsg) => { //data映射或者字符串值 |
|||
this.$message.success('初始化成功' + rspMsg,) //请求成功时执行的回调函数 |
|||
// console.log(data.auditSwitch) |
|||
// console.log('-----------------') |
|||
// console.log(this.button1) |
|||
if(data.auditSwitch==='open'){ |
|||
this.button1= true |
|||
}else{ |
|||
this.button1=false |
|||
} |
|||
|
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg) |
|||
}) |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
|
|||
//项目滞留超期提醒初始化 |
|||
stayover (row) { |
|||
this.$confirm('确认恢复默认值', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const url = '/gov/project/parameter/remindinit' |
|||
const param = { |
|||
customerId: this.customerId, |
|||
detentionDays: this.detentionDays, |
|||
calculation: this.calculation, |
|||
remindTime: this.remindTime, |
|||
pushTime: this.pushTime, |
|||
startTime: this.startTime, |
|||
endTime: this.endTime, |
|||
} |
|||
window.app.ajax.post(url, param, |
|||
(data, rspMsg) => { //data映射或者字符串值 |
|||
this.$message.success('初始化成功' + rspMsg,) //请求成功时执行的回调函数 |
|||
// console.log(data.detentionDays) |
|||
// console.log(data.calculation) |
|||
// console.log(data.remindTime) |
|||
// console.log(data.pushTime) |
|||
// console.log(data.startTime) |
|||
// console.log(data.endTime) |
|||
// console.log('-----------------') |
|||
// console.log(this.pushTime) |
|||
this.remindTime = parseInt(data.remindTime) |
|||
this.detentionDays = parseInt(data.detentionDays) |
|||
if(data.calculation=='work'){ |
|||
this.value= 'work'; |
|||
}else{ |
|||
this.value='work' |
|||
} |
|||
this.pushTime = data.pushTime |
|||
this.startTime = data.startTime |
|||
this.endTime = data.endTime |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg) |
|||
}) |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
// ------ |
|||
|
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
<style> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
|
|||
.line{ |
|||
position: relative; |
|||
|
|||
width: 120px; |
|||
border-bottom: 3px solid #17b3a3; |
|||
} |
|||
.el-card__body{ |
|||
padding: 0px; |
|||
} |
|||
.m-body{ |
|||
height: 790px; |
|||
width: 100%; |
|||
padding-top: 0px; |
|||
} |
|||
.select-date{ |
|||
margin-left: 100px; |
|||
} |
|||
|
|||
.mh{ |
|||
width: 100%; |
|||
height: 50px; |
|||
display: flex; |
|||
background-color: white; |
|||
border-color: white; |
|||
color: black; |
|||
padding: 0px; |
|||
border-bottom: 2px solid #eeeeee; |
|||
|
|||
} |
|||
.mh-child{ |
|||
margin-top: 30px; |
|||
position: relative; |
|||
|
|||
} |
|||
/* div.el-switch.is-checked{ |
|||
|
|||
} */ |
|||
div.el-switch{ |
|||
margin-left: 60px; |
|||
|
|||
} |
|||
.el-switch__core{ |
|||
height: 25px; |
|||
width: 50px; |
|||
border-radius: 25px; |
|||
} |
|||
.el-switch__core:after{ |
|||
width: 20px; |
|||
height: 20px; |
|||
} |
|||
.el-switch.is-checked .el-switch__core::after{ |
|||
margin-left: -20px; |
|||
} |
|||
|
|||
.h-left{ |
|||
padding: 9px; |
|||
margin: auto 0; |
|||
font-size: 15px; |
|||
position: relative; |
|||
width: 70%; |
|||
padding-left: 0px; |
|||
padding-top: 15px; |
|||
padding-bottom: 2px; |
|||
|
|||
|
|||
} |
|||
.h-right{ |
|||
padding-bottom: 2px; |
|||
padding-top: 8px; |
|||
font-size: 15px; |
|||
position: relative; |
|||
width: 30%; |
|||
|
|||
} |
|||
.h-right-one{ |
|||
background-color: #d4d2ce; |
|||
color: black; |
|||
border: 0px; |
|||
width:30%; |
|||
height: 30px; |
|||
text-align: center; |
|||
padding-left: 2px; |
|||
padding-right: 2px; |
|||
border-radius: 4px; |
|||
float: right; |
|||
|
|||
|
|||
} |
|||
.h-right-one:hover { |
|||
background-color: #deddda; |
|||
color: black; |
|||
border: 0px; |
|||
width:30%; |
|||
height: 30px; |
|||
text-align: center; |
|||
padding-left: 2px; |
|||
padding-right: 2px; |
|||
border-radius: 4px; |
|||
float: right; |
|||
|
|||
} |
|||
.h-right-two{ |
|||
background-color: #17b3a3; |
|||
color: white; |
|||
width:30%; |
|||
height: 30px; |
|||
border: 0px; |
|||
margin-left: 10px; |
|||
text-align: center; |
|||
padding-left: 2px; |
|||
padding-right: 2px; |
|||
border-radius: 4px; |
|||
float: right; |
|||
|
|||
} |
|||
.h-right-two:hover { |
|||
background-color: #18bfac; |
|||
|
|||
|
|||
} |
|||
|
|||
.diaCancel{ |
|||
float: right; |
|||
margin-right: 10px; |
|||
width: 30%; |
|||
height: 30px; |
|||
padding: 0px; |
|||
font-size: 15px; |
|||
} |
|||
|
|||
.set-accont{ |
|||
width: 250px; |
|||
text-align: right; |
|||
font-size: 15px; |
|||
padding-right: 30px; |
|||
background-color: white; |
|||
color: black; |
|||
border-color: white; |
|||
} |
|||
.set-overtime{ |
|||
width: 250px; |
|||
text-align: right; |
|||
font-size: 16px; |
|||
padding-right: 30px; |
|||
background-color: white; |
|||
color: black; |
|||
border-color: white; |
|||
|
|||
} |
|||
.overtime-input{ |
|||
width: 280px; |
|||
border-radius: 0px; |
|||
} |
|||
.el-input--medium{ |
|||
text-align: center; |
|||
|
|||
} |
|||
input.el-input__inner{ |
|||
border-radius: 0px; |
|||
text-align: center; |
|||
padding-right: 5px; |
|||
} |
|||
.btn{ |
|||
background-color: #f1f1f1; |
|||
border: 1px solid #DCDFE6; |
|||
} |
|||
.el-from-item :hover { |
|||
background-color:#f7f7f7 !important; |
|||
border: 1px solid #DCDFE6; |
|||
} |
|||
.btn-add{ |
|||
font-size: 20px; |
|||
height: 36px; |
|||
padding-top: 2px; |
|||
padding-left: 8px; |
|||
padding-right: 22px; |
|||
padding-bottom: 6px; |
|||
border-radius: 0px; |
|||
border-bottom-right-radius: 5px; |
|||
border-top-right-radius: 5px; |
|||
width: 10px; |
|||
|
|||
} |
|||
.btn-delet{ |
|||
font-size: 20px; |
|||
height: 36px; |
|||
padding-top: 2px; |
|||
padding-left: 12px; |
|||
padding-right: 18px; |
|||
padding-bottom: 6px; |
|||
border-radius: 0px; |
|||
border-bottom-left-radius: 5px; |
|||
border-top-left-radius: 5px; |
|||
width: 10px; |
|||
|
|||
} |
|||
|
|||
div.set-overtime.el-input.el-input--medium.el-input--suffix{ |
|||
padding-right: 0px; |
|||
} |
|||
</style> |
|||
|
|||
Loading…
Reference in new issue