main
赵培友 3 years ago
parent ce273859c5
commit 9e5313a660
  1. 6
      src/views/maintenance/database1.vue
  2. 8
      src/views/maintenance/system.vue
  3. 20
      src/views/maintenance/task.vue
  4. 23
      src/views/plugin/workflow/mixins/ex-form.js
  5. 8
      src/views/plugin/workflow/process/components/button.vue
  6. 20
      src/views/plugin/workflow/process/components/examForm.vue
  7. 8
      src/views/plugin/workflow/process/components/form.vue
  8. 3
      src/views/plugin/workflow/process/todo.vue

@ -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.dataBaseName" v-model="searchForm.dataBaseName"
placeholder="数据库实例名" placeholder="数据库实例名"
@ -55,14 +55,12 @@
> >
</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>
<div style="display: flex"> <div style="display: flex">
<el-button class="search-btn" @click="download">下载模板</el-button> <el-button class="search-btn" @click="download">下载模板</el-button>
@ -222,6 +220,7 @@ export default {
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
} }
.search-select { .search-select {
width: 150px; width: 150px;
@ -238,6 +237,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,6 +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>
<el-select <el-select
v-model="searchForm.projectInfoId" v-model="searchForm.projectInfoId"
placeholder="系统名称" placeholder="系统名称"
@ -60,14 +61,13 @@
<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>
<el-button <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>
</el-form> </el-form>
<div style="margin-top: 30px"> <div style="margin-top: 30px">
@ -263,9 +263,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.search { .search {
border:1px solid red;
display:flex; display:flex;
justify-content: space-between;
flex-wrap: wrap;
} }
.search-select { .search-select {
width: 150px; width: 150px;

@ -64,14 +64,13 @@
<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>
<el-button
class="search-btn"
style="margin: 0; background: #2ee27c;margin-left:5vw;"
@click="addHandle"
>新增</el-button
>
</div> </div>
<el-button
class="search-btn"
style="margin: 0; background: #2ee27c;"
@click="addHandle"
>新增</el-button
>
</div> </div>
</el-form> </el-form>
<div style="margin-top: 30px"> <div style="margin-top: 30px">
@ -106,7 +105,7 @@ import {
remove, remove,
getTaskParent, getTaskParent,
getTaskLevel, getTaskLevel,
getTaskTypeData getTaskTypeData,
} from "@/api/maintenance/task.js"; } from "@/api/maintenance/task.js";
import { tableOption } from "@/const/maintenance/task.js"; import { tableOption } from "@/const/maintenance/task.js";
export default { export default {
@ -147,7 +146,7 @@ export default {
column.dicData = res.data.data; column.dicData = res.data.data;
}); });
getTaskTypeData().then((res) => { getTaskTypeData().then((res) => {
this.taskTypeList = res.data.data; this.taskTypeList = res.data.data;
}); });
}, },
// //
@ -270,6 +269,7 @@ export default {
.search { .search {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
} }
.search-select { .search-select {
width: 150px; width: 150px;
@ -287,7 +287,7 @@ export default {
margin-right: 20px; margin-right: 20px;
} }
.search-reset { .search-reset {
display:inline-block; display: inline-block;
width: 46px; width: 46px;
height: 44px !important; height: 44px !important;
background: #ff9130; background: #ff9130;

@ -225,14 +225,6 @@ 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;
@ -245,13 +237,15 @@ export default {
this.$message.error("请指定审批人!"); this.$message.error("请指定审批人!");
done(); done();
this.loading = false; this.loading = false;
return;
} }
// 判断是不是数组 // 判断是不是数组
if (typeof form.uploadrecord == "string") { if (typeof form.uploadrecord == "string") {
form.uploadrecord = form.uploadrecord.split(""); form.uploadrecord = form.uploadrecord.split("");
} }
startProcess(form) startProcess(form)
.then(() => { .then((res) => {
console.log(res)
// let item = 1; // let item = 1;
// if (item === 1) { // if (item === 1) {
// this.visible = true; // this.visible = true;
@ -321,8 +315,15 @@ export default {
*/ */
handleCompleteTask(pass, variables) { handleCompleteTask(pass, variables) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const { comment, copyUser, assignee, attachment } = const { comment, copyUser, assignee, attachment } = this.$refs.examineForm.examineForm;
this.$refs.examineForm.examineForm; // false隐藏 判断是否需要选择审批人
let flag = this.$refs.examineForm.flag
if (flag && assignee === undefined) {
this.$message.error("请指定审批人!");
reject();
this.submitLoading = false;
return;
}
if (!pass && !comment) { if (!pass && !comment) {
this.$message.error("请填写批复意见"); this.$message.error("请填写批复意见");
this.submitLoading = false; this.submitLoading = false;

@ -13,6 +13,14 @@
<span v-if="['recall', 'reject'].includes(process.processIsFinished)">重新提交</span> <span v-if="['recall', 'reject'].includes(process.processIsFinished)">重新提交</span>
<span v-else>{{getButton('wf_pass').name}}</span> <span v-else>{{getButton('wf_pass').name}}</span>
</el-button> </el-button>
<el-button v-if="getButton('wf_effect')"
type="success"
size="medium"
v-loading="loading"
@click="$emit('examine', true)">
<span v-if="['recall', 'reject'].includes(process.processIsFinished)">重新提交</span>
<span v-else>{{getButton('wf_effect').name}}</span>
</el-button>
<el-button v-if="getButton('wf_reject')" <el-button v-if="getButton('wf_reject')"
type="danger" type="danger"
size="medium" size="medium"

@ -42,9 +42,10 @@ export default {
// 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))) {
this.findObject(this.examineOption.column, '$assignee').display = false this.findObject(this.examineOption.column, '$assignee').display = false
console.log("val",val) this.flag = false
}else { }else {
this.findObject(this.examineOption.column, '$assignee').display = true this.findObject(this.examineOption.column, '$assignee').display = true
this.flag = true
} }
}, },
immediate: true, immediate: true,
@ -86,22 +87,8 @@ export default {
this.$emit('update:comment', val) this.$emit('update:comment', val)
} }
}, },
display: true display: true,
}, },
// {
// label: '',
// prop: '$copyUser',
// placeholder: ' ',
// readonly: true,
// append: '+',
// span: 24,
// event: {
// click: () => {
// this.$emit('user-select', { type: 'copy', checkType: 'checkbox' })
// }
// },
// display: true
// },
{ {
label: '指定审批人', label: '指定审批人',
prop: '$assignee', prop: '$assignee',
@ -118,6 +105,7 @@ export default {
} }
] ]
}, },
flag: true
} }
}, },
computed: { computed: {

@ -304,16 +304,16 @@ export default {
let res = await downloadFile({ let res = await downloadFile({
path: row.path, path: row.path,
}); });
const fileName = res.headers["content-disposition"].split(";"); // const fileName = res.headers["content-disposition"].split(";");
const filename2 = fileName[1].split("="); // const filename2 = fileName[1].split("=");
const filename3 = decodeURIComponent(filename2[1]); // const filename3 = decodeURIComponent(filename2[1]);
let blob = new Blob([res.data], { let blob = new Blob([res.data], {
type: res.type, type: res.type,
}); });
let downloadElement = document.createElement("a"); let downloadElement = document.createElement("a");
let href = window.URL.createObjectURL(blob); let href = window.URL.createObjectURL(blob);
downloadElement.href = href; downloadElement.href = href;
downloadElement.download = filename3; downloadElement.download = row.name;
document.body.appendChild(downloadElement); document.body.appendChild(downloadElement);
downloadElement.click(); downloadElement.click();
window.URL.revokeObjectURL(href); window.URL.revokeObjectURL(href);

@ -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-item: center">
<el-select <el-select
v-model="searchForm.taskParent" v-model="searchForm.taskParent"
placeholder="任务父类" placeholder="任务父类"
@ -103,7 +102,6 @@
> >
<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-form> </el-form>
@ -267,6 +265,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;

Loading…
Cancel
Save