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', method: 'get',
params:query 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, columnBtn: false,
refreshBtn: false, refreshBtn: false,
header: false, header: false,
menuWidth:220, menuWidth:120,
dialogCustomClass:"custom", dialogCustomClass:"custom",
column: [ column: [
{ {

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

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

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

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

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

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

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

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

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

@ -52,21 +52,6 @@
</el-option> </el-option>
</el-select> </el-select>
</template> </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"> <template slot="xitongmingchengshujuku">
<el-select <el-select
filterable filterable
@ -207,6 +192,18 @@ export default {
}, },
immediate: true, 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: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"]),
@ -230,7 +227,9 @@ export default {
data() { data() {
return { return {
defaults: {}, defaults: {},
form: {}, form: {
renwuzhonglei: "",
},
option: {}, option: {},
process: {}, process: {},
loading: false, loading: false,

@ -153,8 +153,8 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
> >
<template slot-scope="scope" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button @click="detailsHandle(scope.row)">详情 </el-button> <el-button @click="dynamicRoute(row, 'detail')">详情 </el-button>
</template> </template>
<template slot-scope="scope" slot="status"> <template slot-scope="scope" slot="status">
<span <span
@ -176,9 +176,11 @@
</div> </div>
</template> </template>
<script> <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"; import { tableOption } from "@/const/workflow/workorder.js";
export default { export default {
mixins: [exForm],
data() { data() {
return { return {
searchForm: {}, searchForm: {},
@ -275,7 +277,37 @@ export default {
this.onLoad(); 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> </script>

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

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

Loading…
Cancel
Save