1. 消息 2.流程控制输入框隐藏

main
赵培友 3 years ago
parent 752157ae1f
commit 4a941272fb
  1. 11
      src/api/plugin/workflow/workorder.js
  2. 18
      src/const/workflow/workorder.js
  3. 5
      src/option/user/info.js
  4. 73
      src/page/index/top/index.vue
  5. 119
      src/page/index/top/top-notice.vue
  6. 4
      src/styles/top.scss
  7. 21
      src/views/plugin/workflow/process/components/detail.vue
  8. 24
      src/views/plugin/workflow/process/components/examForm.vue
  9. 5
      src/views/plugin/workflow/process/components/form.vue
  10. 4
      src/views/plugin/workflow/process/start.vue
  11. 21
      src/views/plugin/workflow/process/workorder.vue

@ -0,0 +1,11 @@
import request from '@/router/axios';
const prefix = '/api/blade-workflow/workOrder'
// 查询
export const getList = (query) => {
return request({
url: `${prefix}/myToDo`,
method: 'get',
params:query
})
}
// historyWorkOrder

@ -23,49 +23,49 @@ export const tableOption = {
{
type: "input",
label: "任务种类",
prop: "year",
prop: "renwuzhonglei",
align: "left",
overHidden: true,
},
{
type: "input",
label: "任务父类",
prop: "year",
prop: "$renwufulei",
align: "left",
overHidden: true,
},
{
type: "input",
label: "操作模块",
prop: "year",
prop: "$xitongmingchengshujuku",
align: "left",
overHidden: true,
},
{
type: "input",
label: "当前责任人",
prop: "userStatusAnalysis",
prop: "currentResponsiblePerson",
align: "left",
overHidden: true,
},
{
type: "input",
label: "分管部门",
prop: "count",
prop: "$guanlibumen",
align: "left",
overHidden: true,
},
{
type: "input",
label: "运维公司",
prop: "count",
prop: "$yunweigongsi",
align: "left",
overHidden: true,
},
{
type: "input",
label: "发起人",
prop: "count",
prop: "startUserId",
align: "left",
overHidden: true,
},
@ -88,7 +88,7 @@ export const tableOption = {
label: "结束时间",
type: "datetime",
overHidden: true,
prop: "startTime",
prop: "endTime",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
@ -96,7 +96,7 @@ export const tableOption = {
label: "期望完成时间",
type: "datetime",
overHidden: true,
prop: "startTime",
prop: "qiwangwanchengshijian",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},

@ -11,13 +11,14 @@ export default {
listType: 'picture-img',
propsHttp: {
res: 'data',
url: 'link',
url: 'path',
name: 'name'
},
canvasOption: {
text: ' ',
ratio: 0.1
},
action: '/api/blade-resource/oss/endpoint/put-file',
action: '/api/blade-workflow/database/upload',
tip: '只能上传jpg/png用户头像,且不超过500kb',
span: 12,
row: true,

@ -1,23 +1,41 @@
<template>
<div class="avue-top">
<div class="top-left">{{tag.label==="首页"?"数据看板":tag.label}}</div>
<div class="top-left">
{{ tag.label === "首页" ? "数据看板" : tag.label }}
</div>
<div class="top-right">
<el-tooltip
effect="dark"
:content="$t('navbar.notice')"
placement="bottom"
>
<div class="top-bar__item top-bar__item--show">
<top-notice></top-notice>
</div>
</el-tooltip>
<div class="avatar">
<img :src="userInfo.avatar" alt="" width="56px" height="56px">
<img :src="userInfo.avatar" alt="" width="56px" height="56px" />
</div>
<div style="margin-right:10px;">
{{userInfo.real_name}}
</div>
<el-dropdown >
<el-dropdown>
<span class="el-dropdown-link">
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<router-link to="/info/index">{{$t('navbar.userinfo')}}</router-link>
<router-link to="/info/index">{{
$t("navbar.userinfo")
}}</router-link>
</el-dropdown-item>
<el-dropdown-item v-if="this.website.switchMode" @click.native="switchDept"
>{{$t('navbar.switchDept')}}
<el-dropdown-item
v-if="this.website.switchMode"
@click.native="switchDept"
>{{ $t("navbar.switchDept") }}
</el-dropdown-item>
<el-dropdown-item @click.native="logout"
divided>{{$t('navbar.logOut')}}
<el-dropdown-item @click.native="logout" divided
>{{ $t("navbar.logOut") }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -26,40 +44,37 @@
</template>
<script>
import { mapGetters } from "vuex";
import { resetRouter } from '@/router/router'
import { resetRouter } from "@/router/router";
import topNotice from "./top-notice";
export default {
name: "top",
data () {
return {
}
data() {
return {};
},
filters: {},
created () {
components: {
topNotice,
},
mounted () {
console.log(this.userInfo)
created() {},
mounted() {
console.log(this.userInfo);
},
computed: {
...mapGetters([
"userInfo",
"tag",
])
...mapGetters(["userInfo", "tag"]),
},
methods: {
logout () {
logout() {
this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
confirmButtonText: this.$t("submitText"),
cancelButtonText: this.$t("cancelText"),
type: "warning"
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
resetRouter()
this.$router.push({ path: "/login" })
})
})
}
}
resetRouter();
this.$router.push({ path: "/login" });
});
});
},
},
};
</script>

@ -1,87 +1,90 @@
<template>
<el-popover placement="bottom"
width="350"
trigger="click">
<el-popover placement="bottom" width="350" trigger="click">
<el-tabs v-model="activeName">
<el-tab-pane label="邮件(1)"
name="first"></el-tab-pane>
<el-tab-pane label="消息(2)"
name="second"></el-tab-pane>
<el-tab-pane label="通知"
name="third"></el-tab-pane>
<el-tab-pane label="消息(2)" name="first">
<el-scrollbar style="height: 300px">
<avue-notice
:data="data"
:option="option"
@page-change="pageChange"
></avue-notice>
</el-scrollbar>
</el-tab-pane>
<el-tab-pane label="通知" name="third"></el-tab-pane>
</el-tabs>
<el-scrollbar style="height:300px">
<avue-notice :data="data"
:option="option"
@page-change="pageChange"></avue-notice>
</el-scrollbar>
<div slot="reference">
<el-badge is-dot>
<i class="el-icon-bell"></i>
<el-badge is-dot class="item">
<i class="el-icon-bell" style="font-size: 28px"></i>
</el-badge>
</div>
</el-popover>
</template>
<script>
let list = [{
img: '/img/bg/vip1.png',
title: '史蒂夫·乔布斯 关注了你',
subtitle: '05-08 15:08',
tag: '已经开始',
status: 0
}, {
img: '/img/bg/vip2.png',
title: '斯蒂夫·沃兹尼亚克 关注了你',
subtitle: '05-08 15:08',
tag: '未开始',
status: 1
}, {
img: '/img/bg/vip3.png',
title: '蒂姆·库克 关注了你',
subtitle: '05-08 15:08',
status: 3,
tag: '有错误'
}, {
img: '/img/bg/vip4.png',
title: '比尔·费尔南德斯 关注了你',
subtitle: '05-08 15:08',
status: 4,
tag: '已完成'
}];
let list = [
{
img: "/img/bg/vip1.png",
title: "史蒂夫·乔布斯 关注了你",
subtitle: "05-08 15:08",
tag: "已经开始",
status: 0,
},
{
img: "/img/bg/vip2.png",
title: "斯蒂夫·沃兹尼亚克 关注了你",
subtitle: "05-08 15:08",
tag: "未开始",
status: 1,
},
{
img: "/img/bg/vip3.png",
title: "蒂姆·库克 关注了你",
subtitle: "05-08 15:08",
status: 3,
tag: "有错误",
},
{
img: "/img/bg/vip4.png",
title: "比尔·费尔南德斯 关注了你",
subtitle: "05-08 15:08",
status: 4,
tag: "已完成",
},
];
export default {
name: "top-notice",
data () {
data() {
return {
activeName: 'first',
activeName: "first",
option: {
props: {
img: 'img',
title: 'title',
subtitle: 'subtitle',
tag: 'tag',
status: 'status'
img: "img",
title: "title",
subtitle: "subtitle",
tag: "tag",
status: "status",
},
},
data: list,
}
},
created () {
};
},
created() {},
methods: {
pageChange (page, done) {
pageChange(page, done) {
setTimeout(() => {
this.$message.success('页码' + page)
this.$message.success("页码" + page);
this.data = this.data.concat(list);
done();
}, 1000)
}, 1000);
},
}
},
};
</script>
<style lang="scss" scoped>
.item {
margin-top: 17px;
margin-right: 30px;
}
</style>

@ -78,8 +78,8 @@ $height: 64px;
display: inline-block !important;
}
.el-badge__content.is-fixed {
top: 12px;
right: 5px;
top: 2px;
right: 6px;
}
}

@ -75,12 +75,15 @@
</avue-form>
</div>
</el-card>
<el-card
<!-- 控制 运维公司收到任务 只输入通过 -->
<div :style="{display:yibanTask?'block':'none'}">
<el-card
shadow="never"
style="margin-top: 20px"
v-if="process.status == 'todo'"
>
<wf-examine-form
:renwudengji="form.renwudengji"
ref="examineForm"
:comment.sync="comment"
:process="process"
@ -88,6 +91,8 @@
@uploadSuccess="uploadSuccess"
></wf-examine-form>
</el-card>
</div>
</el-tab-pane>
<el-tab-pane label="流转信息" name="second">
<el-card shadow="never" style="margin-top: 5px">
@ -145,7 +150,7 @@ import WfExamineForm from "./examForm.vue";
import WfButton from "./button.vue";
import WfFlow from "./flow.vue";
import userSelect from "./user-select";
import {mapGetters} from "vuex";
import { mapGetters } from "vuex";
import exForm from "../../mixins/ex-form";
import theme from "../../mixins/theme";
@ -176,8 +181,16 @@ export default {
};
},
computed: {
...mapGetters(["userInfo"]),
...mapGetters(["userInfo"]),
//
yibanTask() {
if (["运维公司收到任务"].includes(this.process.taskName)) {
return false;
} else {
return true;
}
},
},
methods: {
//
async download(row) {
@ -283,7 +296,7 @@ export default {
);
renwuzhonglei.dicData = res.data.data;
});
getTaskAndDataBase({id:yunweigongsi}).then((res) => {
getTaskAndDataBase({ id: yunweigongsi }).then((res) => {
const datasql = this.findObject(
this.option.column,
"xitongmingchengshujuku"

@ -24,11 +24,12 @@ export default {
process: {
handler(val) {
if (!val) return
const { hideComment, hideAttachment, hideCopy, hideExamine, copyUser, copyUserName } = val
const { hideComment, hideAttachment, hideCopy, hideExamine, copyUser, copyUserName,taskName } = val
console.log(['运维公司执行任务'].includes(taskName))
if (hideComment) this.findObject(this.examineOption.column, 'comment').display = false //
if (hideComment || hideAttachment) this.findObject(this.examineOption.column, 'attachment').display = false //
if (hideCopy) this.findObject(this.examineOption.column, '$copyUser').display = false //
if (hideExamine) this.findObject(this.examineOption.column, '$assignee').display = false //
if (hideExamine ) this.findObject(this.examineOption.column, '$assignee').display = false //
if (copyUser) this.$set(this.examineForm, 'copyUser', val.copyUser) //
if (copyUserName) this.$set(this.examineForm, '$copyUser', val.copyUserName) //
},
@ -37,23 +38,18 @@ export default {
},
renwudengji: {
handler(val) {
console.log("val",val)
// 1625035000825049090
// 1624973130579636225
if(this.userInfo.role_name === "运维公司" && val === "1625035000825049090") {
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
console.log("val",val)
}else {
this.findObject(this.examineOption.column, '$assignee').display = true
}
if(this.userInfo.role_name === "技术员" && val === "1624973130579636225") {
this.findObject(this.examineOption.column, '$assignee').display = false
}else {
this.findObject(this.examineOption.column, '$assignee').display = true
}
},
immediate: true,
deep: true,
immediate: true
}
},
data() {
@ -81,7 +77,7 @@ export default {
dragFile: true,
},
{
label: '审批意见',
label: '意见',
prop: 'comment',
type: 'textarea',
span: 24,
@ -119,8 +115,8 @@ export default {
this.$emit('user-select', { type: 'assignee', checkType: 'checkbox' })
}
},
display: true
}]
}
]
},
}
},

@ -103,8 +103,8 @@
<el-table-column prop="createTime" label="上传时间" width="240">
</el-table-column>
<el-table-column label="操作">
<template>
<el-table-column label="操作">
<template slot-scope="scope">
<i
class="el-icon-delete"
style="cursor: pointer"
@ -117,7 +117,6 @@
</template>
</avue-form>
</el-card>
<el-card
shadow="never"
:style="{ marginTop: '20px' }"

@ -74,6 +74,7 @@ export default {
height: 760px;
min-height: 760px;
padding: 50px;
padding-right: 0px;
box-sizing: border-box;
border-radius: 3px;
}
@ -114,8 +115,5 @@ export default {
cursor: pointer;
}
}
.item:nth-child(4) {
margin-right: 0;
}
}
</style>

@ -157,6 +157,7 @@
</div>
</template>
<script>
import { getList } from "@/api/plugin/workflow/workorder.js"
import { tableOption } from "@/const/workflow/workorder.js";
export default {
data() {
@ -180,14 +181,14 @@ export default {
methods: {
//
onLoad() {
// this.loading = true;
// const { current, size } = this.page;
// getList(Object.assign({ current, size })).then((res) => {
// const { total, records } = res.data.data;
// this.page.total = total;
// this.tableData = records;
// this.loading = false;
// });
this.loading = true;
const { current, size } = this.page;
getList({ current, size }).then((res) => {
const { total, records } = res.data.data;
this.page.total = total;
this.tableData = records;
this.loading = false;
});
},
//
currentChange(currentPage) {
@ -213,10 +214,6 @@ export default {
};
</script>
<style lang="scss" scoped>
.search {
// display: flex;
// justify-content: space-between;
}
.search-line {
margin-top: 20px;
display: flex;

Loading…
Cancel
Save