1. 任务等级

main
赵培友 3 years ago
parent 81e49a0cd6
commit 752157ae1f
  1. 6
      src/api/logs.js
  2. 7
      src/api/plugin/workflow/form.js
  3. 14
      src/api/wel/wel.js
  4. 2
      src/const/journal/journal.js
  5. 86
      src/views/journal/index.vue
  6. 30
      src/views/plugin/workflow/process/components/examForm.vue
  7. 46
      src/views/plugin/workflow/process/components/form.vue
  8. 51
      src/views/wel/index.vue

@ -68,4 +68,10 @@ export const getList = (query) => {
method: 'get', method: 'get',
params:query params:query
}) })
}
export const getConditionData = () => {
return request({
url: '/api/blade-log/api/conditionData',
method: 'get',
})
} }

@ -100,6 +100,13 @@ export const getTaskTypeData = (query) => {
params:query params:query
}) })
} }
// 任务等级
export const getTaskLevel= () => {
return request({
url: '/api/blade-system/dict-biz/dictionary?code=task_level',
method: 'get',
})
}
// 系统名称/数据库 // 系统名称/数据库
export const getTaskAndDataBase = (query) => { export const getTaskAndDataBase = (query) => {
return request({ return request({

@ -14,3 +14,17 @@ export const getFlowListMonth = () => {
method: 'get', method: 'get',
}) })
} }
// 任务耗时
export const getFlowTakeTime = () => {
return request({
url: `${prefix}/flowTakeTime`,
method: 'get',
})
}
// 类型统计
export const getFlowListType = () => {
return request({
url: `${prefix}/flowListType`,
method: 'get',
})
}

@ -32,7 +32,7 @@ export const tableOption = {
{ {
type: "input", type: "input",
label: "操作模块", label: "操作模块",
prop: "aa", prop: "model",
align: "left", align: "left",
overHidden: true, overHidden: true,
}, },

@ -4,41 +4,41 @@
<div class="search"> <div class="search">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-select <el-select
v-model="searchForm.taskParentId" v-model="searchForm.createBy"
placeholder="任务父类" placeholder="用户"
class="search-select" class="search-select"
> >
<el-option <el-option
v-for="item in parentList" v-for="item in userList"
:key="item.id" :key="item.createBy"
:label="item.dictValue" :label="item.createBy"
:value="item.id" :value="item.createBy"
> >
</el-option> </el-option>
</el-select> </el-select>
<el-select <el-select
v-model="searchForm.taskTypeName" v-model="searchForm.title"
placeholder="任务种类" placeholder="操作模块"
class="search-select" class="search-select"
> >
<el-option <el-option
v-for="item in taskTypeList" v-for="item in moduleList"
:key="item.taskTypeName" :key="item"
:label="item.taskTypeName" :label="item"
:value="item.taskTypeName" :value="item"
> >
</el-option> </el-option>
</el-select> </el-select>
<el-select <el-select
v-model="searchForm.taskLevel" v-model="searchForm.remoteIp"
placeholder="任务等级" placeholder="IP地址"
class="search-select" class="search-select"
> >
<el-option <el-option
v-for="item in levelList" v-for="item in ipList"
:key="item.id" :key="item.remoteIp"
:label="item.dictValue" :label="item.remoteIp"
:value="item.id" :value="item.remoteIp"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -75,12 +75,18 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
> >
<template slot="model" slot-scope="scope">
{{ scope.row.title.split("-")[0] }}
</template>
<template slot="title" slot-scope="scope">
{{ scope.row.title.split("-")[1] }}
</template>
</avue-crud> </avue-crud>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getList } from "@/api/logs"; import { getList, getConditionData } from "@/api/logs";
import { tableOption } from "@/const/journal/journal.js"; import { tableOption } from "@/const/journal/journal.js";
export default { export default {
data() { data() {
@ -99,29 +105,25 @@ export default {
loading: false, loading: false,
parentList: [], parentList: [],
levelList: [], levelList: [],
userList: [],
moduleList: [],
ipList: [],
}; };
}, },
created() { created() {
// this.getDict(); this.getDict();
this.onLoad(); this.onLoad();
}, },
methods: { methods: {
// //
// getDict() { getDict() {
// getTaskParent().then((res) => { getConditionData().then((res) => {
// this.parentList = res.data.data; const { user, module, ip } = res.data.data;
// const column = this.findObject(this.option.column, "taskParentId"); this.userList = user;
// column.dicData = res.data.data; this.moduleList = module;
// }); this.ipList = ip;
// getTaskLevel().then((res) => { });
// this.levelList = res.data.data; },
// const column = this.findObject(this.option.column, "taskLevel");
// column.dicData = res.data.data;
// });
// getTaskTypeData().then((res) => {
// this.taskTypeList = res.data.data;
// });
// },
// //
onLoad() { onLoad() {
this.loading = true; this.loading = true;
@ -133,17 +135,11 @@ export default {
this.searchForm.startTime = this.searchForm.timeArr[0]; this.searchForm.startTime = this.searchForm.timeArr[0];
this.searchForm.endTime = this.searchForm.timeArr[1]; this.searchForm.endTime = this.searchForm.timeArr[1];
} }
const { const { createBy, title, remoteIp, startTime, endTime } = this.searchForm;
taskParentId,
taskTypeName,
taskLevel,
startTime,
endTime,
} = this.searchForm;
let params = { let params = {
taskParentId, createBy,
taskTypeName, title,
taskLevel, remoteIp,
startTime, startTime,
endTime, endTime,
}; };

@ -1,10 +1,12 @@
<template> <template>
<avue-form v-model="examineForm" <avue-form v-model="examineForm"
ref="examineForm" ref="examineForm"
:option="examineOption" :upload-after="uploadAfter"></avue-form> :option="examineOption" :upload-after="uploadAfter"
></avue-form>
</template> </template>
<script> <script>
import {mapGetters} from "vuex";
export default { export default {
name: 'wf-exam-form', name: 'wf-exam-form',
props: { props: {
@ -13,6 +15,9 @@ export default {
default: () => { default: () => {
return {} return {}
} }
},
renwudengji: {
type: String,
} }
}, },
watch: { watch: {
@ -29,6 +34,26 @@ export default {
}, },
deep: true, deep: true,
immediate: true immediate: true
},
renwudengji: {
handler(val) {
// 1625035000825049090
// 1624973130579636225
if(this.userInfo.role_name === "运维公司" && val === "1625035000825049090") {
this.findObject(this.examineOption.column, '$assignee').display = false
}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
}
},
deep: true,
immediate: true
} }
}, },
data() { data() {
@ -99,6 +124,9 @@ export default {
}, },
} }
}, },
computed: {
...mapGetters(["userInfo"]),
},
methods: { methods: {
getComment() { getComment() {
return this.examineForm.comment return this.examineForm.comment

@ -52,6 +52,21 @@
</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
@ -103,10 +118,15 @@
</avue-form> </avue-form>
</el-card> </el-card>
<el-card shadow="never" style="margin-top: 20px" v-if="showExamForm"> <el-card
shadow="never"
:style="{ marginTop: '20px' }"
v-if="showExamForm && level"
>
<wf-examine-form <wf-examine-form
ref="examineForm" ref="examineForm"
:process="process" :process="process"
:renwudengji="form.renwudengji"
@user-select="handleUserSelect" @user-select="handleUserSelect"
></wf-examine-form> ></wf-examine-form>
</el-card> </el-card>
@ -152,6 +172,7 @@ import {
getCompany, getCompany,
getDepts, getDepts,
getTaskParent, getTaskParent,
// getTaskLevel,
getTaskTypeData, getTaskTypeData,
getTaskAndDataBase, getTaskAndDataBase,
getModuleAndDataTable, getModuleAndDataTable,
@ -160,7 +181,7 @@ import WfExamineForm from "./examForm.vue";
import WfUserSelect from "./user-select"; import WfUserSelect from "./user-select";
import exForm from "../../mixins/ex-form"; import exForm from "../../mixins/ex-form";
import draft from "../../mixins/draft"; import draft from "../../mixins/draft";
import { mapGetters } from "vuex";
export default { export default {
components: { components: {
WfUserSelect, WfUserSelect,
@ -181,10 +202,23 @@ export default {
}, },
}, },
computed: { computed: {
...mapGetters(["userInfo"]),
showExamForm() { showExamForm() {
const { hideComment, hideCopy, hideExamine } = this.process; const { hideComment, hideCopy, hideExamine } = this.process;
return !hideComment || !hideCopy || !hideExamine; return !hideComment || !hideCopy || !hideExamine;
}, },
level() {
if (
(this.userInfo.role_name === "运维公司" &&
this.form.renwudengji === "1625035000825049090") ||
(this.userInfo.role_name === "技术员" &&
this.form.renwudengji === "1624973130579636225")
) {
return false;
} else {
return true;
}
},
}, },
data() { data() {
return { return {
@ -197,6 +231,7 @@ export default {
deptList: [], // deptList: [], //
taskParentList: [], // taskParentList: [], //
taskAndDataBaseList: [], // taskAndDataBaseList: [], //
// taskLevelList: [] //
}; };
}, },
mounted() { mounted() {
@ -209,6 +244,9 @@ export default {
this.companyChange(id); this.companyChange(id);
} }
}); });
// getTaskLevel().then(res=> {
// this.taskLevelList = res.data.data
// })
getTaskParent().then((res) => { getTaskParent().then((res) => {
this.taskParentList = res.data.data; this.taskParentList = res.data.data;
if (this.$route.query.parent) { if (this.$route.query.parent) {
@ -347,6 +385,10 @@ export default {
this.waiting = false; this.waiting = false;
}); });
}, },
//
gradeChange() {
console.log(this.examineForm);
},
}, },
}; };
</script> </script>

@ -47,7 +47,12 @@
</template> </template>
<script> <script>
import { getAboutMy, getFlowListMonth } from "@/api/wel/wel.js"; import {
getAboutMy,
getFlowListMonth,
getFlowTakeTime,
getFlowListType,
} from "@/api/wel/wel.js";
export default { export default {
name: "wel", name: "wel",
data() { data() {
@ -198,11 +203,18 @@ export default {
}, 100); }, 100);
}); });
}, },
pieOneChart() { pieOneChart(data) {
var myChart = this.$echarts.init(document.getElementById("pieItemOne")); var myChart = this.$echarts.init(document.getElementById("pieItemOne"));
// //
var option = { var option = {
color: ["#2EE27C", "#4CA3FB", "#FF9130"], color: [
"#2689FF",
"#6F33FF",
"#2356F7",
"#00C374",
"#00CFDC",
"#FD4D66",
],
title: { title: {
text: "业务类型统计", text: "业务类型统计",
textStyle: { textStyle: {
@ -231,11 +243,7 @@ export default {
name: "业务类型统计", name: "业务类型统计",
type: "pie", type: "pie",
radius: "55%", radius: "55%",
data: [ data,
{ value: 140, name: "月完成" },
{ value: 206, name: "新建表" },
{ value: 75, name: "数据导出" },
],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -339,7 +347,7 @@ export default {
}, 100); }, 100);
}); });
}, },
barChart() { barChart(XData, YData) {
var myChart = this.$echarts.init(document.getElementById("barChart")); var myChart = this.$echarts.init(document.getElementById("barChart"));
var option = { var option = {
title: { title: {
@ -365,6 +373,9 @@ export default {
show: true, show: true,
color: "#000", color: "#000",
fontSize: 14, fontSize: 14,
// formatter: function (item) {
// return item + "";
// },
}, },
axisLine: { axisLine: {
show: true, show: true,
@ -379,7 +390,7 @@ export default {
color: "#CFCFCF", color: "#CFCFCF",
}, },
}, },
data: ["1天", "2天", "3天", "4天", "5天", "6天"], data: XData,
}, },
yAxis: { yAxis: {
type: "value", type: "value",
@ -410,12 +421,18 @@ export default {
}, },
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: YData,
type: "bar", type: "bar",
barWidth: "32px", barWidth: "32px",
itemStyle: { itemStyle: {
color: "#4CA3FB", color: "#4CA3FB",
}, },
label: {
show:true,
position: 'top',
color: "#000",
fontSize: 14
}
}, },
], ],
}; };
@ -440,6 +457,18 @@ export default {
const { xData, monthAddNum, monthFinishNum } = res.data.data; const { xData, monthAddNum, monthFinishNum } = res.data.data;
this.lineChart(xData, monthAddNum, monthFinishNum); this.lineChart(xData, monthAddNum, monthFinishNum);
}); });
//
getFlowListType().then((res) => {
this.pieOneChart(res.data.data);
});
//
getFlowTakeTime().then((res) => {
const { XData, YData } = res.data.data;
const data = XData.map(item => {
return item + "天"
})
this.barChart(data, YData);
});
}, },
}, },
mounted() { mounted() {

Loading…
Cancel
Save