BUG修改

This commit is contained in:
a0049873 2022-12-09 14:47:36 +08:00
parent b7be38f740
commit ad65db6236
3 changed files with 51 additions and 44 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: kongjun qdkongjun@gmail.com * @Author: kongjun qdkongjun@gmail.com
* @Date: 2022-06-20 09:29:59 * @Date: 2022-06-20 09:29:59
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-10-18 15:46:51 * @LastEditTime: 2022-12-09 11:36:33
* @FilePath: \back\src\views\main-sidebar.vue * @FilePath: \back\src\views\main-sidebar.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -88,12 +88,14 @@ export default {
} if (children.id == '1545313754106699777') { // } if (children.id == '1545313754106699777') { //
children.total = Number(this.numObject.comment_review) children.total = Number(this.numObject.comment_review)
daibanNum = Number(daibanNum) + Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
} if (children.id == '1554294862931562498') { // } if (children.id == '1554294862931562498') { //
children.total = 0 // children.total = 0
children.total = Number(this.numObject.meetingroom_book)
daibanNum = Number(daibanNum) + Number(children.total) daibanNum = Number(daibanNum) + Number(children.total)
} }
} }
menu.total = daibanNum menu.total = daibanNum
console.log('menu', menu)
} }
} }
this.$store.state.sidebarMenuList = menuList this.$store.state.sidebarMenuList = menuList

View File

@ -3,7 +3,7 @@
<div class="mod-demo__sysnotice"> <div class="mod-demo__sysnotice">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getData()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getData()">
<el-form-item> <el-form-item>
<el-input v-model="dataForm.content" dict-type="notice_type" :placeholder="$t('notice.type')"></el-input> <el-input v-model="dataForm.content" dict-type="notice_type" placeholder="请输入关键词"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getData()">{{ $t('query') }}</el-button> <el-button type="primary" @click="getData()">{{ $t('query') }}</el-button>
@ -23,10 +23,17 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="180"> <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="viewHandle(scope.row)"> <el-button type="text" size="small" @click="update(scope.row)" style="margin-right: 10px;">
详情 修改
</el-button> </el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row)">{{ $t('delete') }}</el-button> <el-popconfirm
title="确定删除这条公告么?"
confirm-button-text='是'
cancel-button-text='否'
@confirm="deleteHandle(scope.row)"
>
<el-button type="text" slot="reference" size="small" >{{ $t('delete') }}</el-button>
</el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -38,7 +45,7 @@
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div> </div>
<el-dialog <el-dialog
title="添加公告" :title="submitData.id?'修改公告':'添加公告'"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:close-on-click-modal="false"> :close-on-click-modal="false">
@ -60,10 +67,11 @@
:visible.sync="dialogVisible2" :visible.sync="dialogVisible2"
width="30%" width="30%"
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-input 公告周期<el-input-number v-model="cycle" :min="1" :max="7" style="margin-right:10px;"></el-input-number>
<!-- <el-input
placeholder="请输入公告周期(天)" placeholder="请输入公告周期(天)"
v-model="cycle"> v-model="cycle">
</el-input> </el-input> -->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button> <el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="submitCycle"> </el-button> <el-button type="primary" @click="submitCycle"> </el-button>
@ -120,11 +128,12 @@ export default {
handleClose () { handleClose () {
this.dialogVisible = false this.dialogVisible = false
this.dialogVisible2 = false this.dialogVisible2 = false
this.submitData.content = '' this.submitData = {
content: ''
}
this.getCycle() this.getCycle()
}, },
submit () { submit () {
console.log(this.submitData)
if (this.submitData.content.length < 6) { if (this.submitData.content.length < 6) {
this.$message({ this.$message({
message: '最少发布6个字的公告', message: '最少发布6个字的公告',
@ -132,10 +141,15 @@ export default {
}) })
return return
} }
this.$http.post('/sysnoticemanagement', this.submitData).then(res => { if (this.submitData.id) {
console.log('获取通知数据', res.data.data) this.$http.post('/sysnoticemanagement/update', this.submitData).then(res => {
this.clear() this.clear()
}) })
} else {
this.$http.post('/sysnoticemanagement', this.submitData).then(res => {
this.clear()
})
}
}, },
submitCycle () { submitCycle () {
this.$http.put('/sys/dict/data', { this.$http.put('/sys/dict/data', {
@ -156,23 +170,16 @@ export default {
this.getCycle() this.getCycle()
}, },
deleteHandle (item) { deleteHandle (item) {
console.log(item) console.log('点击', item)
this.$http.post('/sysnoticemanagement/delete', [item.id]).then(res => { this.$http.post('/sysnoticemanagement/delete', [item.id]).then(res => {
this.clear() this.clear()
}) })
}, },
viewHandle (row) { update (row) {
// console.log(row)
const routeParams = { this.submitData.id = row.id
routeName: `${this.$route.name}__${row.id}`, this.submitData.content = row.content
title: this.$t('notice.view1'), this.dialogVisible = true
path: 'notice/notice-view',
params: {
id: row.id
}
}
//
addDynamicRoute(routeParams, this.$router)
} }
}, },
created () { created () {

View File

@ -28,10 +28,9 @@
v-if="dataInfo.type === 'todo'" v-if="dataInfo.type === 'todo'"
:content=" :content="
(item.userDeptName || '--') + (item.userDeptName || '--') +
'提交“' + '提交' +
(item.applyTitle || '--') + (item.applyTitle?'“'+item.applyTitle+'”': '') +
'”' + (item.processDefinitionName || item.resourceType || '--') +
(item.processDefinitionName || '--') +
(item.processDefinitionName !== '能力申请' && (item.processDefinitionName !== '能力申请' &&
item.processDefinitionName !== '能力需求申请' item.processDefinitionName !== '能力需求申请'
? '申请' ? '申请'
@ -46,14 +45,13 @@
<!-- {{ `${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}` }} --> <!-- {{ `${(item.processDefinitionName || '--')}${item.taskName ? ('—' + item.taskName) : ''}` }} -->
{{ {{
(item.userDeptName || '--') + (item.userDeptName || '--') +
'提交“' + '提交' +
(item.applyTitle || '--') + (item.applyTitle?'“'+item.applyTitle+'”': '') +
'”' + (item.processDefinitionName || item.resourceType || '--') +
(item.processDefinitionName || '--') + (item.processDefinitionName !== '能力申请' &&
(item.processDefinitionName !== '能力申请' && item.processDefinitionName !== '能力需求申请'
item.processDefinitionName !== '能力需求申请' ? '申请'
? '申请' : '')
: '')
}} }}
</div> </div>
</el-tooltip> </el-tooltip>
@ -64,7 +62,7 @@
:content=" :content="
(item.startUserDeptName || '--') + (item.startUserDeptName || '--') +
'提交的' + '提交的' +
(item.processDefinitionName || '--') + (item.processDefinitionName || item.resourceType || '--') +
(item.processDefinitionName !== '能力申请' && (item.processDefinitionName !== '能力申请' &&
item.processDefinitionName !== '能力需求申请' item.processDefinitionName !== '能力需求申请'
? '申请' ? '申请'
@ -79,7 +77,7 @@
{{ {{
(item.startUserDeptName || '--') + (item.startUserDeptName || '--') +
'提交的' + '提交的' +
(item.processDefinitionName || '--') + (item.processDefinitionName || item.resourceType || '--') +
(item.processDefinitionName !== '能力申请' && (item.processDefinitionName !== '能力申请' &&
item.processDefinitionName !== '能力需求申请' item.processDefinitionName !== '能力需求申请'
? '申请' ? '申请'