|
@@ -51,7 +51,47 @@
|
|
|
</el-steps>
|
|
|
</div>
|
|
|
<div class="stepsInfoBox">
|
|
|
+ <!-- 流程明细文字描述 -->
|
|
|
<div>{{ stepsList[stepsIndex - 1].info.text }}</div>
|
|
|
+ <!-- 流程明细文件预览(通知和报告会用到文件预览) -->
|
|
|
+ <!-- <div ref="fileView" v-show="fileView"></div> -->
|
|
|
+ <FilePreView ref="filePreview" v-show="fileView" />
|
|
|
+ <!-- 流程明细-实施列表 -->
|
|
|
+ <div v-if="stepsList[stepsIndex - 1].info.infos">
|
|
|
+ <div v-for="item in stepsList[stepsIndex - 1].info.infos" :key="item.id" style="padding-bottom: 1rem">
|
|
|
+ <span>{{ item.title }}</span
|
|
|
+ ><el-button size="mini" type="primary" class="infoBut" style="margin-left: 2rem" @click="getInfoById(item.id)"
|
|
|
+ >查看详情</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 流程明细-整改表格 -->
|
|
|
+ <div v-if="stepsList[stepsIndex - 1].info.tableData">
|
|
|
+ <div class="flexBox">
|
|
|
+ <div v-for="(value, key) in stepsList[stepsIndex - 1].info.props" :key="key">
|
|
|
+ <div class="tableTitle">{{ value }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in stepsList[stepsIndex - 1].info.tableData"
|
|
|
+ :key="item.id"
|
|
|
+ class="flexBox"
|
|
|
+ style="padding: 0.5rem 0"
|
|
|
+ >
|
|
|
+ <div v-for="(value, key) in stepsList[stepsIndex - 1].info.props" :key="key">
|
|
|
+ <span v-if="key != 'opt'">{{ stepsList[stepsIndex - 1].info.tableData[index][key] }}</span>
|
|
|
+ <el-button
|
|
|
+ v-else
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ class="infoBut"
|
|
|
+ @click="getInfoById(stepsList[stepsIndex - 1].info.tableData[index].id)"
|
|
|
+ >
|
|
|
+ 查看详情
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -63,22 +103,41 @@
|
|
|
* @author: LiuMengxiang
|
|
|
* @Date: 2022年11月21-25日
|
|
|
*/
|
|
|
+import FilePreView from "./FilePreView.vue";
|
|
|
export default {
|
|
|
name: "StepsMyBox",
|
|
|
+ components: { FilePreView },
|
|
|
data() {
|
|
|
return {
|
|
|
// 当前或默认选中的步骤条下标加一
|
|
|
stepsIndex: 1,
|
|
|
+ // 是否显示在线文档预览
|
|
|
+ fileView: false,
|
|
|
// 步骤条列表
|
|
|
stepsList: [
|
|
|
{ title: "立项", info: { text: "2018-05-12 2018年张江基本农田审计项目通过立项" } },
|
|
|
{
|
|
|
title: "通知",
|
|
|
- info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "" }
|
|
|
+ // info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "/upload/20221031/20221031100727BCH5OSMr.jpg" }
|
|
|
+ info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "./static/word/test.pdf" }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "实施",
|
|
|
+ info: {
|
|
|
+ infos: [
|
|
|
+ { title: "用户A 完成张江镇xxx片区的审计", id: "001" },
|
|
|
+ { title: "用户B 完成张江镇xxx片区的审计", id: "002" },
|
|
|
+ { title: "用户C 完成张江镇xxx片区的审计", id: "003" }
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
- { title: "实施", info: { infos: [{ title: "用户A 完成张江镇xxx片区的审计", id: "001" }] } },
|
|
|
{
|
|
|
title: "报告",
|
|
|
+ // info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "/upload/20221128/20221128230553I6Nf00TN.docx" }
|
|
|
+ info: { text: "2018年张江基本农田审计项目审计通知书.docx", filePath: "./static/word/test.docx" }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "整改",
|
|
|
info: {
|
|
|
tableData: [
|
|
|
{
|
|
@@ -99,10 +158,10 @@ export default {
|
|
|
status: "已完成",
|
|
|
endTime: "2023-01-12"
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ props: { desc: "问题描述", status: "当前状态", endTime: "整改期限", opt: "操作" }
|
|
|
}
|
|
|
- },
|
|
|
- { title: "整改", info: { text: "2018-05-12 2018年张江基本农田审计项目通过立项" } }
|
|
|
+ }
|
|
|
]
|
|
|
};
|
|
|
},
|
|
@@ -110,6 +169,10 @@ export default {
|
|
|
mounted() {},
|
|
|
watch: {},
|
|
|
methods: {
|
|
|
+ // 流程管理【实施】节点,根据id查看详情
|
|
|
+ getInfoById(id) {
|
|
|
+ console.log("流程管理【实施】节点,根据id查看详情id:", id);
|
|
|
+ },
|
|
|
// 返回上级
|
|
|
backEvent() {
|
|
|
this.$emit("hideStepsMyBoxState");
|
|
@@ -117,6 +180,15 @@ export default {
|
|
|
// 切换步骤条
|
|
|
changeStepsIndex(index) {
|
|
|
this.stepsIndex = index;
|
|
|
+ if (this.fileView) {
|
|
|
+ this.$refs.filePreview.cancel();
|
|
|
+ this.fileView = false;
|
|
|
+ }
|
|
|
+ // 判断流程明细是否存在文件,存在的话自动请求文件并渲染
|
|
|
+ if (this.stepsList[this.stepsIndex - 1].info.filePath) {
|
|
|
+ this.fileView = true;
|
|
|
+ this.$refs.filePreview.showView(this.stepsList[this.stepsIndex - 1].info.filePath);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -202,6 +274,25 @@ export default {
|
|
|
font-family: pingfangSC;
|
|
|
line-height: 30px;
|
|
|
color: #ffffff;
|
|
|
+ .flexBox {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ align-items: center;
|
|
|
+ align-content: space-around;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ flex-direction: row;
|
|
|
+ .tableTitle {
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: pingfangSC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #4dc3ff;
|
|
|
+ padding-bottom: 0.5rem;
|
|
|
+ }
|
|
|
+ & > div {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|