1. 导出 2.待办记录 3. 修改bug

main
赵培友 3 years ago
parent cf1bd87e50
commit ce273859c5
  1. 9
      src/api/plugin/workflow/workorder.js
  2. 2
      src/const/maintenance/task.js
  3. 2
      src/const/workflow/workorder.js
  4. 4
      src/page/index/top/index.vue
  5. 4
      src/styles/custom/custom.scss
  6. 5
      src/views/journal/index.vue
  7. 22
      src/views/maintenance/system.vue
  8. 16
      src/views/maintenance/task.vue
  9. 17
      src/views/plugin/workflow/mixins/ex-form.js
  10. 2
      src/views/plugin/workflow/process/components/detail.vue
  11. 2
      src/views/plugin/workflow/process/components/examForm.vue
  12. 31
      src/views/plugin/workflow/process/components/form.vue
  13. 40
      src/views/plugin/workflow/process/workorder.vue
  14. 54
      src/views/system/user.vue
  15. 2
      src/views/wel/index.vue

@ -23,4 +23,13 @@ export const conditionalData = (query) => {
method: 'get',
params:query
})
}
// 导出
export const exportExcel = (query) => {
return request({
url: `${prefix}/exportExcel`,
method: 'get',
params:query,
responseType: 'blob'
})
}

@ -18,7 +18,7 @@ export const tableOption = {
columnBtn: false,
refreshBtn: false,
header: false,
menuWidth:220,
menuWidth:120,
dialogCustomClass:"custom",
column: [
{

@ -59,7 +59,7 @@ export const tableOption = {
{
type: "input",
label: "运维公司",
prop: "currentResponsiblePerson",
prop: "yunweigongsi",
align: "left",
overHidden: true,
},

@ -4,7 +4,7 @@
{{ tag.label === "首页" ? "数据看板" : tag.label }}
</div>
<div class="top-right">
<el-tooltip
<!-- <el-tooltip
effect="dark"
:content="$t('navbar.notice')"
placement="bottom"
@ -12,7 +12,7 @@
<div class="top-bar__item top-bar__item--show">
<top-notice></top-notice>
</div>
</el-tooltip>
</el-tooltip> -->
<div class="avatar">
<img :src="userInfo.avatar" alt="" width="56px" height="56px" />
</div>

@ -128,3 +128,7 @@
display: none;
}
}
// 查看表单
.avue--detail .el-col-7 {
width: 33.3%;
}

@ -2,7 +2,7 @@
<div class="cus-container">
<el-form :model="searchForm">
<div class="search">
<div style="display: flex; align-items: center">
<div>
<el-select
v-model="searchForm.createBy"
placeholder="用户"
@ -53,14 +53,12 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<div style="display: flex">
<el-button class="search-btn" @click="searchHandle(1)"
>查询</el-button
>
<div class="search-reset" @click="searchHandle(2)">
<i class="el-icon-refresh-right" style="font-size: 20px"></i>
</div>
</div>
</div>
</div>
</el-form>
@ -193,6 +191,7 @@ export default {
margin-right: 20px;
}
.search-reset {
display:inline-block;
width: 46px;
height: 44px !important;
background: #ff9130;

@ -2,7 +2,6 @@
<div class="cus-container">
<el-form :model="searchForm">
<div class="search">
<div style="display: flex; align-items: center">
<el-select
v-model="searchForm.projectInfoId"
placeholder="系统名称"
@ -37,7 +36,7 @@
<el-option
v-for="item in deptsList"
:key="item.id"
:label="item.fullName"
:label="item.deptName"
:value="item.id"
>
</el-option>
@ -55,25 +54,20 @@
>
</el-option>
</el-select>
<div style="display: flex">
<el-button class="search-btn" @click="searchHandle(1)"
>查询</el-button
>
<div class="search-reset" @click="searchHandle(2)">
<i class="el-icon-refresh-right" style="font-size: 20px"></i>
</div>
</div>
</div>
<div style="display: flex">
<el-button
<div>
<el-button
class="search-btn"
style="margin: 0; background: #2ee27c"
style="margin: 0; background: #2ee27c;"
@click="addHandle"
>新增</el-button
>
</div>
</div>
</div>
</el-form>
<div style="margin-top: 30px">
@ -269,8 +263,9 @@ export default {
</script>
<style lang="scss" scoped>
.search {
display: flex;
justify-content: space-between;
border:1px solid red;
display:flex;
}
.search-select {
width: 150px;
@ -287,6 +282,7 @@ export default {
margin: 0 20px;
}
.search-reset {
display:inline-block;
width: 46px;
height: 44px !important;
background: #ff9130;

@ -2,7 +2,7 @@
<div class="cus-container">
<el-form :model="searchForm">
<div class="search">
<div style="display: flex; align-items: center">
<div >
<el-select
v-model="searchForm.taskParentId"
placeholder="任务父类"
@ -58,25 +58,20 @@
placeholder="请输入创建人"
class="search-input"
></el-input>
<div style="display: flex">
<el-button class="search-btn" @click="searchHandle(1)"
>查询</el-button
>
<div class="search-reset" @click="searchHandle(2)">
<i class="el-icon-refresh-right" style="font-size: 20px"></i>
</div>
</div>
</div>
<div style="display: flex">
<el-button
<el-button
class="search-btn"
style="margin: 0; background: #2ee27c"
style="margin: 0; background: #2ee27c;margin-left:5vw;"
@click="addHandle"
>新增</el-button
>
</div>
</div>
</el-form>
<div style="margin-top: 30px">
@ -97,7 +92,7 @@
<el-button type="primary" @click="editHandle(scope.row)"
>编辑
</el-button>
<el-button type="danger" @click="rowDel(scope.row)">删除 </el-button>
<!-- <el-button type="danger" @click="rowDel(scope.row)">删除 </el-button> -->
</template>
</avue-crud>
</div>
@ -292,6 +287,7 @@ export default {
margin-right: 20px;
}
.search-reset {
display:inline-block;
width: 46px;
height: 44px !important;
background: #ff9130;

@ -225,12 +225,27 @@ export default {
return new Promise((resolve) => {
this.loading = true;
this.$refs.form.validate((valid, done, msg) => {
// if (this.$refs.examineForm && this.$refs.examineForm.examineForm) {
// let flag = this.$refs.examineForm.examineForm.$assignee
// if(flag === "") {
// this.$message.error("请指定审批人!")
// return;
// }
// }
let form = this.deepClone(this.form);
if (this.$refs.examineForm && this.$refs.examineForm.examineForm) {
const { copyUser, assignee } = this.$refs.examineForm.examineForm;
form = { ...form, copyUser, assignee };
}
if (valid) {
// 判断必填
let flag = "assignee" in form;
if (flag && form.assignee === undefined) {
this.$message.error("请指定审批人!");
done();
this.loading = false;
}
// 判断是不是数组
if (typeof form.uploadrecord == "string") {
form.uploadrecord = form.uploadrecord.split("");
@ -249,7 +264,7 @@ export default {
resolve(done);
} else {
this.$message.success("发起成功");
this.handleCloseTag("/plugin/workflow/process/send");
this.handleCloseTag("/plugin/workflow/process/workorder");
done();
this.loading = false;
}

@ -33,7 +33,7 @@
:upload-preview="handleUploadPreview"
>
<template slot="uploadrecord">
<el-table
<el-table
v-if="form.uploadrecord && form.uploadrecord.length > 0"
:data="form.uploadrecord"
style="width: 100%"

@ -38,7 +38,6 @@ export default {
},
renwudengji: {
handler(val) {
console.log("val",val)
// 1625035000825049090
// 1624973130579636225
if((this.userInfo.role_name === "运维公司" && val === "1625035000825049090") || (this.userInfo.role_name === "技术员" && val === "1624973130579636225")||(['运维公司执行任务','领导审批'].includes(this.process.taskName))) {
@ -115,6 +114,7 @@ export default {
this.$emit('user-select', { type: 'assignee', checkType: 'checkbox' })
}
},
rules: [{ required: true, message: "请指定审批人" }],
}
]
},

@ -52,21 +52,6 @@
</el-option>
</el-select>
</template>
<!-- <template slot="renwudengji">
<el-select
v-model="form.renwudengji"
placeholder="请选择任务等级"
@change="gradeChange"
>
<el-option
v-for="item in taskLevelList"
:key="item.id"
:label="item.dictValue"
:value="item.id"
>
</el-option>
</el-select>
</template> -->
<template slot="xitongmingchengshujuku">
<el-select
filterable
@ -207,6 +192,18 @@ export default {
},
immediate: true,
},
//
"form.renwuzhonglei"(val) {
if (val) {
const renwuzhonglei = this.findObject(
this.option.column,
"renwuzhonglei"
);
for (let i in renwuzhonglei.dicData) {
this.form.renwudengji = renwuzhonglei.dicData[i].taskLevel
}
}
},
},
computed: {
...mapGetters(["userInfo"]),
@ -230,7 +227,9 @@ export default {
data() {
return {
defaults: {},
form: {},
form: {
renwuzhonglei: "",
},
option: {},
process: {},
loading: false,

@ -153,8 +153,8 @@
@current-change="currentChange"
@size-change="sizeChange"
>
<template slot-scope="scope" slot="menu">
<el-button @click="detailsHandle(scope.row)">详情 </el-button>
<template slot-scope="{ row }" slot="menu">
<el-button @click="dynamicRoute(row, 'detail')">详情 </el-button>
</template>
<template slot-scope="scope" slot="status">
<span
@ -176,9 +176,11 @@
</div>
</template>
<script>
import { getList, conditionalData } from "@/api/plugin/workflow/workorder.js";
import { getList, conditionalData, exportExcel } from "@/api/plugin/workflow/workorder.js";
import exForm from "../mixins/ex-form";
import { tableOption } from "@/const/workflow/workorder.js";
export default {
mixins: [exForm],
data() {
return {
searchForm: {},
@ -275,7 +277,37 @@ export default {
this.onLoad();
},
//
exportHandle() {},
exportHandle() {
if (
this.searchForm.timeArr !== null &&
this.searchForm.timeArr !== undefined
) {
this.searchForm.startTime = this.searchForm.timeArr[0];
this.searchForm.endTime = this.searchForm.timeArr[1];
}
if (
this.searchForm.timeArr2 !== null &&
this.searchForm.timeArr2 !== undefined
) {
this.searchForm.startTime2 = this.searchForm.timeArr2[0];
this.searchForm.endTime2 = this.searchForm.timeArr2[1];
}
exportExcel(this.searchForm).then((res) => {
const blob = res.data;
const link = document.createElement("a");
let binaryData = [];
binaryData.push(blob);
link.href = window.URL.createObjectURL(new Blob(binaryData));
link.download = "工单记录.xlsx";
document.body.appendChild(link);
link.click();
window.setTimeout(function () {
URL.revokeObjectURL(blob);
document.body.removeChild(link);
}, 0);
this.$message.success("导出成功!");
});
},
},
};
</script>

@ -428,8 +428,8 @@
trigger: "blur"
}, {
min: 2,
max: 5,
message: '姓名长度在2到5个字符'
max: 30,
message: '姓名长度在2到30个字符'
}]
},
{
@ -522,22 +522,22 @@
trigger: "click"
}]
},
{
label: "所属岗位",
prop: "postId",
type: "tree",
multiple: true,
dicData: [],
props: {
label: "postName",
value: "id"
},
rules: [{
required: true,
message: "请选择所属岗位",
trigger: "click"
}],
},
// {
// label: "",
// prop: "postId",
// type: "tree",
// multiple: true,
// dicData: [],
// props: {
// label: "postName",
// value: "id"
// },
// rules: [{
// required: true,
// message: "",
// trigger: "click"
// }],
// },
]
},
]
@ -728,10 +728,10 @@
const column = this.findObject(this.option.group, "deptId");
column.dicData = res.data.data;
});
getPostList(tenantId).then(res => {
const column = this.findObject(this.option.group, "postId");
column.dicData = res.data.data;
});
// getPostList(tenantId).then(res => {
// const column = this.findObject(this.option.group, "postId");
// column.dicData = res.data.data;
// });
},
submitRole() {
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
@ -747,7 +747,7 @@
rowSave(row, done, loading) {
row.deptId = row.deptId.join(",");
row.roleId = row.roleId.join(",");
row.postId = row.postId.join(",");
// row.postId = row.postId.join(",");
add(row).then(() => {
this.initFlag = false;
this.onLoad(this.page);
@ -764,7 +764,7 @@
rowUpdate(row, index, done, loading) {
row.deptId = row.deptId.join(",");
row.roleId = row.roleId.join(",");
row.postId = row.postId.join(",");
// row.postId = row.postId.join(",");
update(row).then(() => {
this.initFlag = false;
this.onLoad(this.page);
@ -932,9 +932,9 @@
if(this.form.hasOwnProperty("roleId")){
this.form.roleId = this.form.roleId.split(",");
}
if(this.form.hasOwnProperty("postId")){
this.form.postId = this.form.postId.split(",");
}
// if(this.form.hasOwnProperty("postId")){
// this.form.postId = this.form.postId.split(",");
// }
});
}
this.initFlag = true;

@ -67,7 +67,7 @@ export default {
{
id: 2,
title: "我的待办",
num: "5",
num: "",
},
{
id: 3,

Loading…
Cancel
Save