1、修复禅道bug

This commit is contained in:
pan
2024-09-08 23:11:17 +08:00
parent a1a3cec421
commit 937f2826f0
14 changed files with 189 additions and 79 deletions

View File

@@ -96,15 +96,15 @@
</div><!--operate 操作按钮-->
<el-table v-loading="loading" :data="toolList" ref="tableRef" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="工具编号" key="toolCode" prop="toolCode" width="150px"/>
<el-table-column label="工具编号" key="toolCode" prop="toolCode" width="150px" :show-overflow-tooltip="true"/>
<el-table-column label="工具名称" key="toolName" prop="toolName" :show-overflow-tooltip="true" width="150px"/>
<el-table-column label="工具类别" key="toolType" prop="toolType" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
</template>
</el-table-column>
<el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" :show-overflow-tooltip="true"/>
<el-table-column label="归属单位" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" />
<el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" />
<el-table-column label="状态" align="center" key="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.tool_status" :value="scope.row.status"/>
@@ -162,7 +162,7 @@
<template slot-scope="scope">
<!-- && !scope.row.downloadStatus v-if="checkApplyUseBtn(scope.row)"-->
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)" v-if="checkApplyUseBtn(scope.row)">申请使用</el-button>
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)" v-hasPermi="['tool:detail']">详情</el-button>
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus" @click="handleFileDownload(scope.row)">下载</el-button>
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right" >更多</el-button>
@@ -185,8 +185,11 @@
</el-card><!--el-card-->
<!-- 工具导出对话框 -->
<el-dialog :title="exportTitle" :visible.sync="exoportDrawerOpen" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
:show-close="false" :wrapperClosable="false">
<el-dialog :title="exportTitle" :visible.sync="exoportDrawerOpen" width="980px"
append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
:show-close="false" :wrapperClosable="false"
v-loading="wordLoading" element-loading-text="正在下载数据,请稍候"
>
<div class="el-form-border">
<el-form ref="exportFrom" label-width="180px">
<el-row>
@@ -212,12 +215,14 @@
<el-checkbox label="toolPrincipalsName">负责人</el-checkbox>
<el-checkbox label="toolRespDeptName">归属单位</el-checkbox>
<el-checkbox label="status">状态</el-checkbox>
<el-checkbox label="toolUse">工具用途</el-checkbox>
<el-checkbox label="testSituation">测评情况</el-checkbox>
<el-checkbox label="recordStatus">流程状态</el-checkbox>
<el-checkbox label="createTime">创建时间</el-checkbox>
<!-- <el-checkbox label="toolUse">工具用途</el-checkbox>-->
<!-- <el-checkbox label="testSituation">测评情况</el-checkbox>
<el-checkbox label="functionDesc">功能描述</el-checkbox>
<el-checkbox label="applyCondition">适用条件</el-checkbox>
<el-checkbox label="operateExplain">操作说明</el-checkbox>
<el-checkbox label="remark">备注</el-checkbox>
<el-checkbox label="remark">备注</el-checkbox>-->
</el-checkbox-group>
</el-form-item>
</el-col>
@@ -290,6 +295,7 @@ import AddDoc from './AddDoc'
import mainComponent from "@/components/mainComponent/index.vue";
import { exportDocx } from '@/utils/docUtil/docutil.js';
import { addCount } from "@/api/tool/downloadCount";
import { Loading, Message } from 'element-ui'
export default {
name: "User",
@@ -323,7 +329,8 @@ export default {
// 部门树选项
deptOptions: undefined,
toolPrincipalsData: [],
columnList: ['toolName', 'toolType', 'toolSource', 'toolPrincipalsName', 'toolRespDeptName', 'status', 'toolUse', 'testSituation', 'functionDesc', 'applyCondition', 'operateExplain', 'remark'],
//'toolUse', 'testSituation', 'functionDesc', 'applyCondition', 'operateExplain', 'remark'
columnList: ['toolName', 'toolType', 'toolSource', 'toolPrincipalsName', 'toolRespDeptName', 'status', 'recordStatus','createTime'],
checkList: [],
toolDetail: {},
// 是否显示弹出层
@@ -409,6 +416,7 @@ export default {
exportTitle:'',
batchExportFlag: false,
selectedRows: [], // 保存所有选中的数据
wordLoading: false,
};
},
@@ -623,6 +631,10 @@ export default {
/** 导出按钮操作 */
handleExport() {
let self = this
if(this.checkList.length == 0){
this.$modal.msgWarning(`最少选择一个字段`);
return
}
if (this.statevalue == 1) {
let excludeFields = this.columnList.filter(item=>!this.checkList.includes(item))
let params = {
@@ -637,7 +649,7 @@ export default {
excludeFields:excludeFields,
}
}
this.download('/tool/export',params, `工具信息数据_${new Date().getTime()}.xlsx`)
this.download('/tool/export',params, `tool_${new Date().getTime()}.xlsx`)
setTimeout(() => {
if(self.batchExportFlag){
self.clearSelected()
@@ -654,6 +666,8 @@ export default {
toolIdList: self.selection.map(item=>item.toolId)
}
}
self.wordLoading = true
// 正在下载数据,请稍候
exportWordList(params).then(r => {
if (r.data.length != 0) {
const data = {
@@ -661,16 +675,22 @@ export default {
list: r.data
}
//模板文件位置在public文件夹里N
exportDocx('tool.docx', data, `tool.docx`)
exportDocx('tool.docx', data, `tool_${new Date().getTime()}.docx`)
setTimeout(() => {
if(self.batchExportFlag){
self.clearSelected()
}
self.wordLoading = false
self.exoportDrawerOpen = false;
}, 1000);
} else {
self.wordLoading = false
this.$message.error('没有数据');
}
}).catch((err) => {
console.error("err=============", err)
self.wordLoading = false
self.exoportDrawerOpen = false;
})
}
@@ -714,7 +734,7 @@ export default {
return
}
_this.$modal.confirm('删除后该流程待办任务将会被删除请谨慎操作是否确认执行')
_this.$modal.confirm('该流程待办任务将会被撤销请谨慎操作是否确认执行')
.then(async() => {
_this.loading = true
for (let row of list) {
@@ -733,13 +753,13 @@ export default {
}
await addTool(formData)
}
_this.$modal.msgSuccess("删除成功");
_this.$modal.msgSuccess("撤销成功");
_this.loading = false
_this.getList();
})
},
selectable(row,index){
return row.recordStatus==='draft'&&row.createBy==this.userInfo.userId
return row.recordStatus==='draft' && row.createBy == this.userInfo.userId
},
/** 关闭详情 **/
handleCloseDetail(){

View File

@@ -109,7 +109,7 @@
<div class="ltext">
<div class="nt"><span class="name">{{repItem.nickName}}</span><span class="time">{{ parseTime(repItem.createTime, '{y}-{m}-{d} {h}:{i}') }}</span></div>
<div class="te">{{repItem.content}}</div>
<!-- <div class="hb"><a class="btn" @click="toggleReplyFormSon(index,repIdex)"><i class="el-icon-chat-line-round"></i>回复</a></div>
<div class="hb"><a class="btn" @click="toggleReplyFormSon(index,repIdex)"><i class="el-icon-chat-line-round"></i>回复</a></div>
<div class="pltextarea" v-if="item.showReplyFormSon[repIdex]">
<el-input type="textarea" v-model="item.replyContentSon[repIdex]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
<div class="plbtn">
@@ -117,7 +117,7 @@
<el-divider direction="vertical"></el-divider>
<el-button @click="submitReplySon(index,repIdex, item)">发布</el-button>
</div>
</div>-->
</div>
</div>
</div>
</template>
@@ -477,15 +477,14 @@
});
self.cancelReplySon(parentIndex, repIndex)
self.getDiscussionsList()
// 清空回复内容并隐藏表单
this.$set(parentItem.replyContentSon, repIndex, '');
this.$set(parentItem.showReplyFormSon, repIndex, false);
}).catch(err =>{
console.error("submitReplySon==err==", err)
self.$modal.msgError("发布失败");
});
})
// 清空回复内容并隐藏表单
this.$set(parentItem.replyContentSon, repIndex, '');
this.$set(parentItem.showReplyFormSon, repIndex, false);
},
handleBeforeClose() {
this.viewDialogOpen = false