flx:修复bug

This commit is contained in:
Rain_ 2025-12-02 14:07:47 +08:00
parent 1c004d01b8
commit 64eaebcfd2
4 changed files with 721 additions and 392 deletions

View File

@ -1,16 +1,35 @@
[0530/113505.640:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0530/113508.674:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0530/141801.489:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0530/141801.943:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/090447.805:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/090447.874:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/090448.024:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/090501.978:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102708.924:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102709.538:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102709.919:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102717.919:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102845.212:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102845.248:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102846.198:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1014/102846.324:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0524/103228.221:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0530/171244.522:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/142712.385:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/142712.471:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/142712.525:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/142714.949:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[0929/142715.640:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142430.859:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142430.928:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142431.787:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142432.128:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142443.092:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142443.106:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142443.432:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1011/142450.819:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1013/155917.873:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1013/155917.907:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1013/155918.542:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1013/155919.231:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1016/115027.840:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1016/115027.926:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1016/115028.810:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1016/115028.968:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1020/142935.493:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1020/142935.527:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1020/142935.848:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1020/142936.229:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1022/140627.479:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1022/140627.514:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1022/140628.205:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1022/140628.872:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1201/183600.144:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1201/183600.190:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1201/183601.414:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)
[1201/183602.811:ERROR:registration_protocol_win.cc(108)] CreateFile: 系统找不到指定的文件。 (0x2)

File diff suppressed because it is too large Load Diff

View File

@ -29,9 +29,20 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="getList">{{ $t('message.energyManage.waybill.query') }}</el-button>
<el-button type="warning" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
<el-button v-permission="{ key: 'add', menuPath: '/project/safeSame/noticeAnnouncement' }" type="primary" size="medium" @click="add"
<el-button type="primary" plain @click="getList">{{
$t("message.energyManage.waybill.query")
}}</el-button>
<el-button type="warning" plain @click="refresh">{{
$t("message.deviceManage.refresh")
}}</el-button>
<el-button
v-permission="{
key: 'add',
menuPath: '/project/safeSame/noticeAnnouncement',
}"
type="primary"
size="medium"
@click="add"
>新增</el-button
>
</el-form-item>
@ -51,14 +62,25 @@
</template>
</el-table-column> -->
<el-table-column prop="title" align="center" label="标题"></el-table-column>
<el-table-column prop="issueDepartmentName" align="center" label="下发部门"></el-table-column>
<el-table-column prop="uploaderName" align="center" label="上传人"></el-table-column>
<el-table-column
prop="issueDepartmentName"
align="center"
label="下发部门"
></el-table-column>
<el-table-column
prop="uploaderName"
align="center"
label="上传人"
></el-table-column>
<el-table-column prop="uploadTime" align="center" label="时间"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<div class="tableBtns">
<div
v-permission="{ key: 'detail', menuPath: '/project/safeSame/noticeAnnouncement' }"
v-permission="{
key: 'detail',
menuPath: '/project/safeSame/noticeAnnouncement',
}"
class="operationText"
@click.stop="showDetailFn(scope.row)"
>
@ -66,7 +88,10 @@
<span>详情</span>
</div>
<div
v-permission="{ key: 'edit', menuPath: '/project/safeSame/noticeAnnouncement' }"
v-permission="{
key: 'edit',
menuPath: '/project/safeSame/noticeAnnouncement',
}"
@click.stop="edit(scope.row)"
class="operationText"
>
@ -74,7 +99,10 @@
<span>编辑</span>
</div>
<div
v-permission="{ key: 'delete', menuPath: '/project/safeSame/noticeAnnouncement' }"
v-permission="{
key: 'delete',
menuPath: '/project/safeSame/noticeAnnouncement',
}"
@click.stop="deleteDev(scope.row)"
class="operationText"
>
@ -98,7 +126,13 @@
></el-pagination>
</div>
<!-- 新增 -->
<el-dialog :modal-append-to-body="false" :title="title" :visible.sync="dialogShow" @close="close" class="dialog_w1200">
<el-dialog
:modal-append-to-body="false"
:title="title"
:visible.sync="dialogShow"
@close="close"
class="dialog_w1200"
>
<div class="dialog_content">
<el-form
class="flex_direction"
@ -110,7 +144,11 @@
:inline="true"
>
<el-form-item label="标题" prop="title">
<el-input v-model="addEditForm.title" class="w_1000" placeholder="请输入标题"></el-input>
<el-input
v-model="addEditForm.title"
class="w_1000"
placeholder="请输入标题"
></el-input>
</el-form-item>
<!-- <el-form-item label="合作单位" prop="enterpriseIds">
<el-select multiple v-model="addEditForm.enterpriseIds"
@ -133,8 +171,12 @@
</quill-editor>
</el-form-item>
<el-form-item label="配置" prop="showHome">
<el-switch v-model="addEditForm.showHome" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
{{ addEditForm.showHome ? '首页显示' : '专题页显示' }}
<el-switch
v-model="addEditForm.showHome"
active-color="#13ce66"
inactive-color="#ff4949"
></el-switch>
{{ addEditForm.showHome ? "首页显示" : "专题页显示" }}
</el-form-item>
<el-form-item label="下发部门" prop="issueDepartment">
<el-select-v2
@ -164,52 +206,93 @@
</el-upload>
</el-form-item>
<el-form-item label="时间" prop="uploadTime">
<el-date-picker v-model="addEditForm.uploadTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
<el-date-picker
v-model="addEditForm.uploadTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
>
</el-date-picker>
</el-form-item>
</el-form>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium">取消 </el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium">确认 </el-button>
<el-button
class="cancleBtn"
@click="dialogShow = false"
icon="el-icon-circle-close"
size="medium"
>取消
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="submit"
size="medium"
>确认
</el-button>
</div>
</div>
</el-dialog>
<!-- 详情 -->
<el-dialog :modal-append-to-body="false" title="详情" :visible.sync="dialogContent" class="dialog_w1200">
<el-dialog
:modal-append-to-body="false"
title="详情"
:visible.sync="dialogContent"
class="dialog_w1200"
>
<div class="p_10_80">
<h1 style="text-align: center">{{ detailData.title }}</h1>
<div class="detailHeader">
<span>{{ detailData.uploadTime }}</span>
</div>
<div class="detailContent">
<div class="ql-editor" style="white-space: pre-wrap" v-html="detailData.content"></div>
<div
class="ql-editor"
style="white-space: pre-wrap"
v-html="detailData.content"
></div>
<div class="preview_box" v-for="item in detailData.fileUrl" :key="item.uid">
<el-image :src="setFileImg(item)" />
<span class="download" @click="handlePreview(item)">{{ item.name }}</span>
</div>
</div>
<div class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="dialogContent = false" size="medium">确认 </el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="dialogContent = false"
size="medium"
>确认
</el-button>
</div>
</div>
</el-dialog>
<RoutingPopup v-if="routingInfo.routFlag" @fatherMethodRout="fatherMethodRout" :routingInfo="routingInfo" />
<RoutingPopup
v-if="routingInfo.routFlag"
@fatherMethodRout="fatherMethodRout"
:routingInfo="routingInfo"
/>
</div>
</template>
<script>
import VueQuillEditor from 'vue-quill-editor';
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import { getHomeNoticePageApi, addHomeNoticeConfigApi, editHomeNoticeConfigApi, deleteHomeNoticeConfigApi } from '@/assets/js/api/configManage';
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js';
import { getCooperatorListApi } from '@/assets/js/api/cooperationUnit';
import { isJSON } from '@/util/nowDate';
import dayjs from 'dayjs';
import { encode } from 'js-base64';
import VueQuillEditor from "vue-quill-editor";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import {
getHomeNoticePageApi,
addHomeNoticeConfigApi,
editHomeNoticeConfigApi,
deleteHomeNoticeConfigApi,
} from "@/assets/js/api/configManage";
import { getDictionaryItemApi } from "@/assets/js/api/companyDiagram.js";
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
import { isJSON } from "@/util/nowDate";
import dayjs from "dayjs";
import { encode } from "js-base64";
export default {
components: {
VueQuillEditor
VueQuillEditor,
},
mounted() {
this.getDepartmentNoticeList();
@ -220,88 +303,88 @@ export default {
return {
routingInfo: {
routFlag: false,
routName: ''
routName: "",
},
pagInfo: {
pageNo: 1, //
pageSize: 10, //
total: 0 //
total: 0, //
},
detailData: {},
dialogContent: false,
current: -1,
title: '',
title: "",
dialogShow: false,
List: [],
addEditForm: {
title: '',
content: '',
file: '',
uploader: '',
title: "",
content: "",
file: "",
uploader: "",
showHome: false,
issueDepartment: '1',
uploadTime: '',
enterpriseIds: []
issueDepartment: "1",
uploadTime: "",
enterpriseIds: [],
},
addEditRules: {
title: [
{
required: true,
message: '必填',
trigger: 'blur'
}
message: "必填",
trigger: "blur",
},
],
content: [
{
required: true,
message: '必填',
trigger: 'blur'
}
message: "必填",
trigger: "blur",
},
],
enterpriseIds: [
{
required: true,
message: '必选',
trigger: 'change'
}
]
message: "必选",
trigger: "change",
},
],
},
searchForm: {
title: '',
time: '',
issueDepartment: '',
currentMonthStart: '',
currentMonthEnd: ''
title: "",
time: "",
issueDepartment: "",
currentMonthStart: "",
currentMonthEnd: "",
},
fileUplodList: [],
editorOption: {
modules: {
toolbar: [
['bold', 'italic', 'underline', 'strike'], //线线
['blockquote', 'code-block'], //
["bold", "italic", "underline", "strike"], //线线
["blockquote", "code-block"], //
[{ header: 1 }, { header: 2 }], // 12
[{ list: 'ordered' }, { list: 'bullet' }], //
[{ script: 'sub' }, { script: 'super' }], //
[{ indent: '-1' }, { indent: '+1' }], //
[{ direction: 'rtl' }], //
[{ list: "ordered" }, { list: "bullet" }], //
[{ script: "sub" }, { script: "super" }], //
[{ indent: "-1" }, { indent: "+1" }], //
[{ direction: "rtl" }], //
[{ size: ['small', false, 'large', 'huge'] }], //
[{ size: ["small", false, "large", "huge"] }], //
[{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], //
[{ font: [] }], //
[{ align: [] }], //
['clean'], //
['image'] //
]
["clean"], //
["image"], //
],
},
theme: 'snow'
theme: "snow",
},
cooperatorList: [],
whichModule: 2,
departmentNoticeList: []
departmentNoticeList: [],
};
},
methods: {
@ -310,10 +393,10 @@ export default {
let data = {
projectSn: this.$store.state.projectSn,
pageNo: 1,
pageSize: -1
pageSize: -1,
// enterpriseTypeId: this.enterpriseTypeSelectId,
};
getCooperatorListApi(data).then(res => {
getCooperatorListApi(data).then((res) => {
if (res.code == 200) {
this.cooperatorList = res.result.records;
}
@ -336,33 +419,35 @@ export default {
this.dialogContent = true;
},
handleExceed() {
this.$message.warning('文件超出最大限制,请删除上份文件!');
this.$message.warning("文件超出最大限制,请删除上份文件!");
},
//
handleRemove(file, fileList) {
this.fileUplodList = fileList;
},
handleSuccess(res, file, type) {
if (res.status == 'SUCCESS') {
if (res.status == "SUCCESS") {
this.fileUplodList.push({
name: file.name,
url: this.$store.state.FILEURL + file.response.data[0].imageUrl
url: this.$store.state.FILEURL + file.response.data[0].imageUrl,
});
}
},
//
handlePreview(row) {
console.log(row);
const url = row.url.includes('http://') ? row.url : this.$store.state.FILEURL + row.url;
const url = row.url.includes("http://")
? row.url
: this.$store.state.FILEURL + row.url;
let src = encode(url);
window.open(`${this.$store.state.PREVIEWURL}?url=${encodeURIComponent(src)}`);
},
setFileImg(row) {
const extendName = row.name.substring(row.name.lastIndexOf('.') + 1).toLowerCase();
const extendName = row.name.substring(row.name.lastIndexOf(".") + 1).toLowerCase();
if (!this.$store.state.fileImgTypeList.includes(extendName)) {
//
return this.$store.state.fileImgMap.unknown;
} else if (['jpg', 'png', 'jpeg', 'gif'].includes(extendName)) {
} else if (["jpg", "png", "jpeg", "gif"].includes(extendName)) {
//
return row.url;
} else {
@ -371,8 +456,12 @@ export default {
}
},
isStartOrEndMonth(event) {
this.searchForm.currentMonthStart = dayjs(this.searchForm.time[0]).format('YYYY-MM-DD');
this.searchForm.currentMonthEnd = dayjs(this.searchForm.time[1]).format('YYYY-MM-DD');
this.searchForm.currentMonthStart = dayjs(this.searchForm.time[0]).format(
"YYYY-MM-DD"
);
this.searchForm.currentMonthEnd = dayjs(this.searchForm.time[1]).format(
"YYYY-MM-DD"
);
},
//
getList() {
@ -385,8 +474,8 @@ export default {
uploadTime_end: this.searchForm.currentMonthEnd,
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
whichModule: this.whichModule
}).then(result => {
whichModule: this.whichModule,
}).then((result) => {
if (result.success) {
// result.result.records.map(item => {
// if (item.file.includes('[')) {
@ -403,22 +492,25 @@ export default {
// }
// }
// });
this.List = result.result.records.map(item => {
this.List = result.result.records.map((item) => {
return {
...item,
fileUrl: isJSON(item.fileUrl) && JSON.parse(item.fileUrl) instanceof Array ? JSON.parse(item.fileUrl) : []
fileUrl:
isJSON(item.fileUrl) && JSON.parse(item.fileUrl) instanceof Array
? JSON.parse(item.fileUrl)
: [],
};
});
this.pagInfo.total = result.result.total;
console.log(' this.List', this.List);
console.log(" this.List", this.List);
}
});
},
//
getDepartmentNoticeList() {
getDictionaryItemApi({
dictionaryEncoding: 'project_home_notice_department'
}).then(res => {
dictionaryEncoding: "project_home_notice_department",
}).then((res) => {
if (res.result.length > 0) {
this.departmentNoticeList = res.result;
}
@ -426,7 +518,7 @@ export default {
},
linkRouteWorkSpace() {
this.routingInfo.routFlag = true;
this.routingInfo.routName = '安全待办通知公告';
this.routingInfo.routName = "安全待办通知公告";
},
fatherMethodRout() {
this.routingInfo.routFlag = false;
@ -436,14 +528,14 @@ export default {
this.linkRouteWorkSpace();
return;
}
this.title = '新增';
this.title = "新增";
this.dialogShow = true;
this.fileUplodList = [];
this.close();
},
edit(obj) {
this.title = '编辑';
this.title = "编辑";
this.dialogShow = true;
this.addEditForm = JSON.parse(JSON.stringify(obj));
// this.addEditForm.enterpriseIds = obj.enterpriseIds.split(",");
@ -461,17 +553,17 @@ export default {
params.fileUrl = JSON.stringify(this.fileUplodList);
params.showHome = params.showHome ? 1 : 2;
// params.enterpriseIds = params.enterpriseIds.join(",");
this.$refs.addEditForm.validate(valid => {
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.title == '新增') {
addHomeNoticeConfigApi(params).then(result => {
if (this.title == "新增") {
addHomeNoticeConfigApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message);
this.getList();
}
});
} else if (this.title == '编辑') {
editHomeNoticeConfigApi(params).then(result => {
} else if (this.title == "编辑") {
editHomeNoticeConfigApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message);
this.getList();
@ -485,31 +577,31 @@ export default {
});
},
deleteDev(obj) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteHomeNoticeConfigApi({ id: obj.id }).then(res => {
deleteHomeNoticeConfigApi({ id: obj.id }).then((res) => {
if (res.success) {
this.getList();
this.$message({
type: 'success',
message: '删除成功!'
type: "success",
message: "删除成功!",
});
} else {
this.$message({
type: 'error',
message: res.message
type: "error",
message: res.message,
});
}
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
type: "info",
message: "已取消删除",
});
});
},
@ -517,14 +609,14 @@ export default {
close() {
this.fileUplodList = [];
this.addEditForm = {
title: '',
content: '',
fileUrl: '',
title: "",
content: "",
fileUrl: "",
uploader: this.$store.state.userInfo.userId,
showHome: false,
issueDepartment: '1',
uploadTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
enterpriseIds: []
issueDepartment: "1",
uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
enterpriseIds: [],
};
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate();
@ -540,13 +632,13 @@ export default {
},
refresh() {
this.searchForm = {};
this.searchForm.currentMonthStart = '';
this.searchForm.currentMonthEnd = '';
this.searchForm.currentMonthStart = "";
this.searchForm.currentMonthEnd = "";
this.pagInfo.pageNo = 1; //
this.pagInfo.pageSize = 10; //
this.getList();
}
}
},
},
};
</script>
<style lang="less" scoped>

View File

@ -32,7 +32,12 @@
<span style="margin-left: 5px">{{ scope.row.processDefName }}</span>
</template>
</el-table-column> -->
<el-table-column prop="formAbstracts" show-overflow-tooltip label="摘要信息" min-width="110px">
<el-table-column
prop="formAbstracts"
show-overflow-tooltip
label="摘要信息"
min-width="110px"
>
<template slot-scope="scope">
<form-abstracts :value="scope.row.formAbstracts" />
</template>
@ -47,14 +52,39 @@
{{ scope.row.staterUser?.roleName }}
</template>
</el-table-column> -->
<el-table-column prop="staterUser" show-overflow-tooltip label="发起人" min-width="100px">
<el-table-column
prop="staterUser"
show-overflow-tooltip
label="发起人"
min-width="100px"
>
<template slot-scope="scope">
<avatar v-if="scope.row.staterUser" :size="35" :name="scope.row.staterUser?.name" :src="$getRes(scope.row.staterUser?.avatar)" />
<avatar v-else-if="scope.row.owner" :size="35" :name="scope.row.owner?.name" :src="$getRes(scope.row.owner?.avatar)" />
<avatar
v-if="scope.row.staterUser"
:size="35"
:name="scope.row.staterUser?.name"
:src="$getRes(scope.row.staterUser?.avatar)"
/>
<avatar
v-else-if="scope.row.owner"
:size="35"
:name="scope.row.owner?.name"
:src="$getRes(scope.row.owner?.avatar)"
/>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="startTime" label="提交时间" min-width="120px"></el-table-column>
<el-table-column show-overflow-tooltip prop="finishTime" label="结束时间" min-width="120px"></el-table-column>
<el-table-column
show-overflow-tooltip
prop="startTime"
label="提交时间"
min-width="120px"
></el-table-column>
<el-table-column
show-overflow-tooltip
prop="finishTime"
label="结束时间"
min-width="120px"
></el-table-column>
<el-table-column show-overflow-tooltip prop="taskName" label="当前节点" />
<el-table-column prop="status" label="审批状态">
<template slot-scope="scope">
@ -83,7 +113,13 @@
></el-pagination>
</div>
</div>
<el-drawer v-drawerDrag :size="isMobile ? '100%' : '500px'" direction="rtl" title="审批详情" :visible.sync="processVisible">
<el-drawer
v-drawerDrag
:size="isMobile ? '100%' : '500px'"
direction="rtl"
title="审批详情"
:visible.sync="processVisible"
>
<instance-preview
v-if="processVisible"
:instance-id="selectInstance.instanceId"
@ -118,35 +154,39 @@
</template>
<script>
import taskApi from '@/assets/js/api/workSpace/api/processTask';
import moment from 'moment';
import InstancePreview from '@/components/workSpace/common/approval/ProcessInstancePreview';
import InitiateProcess from '@/components/workSpace/common/InitiateProcess';
import { getProcTag } from '@/util/ProcessUtil';
import FormAbstracts from '@/views/workSpace/FormAbstracts.vue';
import { getModelById, isWorkerAdmissionCheckParam, isProjectEnterpriseFlowCheckParam } from '@/assets/js/api/workSpace/api/modelGroup';
import InstanceSearch from '@/components/workSpace/common/InstanceSearch.vue';
import { verifyFormInfo } from '@/util/tool';
import taskApi from "@/assets/js/api/workSpace/api/processTask";
import moment from "moment";
import InstancePreview from "@/components/workSpace/common/approval/ProcessInstancePreview";
import InitiateProcess from "@/components/workSpace/common/InitiateProcess";
import { getProcTag } from "@/util/ProcessUtil";
import FormAbstracts from "@/views/workSpace/FormAbstracts.vue";
import {
getModelById,
isWorkerAdmissionCheckParam,
isProjectEnterpriseFlowCheckParam,
} from "@/assets/js/api/workSpace/api/modelGroup";
import InstanceSearch from "@/components/workSpace/common/InstanceSearch.vue";
import { verifyFormInfo } from "@/util/tool";
export default {
name: 'MySubmit',
name: "MySubmit",
components: { FormAbstracts, InstancePreview, InitiateProcess, InstanceSearch },
data() {
return {
projectName: '',
projectName: "",
selectGroupDialog: false,
total: 0,
params: {
pageSize: 10,
pageNo: 1,
// finished: null,
code: 'wf6826ae584f0ce06cbe0c5221',
code: "wf6826ae584f0ce06cbe0c5221",
// eslint-disable-next-line no-dupe-keys
finished: null,
startTimes: '',
startUser: '',
keyInfo: '',
customStatus: ''
startTimes: "",
startUser: "",
keyInfo: "",
customStatus: "",
},
openItemDl: false,
selectInstance: {},
@ -158,78 +198,81 @@ export default {
{
id: 1,
value: null,
label: '状态-全部'
label: "状态-全部",
},
{
id: 2,
value: false,
label: '状态-进行中'
label: "状态-进行中",
},
{
id: 3,
value: true,
label: '状态-已结束'
}
label: "状态-已结束",
},
],
customStatusList: [
{
id: 1,
label: '状态-全部'
label: "状态-全部",
},
{
id: 3,
label: '状态-进行中'
label: "状态-进行中",
},
{
id: 4,
label: '状态-被撤销'
label: "状态-被撤销",
},
{
id: 5,
label: '状态-被驳回'
}
label: "状态-被驳回",
},
],
isAddFlag: false
isAddFlag: false,
};
},
computed: {
isMobile() {
return window.screen.width < 450;
}
},
},
mounted() {
if (this.$route.query.customStatus == 1) {
this.customStatusList = [
{
id: 1,
label: '状态-全部'
label: "状态-全部",
},
{
id: 3,
label: '状态-进行中'
label: "状态-进行中",
},
{
id: 4,
label: '状态-被撤销'
label: "状态-被撤销",
},
{
id: 5,
label: '状态-被驳回'
}
label: "状态-被驳回",
},
];
} else if (this.$route.query.customStatus == 2) {
this.customStatusList = [
{
id: 2,
label: '状态-全部'
}
label: "状态-全部",
},
];
}
this.params.customStatus = this.$route.query.customStatus;
this.getSubmittedList();
},
created() {
this.isAddFlag = this.checkPermission({ key: 'add', menuPath: '/project/safeSame/noticeAnnouncementApply' });
this.isAddFlag = this.checkPermission({
key: "add",
menuPath: "/project/safeSame/noticeAnnouncementApply",
});
},
methods: {
getProcTag,
@ -242,11 +285,14 @@ export default {
taskApi
.getUserSubmittedList({
...this.params,
startTimes: this.params.startTimes && this.params.startTimes.length > 0 ? this.params.startTimes.join(',') : '',
key: this.params.keyInfo
startTimes:
this.params.startTimes && this.params.startTimes.length > 0
? this.params.startTimes.join(",")
: "",
key: this.params.keyInfo,
// customStatus: this.$route.query.customStatus,
})
.then(rsp => {
.then((rsp) => {
this.loading = false;
this.total = +rsp.data.total;
this.dataList = rsp.data.records;
@ -258,15 +304,15 @@ export default {
reSubmit(row) {
this.selectInstance = row;
getModelById(this.selectInstance.formId)
.then(rsp => {
.then((rsp) => {
if (rsp.data.code && rsp.data.code != 200) {
this.$message.error(rsp.data.message);
} else {
this.openItemDl = true;
}
})
.catch(err => {
this.$err(err, '获取流程模型失败');
.catch((err) => {
this.$err(err, "获取流程模型失败");
});
// this.openItemDl = true
if (this.isMobile) {
@ -274,38 +320,54 @@ export default {
}
},
submitForm() {
const verifyFlag = verifyFormInfo(this.$refs.processForm.form.formItems, this.$refs.processForm.formData);
const verifyFlag = verifyFormInfo(
this.$refs.processForm.form.formItems,
this.$refs.processForm.formData
);
console.log(112233, verifyFlag);
if (!verifyFlag) return this.$message.warning('请完善表单信息😥');
if (!verifyFlag) return this.$message.warning("请完善表单信息😥");
this.$refs.processForm.validate((validForm, validProcess) => {
if (!this.isMobile) {
if (validForm && validProcess) {
console.log(11111111111, this.$refs.processForm, this.$refs.processForm.form.formItems, this.selectInstance.processDefName);
console.log(
11111111111,
this.$refs.processForm,
this.$refs.processForm.form.formItems,
this.selectInstance.processDefName
);
const find = this.$refs.processForm.form.formItems.find(
item => item.title == '明细表' && this.selectInstance.processDefName.includes('人员入场')
(item) =>
item.title == "明细表" &&
this.selectInstance.processDefName.includes("人员入场")
);
if (find && this.$refs.processForm.formData[find.id]) {
const findNum = find.props.columns.find(item => item.title == '编号');
const findName = find.props.columns.find(item => item.title == '姓名');
const idCrad = find.props.columns.find(item => item.title == '身份证号');
const findNum = find.props.columns.find((item) => item.title == "编号");
const findName = find.props.columns.find((item) => item.title == "姓名");
const idCrad = find.props.columns.find((item) => item.title == "身份证号");
const newNumList = this.$refs.processForm.formData[find.id].map(item => item[findNum.id]);
const newNameList = this.$refs.processForm.formData[find.id].map(item => item[findName.id]);
const idCardList = this.$refs.processForm.formData[find.id].map(item => item[idCrad.id]);
const newNumList = this.$refs.processForm.formData[find.id].map(
(item) => item[findNum.id]
);
const newNameList = this.$refs.processForm.formData[find.id].map(
(item) => item[findName.id]
);
const idCardList = this.$refs.processForm.formData[find.id].map(
(item) => item[idCrad.id]
);
// console.log(find, JSON.parse(sessionStorage.getItem('loginUser')));
// console.log(newNumList);
isWorkerAdmissionCheckParam({
projectSn: JSON.parse(sessionStorage.getItem('loginUser')).sn,
projectSn: JSON.parse(sessionStorage.getItem("loginUser")).sn,
tableList: this.$refs.processForm.formData[find.id],
numList: newNumList,
idCardList: idCardList,
nameList: newNameList
nameList: newNameList,
// carNumber: this.$refs.processForm.formData[find.id],
// userId:JSON.parse(sessionStorage.getItem('loginUser')).userId,
// reserveEndTime: this.$refs.processForm.formData[findEnd.id],
// reserveStartTime:this.$refs.processForm.formData[findStart.id],
}).then(res => {
}).then((res) => {
console.log(res.data);
if (res.data.success) {
this.$refs.processForm.submit();
@ -313,11 +375,11 @@ export default {
this.$message.warning(res.data.message);
}
});
} else if (this.selectInstance.processDefName.includes('承包商入场')) {
} else if (this.selectInstance.processDefName.includes("承包商入场")) {
isProjectEnterpriseFlowCheckParam({
...this.$refs.processForm.formData,
projectSn: JSON.parse(sessionStorage.getItem('loginUser')).sn
}).then(res => {
projectSn: JSON.parse(sessionStorage.getItem("loginUser")).sn,
}).then((res) => {
console.log(res.data);
if (res.data.success) {
this.$refs.processForm.submit();
@ -329,7 +391,7 @@ export default {
this.$refs.processForm.submit();
}
} else {
this.$message.warning('请完善表单/流程选项😥');
this.$message.warning("请完善表单/流程选项😥");
}
}
});
@ -339,22 +401,24 @@ export default {
this.selectInstance = row;
},
getDuration(row) {
let end = this.$isNotEmpty(row.finishTime) ? row.finishTime : moment().format('YYYY-MM-DD HH:mm:ss');
let end = this.$isNotEmpty(row.finishTime)
? row.finishTime
: moment().format("YYYY-MM-DD HH:mm:ss");
return this.$timeCoverStr(row.startTime, end);
},
handlerAfter() {
this.processVisible = false;
this.getSubmittedList();
}
},
},
watch: {
params: {
deep: true,
handler() {
this.getSubmittedList();
}
}
}
},
},
},
};
</script>