|
@@ -25,6 +25,7 @@
|
|
|
:key="index"
|
|
|
:title="item.state || item.label"
|
|
|
>
|
|
|
+ <!-- &&item.state !== '评论' -->
|
|
|
<template #description>
|
|
|
<!-- 判断是否有审核数据 -->
|
|
|
<template v-if="!item.create_time">
|
|
@@ -57,7 +58,6 @@
|
|
|
{{ item.assignUsers[0].username }}
|
|
|
</template>
|
|
|
{{ activeIndex == index ? `(审批中)` : null }}
|
|
|
- <!-- {{ item.assignUsers[0].username }}{{ activeIndex == index ? `(审批中)` : null }} -->
|
|
|
</template>
|
|
|
</p>
|
|
|
</template>
|
|
@@ -160,7 +160,7 @@
|
|
|
</div>
|
|
|
</el-card>
|
|
|
|
|
|
- <el-card class="box-card" style="margin-top: 15px;">
|
|
|
+ <el-card class="box-card" style="margin-top: 15px">
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span>表单信息</span>
|
|
|
<!-- {{ (currentNode.hideTpls!==undefined &&
|
|
@@ -191,7 +191,12 @@
|
|
|
</div>
|
|
|
<div v-if="processStructureValue.userAuthority && is_end == 0">
|
|
|
<hr
|
|
|
- style="background-color: #d9d9d9; border:0; height:1px; margin-bottom: 15px"
|
|
|
+ style="
|
|
|
+ background-color: #d9d9d9;
|
|
|
+ border: 0;
|
|
|
+ height: 1px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ "
|
|
|
/>
|
|
|
<el-form
|
|
|
ref="dataFrom"
|
|
@@ -215,7 +220,14 @@
|
|
|
show-word-limit
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <div class="text item" style="text-align: center;margin-top:18px">
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <Upload v-model="fileUrl" ref="upload" />
|
|
|
+ </el-form-item>
|
|
|
+ <div class="text item" style="text-align: center; margin-top: 18px">
|
|
|
+ <el-button round @click="handleCommit(endNodeDetail)"
|
|
|
+ >评论</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
round
|
|
@@ -279,11 +291,62 @@
|
|
|
<el-table-column prop="processor" label="处理人" />
|
|
|
<el-table-column prop="create_time" label="处理时间" />
|
|
|
<el-table-column prop="remarks" label="备注" />
|
|
|
+ <el-table-column label="图片">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.fileUrl.image &&
|
|
|
+ scope.row.fileUrl.image.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ style="width: 40px; height: 40px"
|
|
|
+ :src="scope.row.fileUrl.image[0]"
|
|
|
+ :preview-src-list="scope.row.fileUrl.image"
|
|
|
+ >
|
|
|
+ </el-image>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="附件" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.fileUrl.file && scope.row.fileUrl.file.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(uploadUrlItem, uploadUrlIndex) of scope.row.fileUrl
|
|
|
+ .file"
|
|
|
+ :key="uploadUrlIndex"
|
|
|
+ style="margin-bottom: 3px"
|
|
|
+ >
|
|
|
+ <i style="color: #909399;" class="el-icon-document" />
|
|
|
+ <span>{{ uploadUrlItem.name || uploadUrlItem.url }}</span>
|
|
|
+ <el-button
|
|
|
+ round
|
|
|
+ size="mini"
|
|
|
+ @click="onDownload(uploadUrlItem, 'download')"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ round
|
|
|
+ type="primary"
|
|
|
+ @click="onDownload(uploadUrlItem)"
|
|
|
+ v-if="checkFileSuffix(uploadUrlItem.url)"
|
|
|
+ size="mini"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <!-- <a :href="uploadUrlItem.url" target="_blank">{{ uploadUrlItem.name || uploadUrlItem.url }}</a> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
- <el-dialog title="转交工单" :visible.sync="dialogVisible" width="30%">
|
|
|
+ <el-dialog title="转交工单" :visible.sync="dialogVisible" width="40%">
|
|
|
<TransferInversion
|
|
|
v-if="dialogVisible"
|
|
|
:selectItem="selectItem"
|
|
@@ -295,6 +358,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import Upload from "./model/upload";
|
|
|
import Vue from "vue";
|
|
|
import { GenerateForm } from "@/components/VueFormMaking";
|
|
|
import "form-making/dist/FormMaking.css";
|
|
@@ -306,7 +370,8 @@ import {
|
|
|
activeOrder,
|
|
|
asyncPlayLog,
|
|
|
queryUserInfo,
|
|
|
- queryAllOrgan
|
|
|
+ queryAllOrgan,
|
|
|
+ orderComment
|
|
|
} from "@/api/process/work-order";
|
|
|
import store from "@/store";
|
|
|
import { getInfo } from "@/api/user";
|
|
@@ -318,7 +383,8 @@ import load from "@/utils/loading";
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
|
- TransferInversion
|
|
|
+ TransferInversion,
|
|
|
+ Upload
|
|
|
},
|
|
|
data() {
|
|
|
const query = this.$route.query;
|
|
@@ -335,6 +401,7 @@ export default {
|
|
|
dataList: {
|
|
|
remarks: "" // 备注信息
|
|
|
},
|
|
|
+ fileUrl: [],
|
|
|
userInfo: {},
|
|
|
alertMessage: "",
|
|
|
nodeStepList: [],
|
|
@@ -406,6 +473,86 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取学校列表
|
|
|
+ onDownload(item, type) {
|
|
|
+ if (type == "download") {
|
|
|
+ window.location.href = item.url;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ let urlArr = item.url.split(".");
|
|
|
+ let suffix = urlArr[urlArr.length - 1];
|
|
|
+ if (suffix != "pdf") {
|
|
|
+ this.previewUrl =
|
|
|
+ "https://view.officeapps.live.com/op/view.aspx?src=" + item.url;
|
|
|
+ window.open(this.previewUrl);
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.previewUrl =
|
|
|
+ this.validManageUrl() + "/pdf/web/viewer.html?file=" + item.url;
|
|
|
+ window.open(this.previewUrl);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 教务地址
|
|
|
+ validManageUrl() {
|
|
|
+ let url = window.location.href;
|
|
|
+ let returnUrl = "";
|
|
|
+ if (/dev/.test(url)) {
|
|
|
+ // dev 环境
|
|
|
+ returnUrl = "http://mandev.dayaedu.com";
|
|
|
+ } else if (/test/.test(url)) {
|
|
|
+ // dev 环境
|
|
|
+ returnUrl = "http://mantest.dayaedu.com";
|
|
|
+ } else if (/online/.test(url)) {
|
|
|
+ //线上
|
|
|
+ returnUrl = "https://manonline.dayaedu.com";
|
|
|
+ } else {
|
|
|
+ // 默认dev环境
|
|
|
+ returnUrl = "http://mandev.dayaedu.com";
|
|
|
+ }
|
|
|
+ return returnUrl;
|
|
|
+ },
|
|
|
+ checkFileSuffix(url) {
|
|
|
+ let urlArr = url.split(".");
|
|
|
+ let suffix = urlArr[urlArr.length - 1];
|
|
|
+ if (
|
|
|
+ suffix == "xlsx" ||
|
|
|
+ suffix == "xls" ||
|
|
|
+ suffix == "doc" ||
|
|
|
+ suffix == "docx" ||
|
|
|
+ suffix == "pdf"
|
|
|
+ ) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async handleCommit() {
|
|
|
+ try {
|
|
|
+ // orderComment
|
|
|
+ this.$refs["dataFrom"].validate(async _ => {
|
|
|
+ if (_) {
|
|
|
+ const res = await orderComment({
|
|
|
+ workOrderId: parseInt(this.workOrderId),
|
|
|
+ remarks: this.dataList.remarks,
|
|
|
+ fileUrl: JSON.stringify(this.fileUrl || [])
|
|
|
+ });
|
|
|
+ console.log(res, "res");
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("评论成功");
|
|
|
+ this.dataList.remarks = "";
|
|
|
+ this.fileUrl = [];
|
|
|
+ this.$refs.upload.onClear();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ },
|
|
|
async handleInversion() {
|
|
|
let workOrder = this.processStructureValue.workOrder;
|
|
|
this.selectItem.work_order_id = workOrder.id;
|
|
@@ -506,6 +653,24 @@ export default {
|
|
|
JSON.stringify(this.circulationHistoryList)
|
|
|
);
|
|
|
|
|
|
+ this.circulationHistoryList.forEach(item => {
|
|
|
+ const file = item.file_url ? JSON.parse(item.file_url) : [];
|
|
|
+
|
|
|
+ const tempFile = {
|
|
|
+ image: [],
|
|
|
+ file: []
|
|
|
+ };
|
|
|
+ file.forEach(item => {
|
|
|
+ if (item.type == "image") {
|
|
|
+ tempFile.image.push(item.url);
|
|
|
+ } else if (item.type == "file") {
|
|
|
+ tempFile.file.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ item.fileUrl = tempFile;
|
|
|
+ });
|
|
|
+ console.log(this.circulationHistoryList, "circulationHistoryList");
|
|
|
+
|
|
|
// 获取当前展示节点列表
|
|
|
// this.nodeStepList = this.processStructureValue.circulationHistory
|
|
|
|
|
@@ -588,7 +753,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
// console.log(this.nodeStepList);
|
|
|
- // console.log(this.circulationList);
|
|
|
+ console.log(this.circulationList, "this.circulationList");
|
|
|
|
|
|
// if(this.processStructureValue.nodes) {
|
|
|
// for (var i = 0; i < this.processStructureValue.nodes.length; i++) {
|
|
@@ -809,6 +974,7 @@ export default {
|
|
|
: parseInt(item.flowProperties),
|
|
|
work_order_id: parseInt(this.$route.query.workOrderId),
|
|
|
remarks: this.dataList.remarks,
|
|
|
+ fileUrl: JSON.stringify(this.fileUrl || []),
|
|
|
tpls: this.tpls
|
|
|
}).then(async response => {
|
|
|
if (response.code === 200) {
|