1. 任务运维查询 2. 系统运维页面接口对接完成 3. 新增工单主页面面完成

main
赵培友 3 years ago
parent 2d3bb806bd
commit 41c682ae19
  1. 2
      public/index.html
  2. 40
      src/api/maintenance/system.js
  3. 27
      src/api/maintenance/task.js
  4. BIN
      src/assets/img/gdwel/1.png
  5. BIN
      src/assets/img/gdwel/2.png
  6. BIN
      src/assets/img/gdwel/3.png
  7. BIN
      src/assets/img/gdwel/4.png
  8. BIN
      src/assets/img/gdwel/5.png
  9. BIN
      src/assets/img/gdwel/6.png
  10. 161
      src/const/maintenance/system.js
  11. 13
      src/const/maintenance/task.js
  12. 38
      src/const/workflow/workorder.js
  13. 2
      src/page/login/userlogin.vue
  14. 6
      src/styles/custom/custom.scss
  15. 2
      src/styles/media.scss
  16. 114
      src/views/maintenance/beifenzhuye.vue
  17. 297
      src/views/maintenance/system.vue
  18. 116
      src/views/maintenance/task.vue
  19. 3
      src/views/plugin/workflow/process/components/user-select.vue

@ -19,7 +19,7 @@
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>Saber企业平台</title>
<title>工单系统</title>
<style>
html,
body,

@ -0,0 +1,40 @@
import request from '@/router/axios';
const prefix = '/api/blade-workflow/moduleInfo'
// 查询
export const getList = (query) => {
return request({
url: `${prefix}/list`,
method: 'get',
params:query
})
}
export const add = (row) => {
return request({
url: `${prefix}/save`,
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: `${prefix}/update`,
method: 'post',
data: row
})
}
export const remove = (ids) => {
return request({
url: `${prefix}/remove`,
method: 'post',
params: {
ids,
}
})
}
export const getDictionaries = () => {
return request({
url: `${prefix}//basicData`,
method: 'get',
})
}

@ -1,10 +1,11 @@
import request from '@/router/axios';
const prefix = '/api/blade-workflow/taskInfo'
// 查询
export const getList = () => {
export const getList = (query) => {
return request({
url: `${prefix}/list`,
method: 'get'
method: 'get',
params:query
})
}
export const add = (row) => {
@ -31,4 +32,24 @@ export const remove = (ids) => {
})
}
// 任务父类
export const getTaskParent = (query) => {
return request({
url: "/api/blade-system/dict-biz/dictionary?code=task_parent",
method: "get",
})
}
// 任务种类
export const getTaskTypeData = () => {
return request({
url: `${prefix}/taskTypeData`,
method: "get",
})
}
// 任务等级
export const getTaskLevel = (query) => {
return request({
url: "/api/blade-system/dict-biz/dictionary?code=task_level",
method: "get",
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,161 @@
export const tableOption = {
index: true,
indexLabel: "序号",
indexWidth: 120,
labelPosition: "top",
selection: false,
border: false,
headerAlign: "left",
align: "left",
menuAlign: "left",
menuHeaderAlign: "left",
menuBtn: true,
editBtn: false,
delBtn: false,
addBtn: false,
tip: false,
searchMenuSpan: 3, //控制搜索按钮
columnBtn: false,
refreshBtn: false,
header: false,
menuWidth: 220,
dialogCustomClass: "custom",
menu: false,
column: [
{
type: "select",
label: "系统名称",
prop: "projectName",
align: "left",
overHidden: true,
dicData: [],
props: {
label: "projectName",
value: "id",
},
span: 8,
allowCreate: true,
filterable: true,
rules: [{ required: true, message: "请选择系统名称" }],
},
{
label: "模块名称",
prop: "moduleName",
type: "input",
align: "left",
rules: [{ required: true, message: "请输入模块名称" }],
addDisplay:false,
editDisplay: false
},
{
type: "select",
label: "管理部门",
prop: "manageDeptId",
align: "left",
overHidden: true,
dicData: [],
props: {
label: "fullName",
value: "id",
},
span: 8,
rules: [{ required: true, message: "请选择管理部门" }],
},
{
type: "select",
label: "运维公司",
prop: "maintenanceDeptId",
align: "left",
overHidden: true,
dicData: [],
props: {
label: "name",
value: "id",
},
span: 8,
rules: [{ required: true, message: "请选择运维公司" }],
},
// {
// type: "input",
// label: "服务器IP",
// prop: "ip",
// align: "left",
// overHidden: true,
// hide:true,
// span: 8,
// },
// {
// type: "input",
// label: "端口号",
// prop: "dk",
// align: "left",
// overHidden: true,
// hide:true,
// span: 8,
// },
// {
// type: "input",
// label: "数据库名称",
// prop: "mc",
// align: "left",
// overHidden: true,
// hide:true,
// span: 8,
// },
// {
// type: "select",
// label: "数据库信息属性",
// prop: "sx",
// align: "left",
// overHidden: true,
// dicData: [],
// props: {
// label: "dictValue",
// value: "id",
// },
// span: 8,
// hide:true
// },
{
type: "input",
label: "创建人",
prop: "createName",
align: "left",
overHidden: true,
addDisplay: false,
editDisplay: false,
},
{
label: "创建时间",
type: "datetime",
overHidden: true,
prop: "createTime",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm:ss",
addDisplay: false,
editDisplay: false,
},
{
label: "",
prop: "moduleNameList",
type: "dynamic",
span: 24,
hide: true,
children: {
align: "left",
headerAlign: "left",
column: [
{
label: "模块名称",
prop: "moduleName",
type: "input",
align: "left",
rules: [{ required: true, message: "请输入模块名称" }],
},
],
},
},
],
};

@ -3,7 +3,7 @@ export const tableOption = {
indexLabel: "序号",
indexWidth:120,
labelPosition: "top",
selection: true,
selection: false,
border: false,
headerAlign: "left",
align: "left",
@ -27,7 +27,8 @@ export const tableOption = {
prop: "taskParentId",
align: "left",
overHidden: true,
dicUrl:'/api/blade-system/dict-biz/dictionary?code=task_parent',
// dicUrl:'/api/blade-system/dict-biz/dictionary?code=task_parent',
dicData: [],
props: {
label: "dictValue",
value: "id",
@ -52,7 +53,8 @@ export const tableOption = {
prop: "taskLevel",
align: "left",
overHidden: true,
dicUrl:'/api/blade-system/dict-biz/dictionary?code=task_level',
// dicUrl:'/api/blade-system/dict-biz/dictionary?code=task_level',
dicData: [],
props: {
label: "dictValue",
value: "id",
@ -63,13 +65,12 @@ export const tableOption = {
{
type: "input",
label: "创建人",
prop: "createUser",
prop: "createUserName",
align: "left",
overHidden: true,
addDisplay:false,
editDisplay: false
},
{
label: "创建时间",
type: "datetime",
@ -81,4 +82,4 @@ export const tableOption = {
editDisplay: false
},
],
}
}

@ -1,4 +1,6 @@
export const tableOption = {
indexLabel: "序号",
indexWidth:120,
selection: true,
border: false,
gutter: 60, //设置input的大小
@ -20,7 +22,21 @@ export const tableOption = {
column: [
{
type: "input",
label: "任务名称",
label: "任务种类",
prop: "year",
align: "left",
overHidden: true,
},
{
type: "input",
label: "任务父类",
prop: "year",
align: "left",
overHidden: true,
},
{
type: "input",
label: "操作模块",
prop: "year",
align: "left",
overHidden: true,
@ -34,7 +50,14 @@ export const tableOption = {
},
{
type: "input",
label: "公司名称",
label: "分管部门",
prop: "count",
align: "left",
overHidden: true,
},
{
type: "input",
label: "运维公司",
prop: "count",
align: "left",
overHidden: true,
@ -48,7 +71,7 @@ export const tableOption = {
},
{
type: "input",
label: "状态",
label: "审批状态",
prop: "status",
align: "left",
overHidden: true,
@ -70,11 +93,12 @@ export const tableOption = {
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
{
type: "input",
label: "处理状态",
prop: "status",
align: "left",
label: "期望完成时间",
type: "datetime",
overHidden: true,
prop: "startTime",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
],
}

@ -187,7 +187,7 @@ export default {
},
created() {
this.getTenant();
this.refreshCode();
// this.refreshCode();
},
mounted() {
let username = localStorage.getItem("username");

@ -16,7 +16,6 @@
// 包裹容器
.cus-container {
margin: 0 38px;
border: 1px solid blue;
height: 100%;
width: calc(100% - 76px);
}
@ -102,4 +101,9 @@
.el-col-8:nth-child(3n+1) {
margin-left: 35px;
}
.avue-dynamic {
width: 816px;
margin: 0 33px;
margin-top: 10px;
}
}

@ -56,7 +56,7 @@
padding: 0;
padding-bottom: 20px;
width: calc(100% - 240px);
height: calc(100% - 64px);
height: calc(100% - 94px);
box-sizing: border-box;
overflow: hidden;
transition: all 0.5s;

@ -0,0 +1,114 @@
<template>
<div class="cus-container">
<div class="content">
<div class="main">
<div class="item" v-for="(item, index) in menuList" :key="index">
<div class="item-top">
<div>
<div class="title">{{ item.title }}</div>
<div class="subTitle">{{ item.subTitle }}</div>
</div>
<div class="item-top-right">
<img :src="require(`@/assets/img/gdwel/${item.id}.png`)" alt="" />
</div>
</div>
<div class="btn" @click="createNow(item.id)">立即创建</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
menuList: [
{
id: 1,
title: "数据管理",
subTitle: "日常数据管理维护工作",
},
{
id: 2,
title: "网络终端维护",
subTitle: "网络终端设备的日常维护工作",
},
{
id: 3,
title: "办公系统维护",
subTitle: "日常办公系统软件维护工作",
},
{
id: 4,
title: "系统优化",
subTitle: "日常优化系统相关工作任务",
},
{
id: 5,
title: "网站维护",
subTitle: "网站网页维护相关工作",
},
{
id: 6,
title: "公众号APP维护",
subTitle: "移动端日常维护工作",
},
],
};
},
methods: {
createNow(index) {},
},
};
</script>
<style scoped lang="scss">
.content {
background: #fff;
height: 760px;
min-height: 760px;
padding: 50px;
box-sizing: border-box;
border-radius: 3px;
}
.main {
display: flex;
flex-wrap: wrap;
.item {
padding: 32px 30px 26px 37px;
box-sizing: border-box;
width: 336px;
height: 184px;
border: 1px solid #cfcfcf;
margin-right: 50px;
margin-bottom: 50px;
.item-top {
margin-bottom: 34px;
display: flex;
justify-content: space-between;
}
.title {
font-size: 20px;
color: #333333;
}
.subTitle {
margin-top: 10px;
color: #999999;
font-size: 14px;
}
.btn {
width: 117px;
height: 37px;
border-radius: 100px 100px 100px 100px;
border: 1px solid #cfcfcf;
font-size: 16px;
color: #666;
text-align: center;
line-height: 37px;
}
}
.item:nth-child(4) {
margin-right: 0;
}
}
</style>

@ -0,0 +1,297 @@
<template>
<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="系统名称"
class="search-select"
>
<el-option
v-for="item in projectList"
:key="item.id"
:label="item.projectName"
:value="item.id"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.moduleName"
placeholder="模块名称"
class="search-select"
>
<el-option
v-for="item in moduleNamesList"
:key="item.moduleName"
:label="item.moduleName"
:value="item.moduleName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.manageDeptId"
placeholder="管理部门"
class="search-select"
>
<el-option
v-for="item in deptsList"
:key="item.id"
:label="item.fullName"
:value="item.id"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.maintenanceDeptId"
placeholder="运维公司"
class="search-select"
>
<el-option
v-for="item in usersList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="display: flex">
<el-button class="search-btn" @click="searchHandle(1)"
>查询</el-button
>
<el-button
class="search-btn"
style="margin: 0; background: #2ee27c"
@click="addHandle"
>新增</el-button
>
<div class="search-reset" @click="searchHandle(2)">
<i class="el-icon-refresh-right" style="font-size: 20px"></i>
</div>
</div>
</div>
</el-form>
<div style="margin-top: 30px">
<avue-crud
id="avue-id"
ref="crud"
v-model="form"
:option="option"
:data="tableData"
:page.sync="page"
:table-loading="loading"
@row-save="rowSave"
@row-update="rowUpdate"
@row-del="rowDel"
@current-change="currentChange"
@size-change="sizeChange"
>
<template slot-scope="scope" slot="menu">
<el-button type="primary" @click="editHandle(scope.row)"
>编辑
</el-button>
<el-button type="danger" @click="rowDel(scope.row)">删除 </el-button>
</template>
</avue-crud>
</div>
</div>
</template>
<script>
import {
getList,
add,
update,
remove,
getDictionaries,
} from "@/api/maintenance/system.js";
import { tableOption } from "@/const/maintenance/system.js";
export default {
data() {
return {
form: {
moduleNameList: [
{
moduleName: "",
},
],
},
searchForm: {},
option: tableOption,
page: {
current: 1,
total: 0,
size: 10,
},
//
tableData: [],
loading: false,
// 4
usersList: [],
deptsList: [],
projectList: [],
moduleNamesList: [],
};
},
created() {
this.getDict();
this.onLoad();
},
methods: {
//
getDict() {
getDictionaries().then((res) => {
const { depts, moduleNames, projectNames, users } = res.data.data;
//
this.projectList = projectNames;
const projectNamesColumn = this.findObject(
this.option.column,
"projectName"
);
projectNamesColumn.dicData = projectNames;
//
this.deptsList = depts;
const deptsColumn = this.findObject(this.option.column, "manageDeptId");
deptsColumn.dicData = depts;
//
this.usersList = users;
const usersColumn = this.findObject(
this.option.column,
"maintenanceDeptId"
);
usersColumn.dicData = users;
//
this.moduleNamesList = moduleNames;
});
},
//
onLoad() {
this.loading = true;
const { current, size } = this.page;
getList({ current, size, ...this.searchForm }).then((res) => {
const { total, records } = res.data.data;
this.page.total = total;
this.tableData = records;
this.loading = false;
});
},
//
currentChange(currentPage) {
this.page.current = currentPage;
this.onLoad();
},
sizeChange(pageSize) {
this.page.size = pageSize;
this.onLoad();
},
//
searchHandle(index) {
this.page.current = 1;
if (index === 2) {
this.searchForm = {};
}
this.onLoad();
},
//
addHandle() {
this.form = {
moduleNameList: [
{
moduleName: "",
},
],
};
this.$refs.crud.rowAdd();
},
editHandle(row) {
this.$refs.crud.rowEdit(row);
},
//
rowSave(row, done, loading) {
add(row).then(
(res) => {
const data = res.data.data;
row.id = data.id;
this.$message({ type: "success", message: "新增成功!" });
this.onLoad();
this.getDict();
//
done(row);
},
(error) => {
window.console.log(error);
loading();
}
);
},
//
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "修改成功!",
});
done();
},
(error) => {
window.console.log(error);
loading();
}
);
},
//
rowDel(row) {
this.$confirm("此操作会删除该数据,且无法恢复,确定删除数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
remove(row.id).then((res) => {
//
console.log(res);
this.$message.success("删除成功!");
this.onLoad(this.page[0]);
});
})
.catch(() => {
// this.$message({ type: "info", message: "" });
});
},
},
};
</script>
<style lang="scss" scoped>
.search {
display: flex;
justify-content: space-between;
}
.search-select {
width: 150px;
margin-right: 20px;
}
.search-input {
width: 288px;
}
.search-btn {
width: 130px;
height: 46px !important;
background: #2e92f6;
color: #fff;
margin: 0 20px;
}
.search-reset {
width: 46px;
height: 46px !important;
background: #ff9130;
margin-left: 20px;
color: #fff;
text-align: center;
line-height: 46px;
}
/deep/ .el-input__inner {
height: 46px;
}
</style>

@ -2,17 +2,17 @@
<div class="cus-container">
<el-form :model="searchForm">
<div class="search">
<div>
<div style="display: flex; align-items: center">
<el-select
v-model="searchForm.taskParentId"
placeholder="任务父类"
class="search-select"
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in parentList"
:key="item.id"
:label="item.dictValue"
:value="item.id"
>
</el-option>
</el-select>
@ -22,10 +22,10 @@
class="search-select"
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in taskTypeList"
:key="item.taskTypeName"
:label="item.taskTypeName"
:value="item.taskTypeName"
>
</el-option>
</el-select>
@ -35,30 +35,31 @@
class="search-select"
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in levelList"
:key="item.id"
:label="item.dictValue"
:value="item.id"
>
</el-option>
</el-select>
<el-date-picker
style="width: 180px"
v-model="searchForm.createTime"
type="datetime"
placeholder="创建日期"
style="width: 314px; margin-right: 20px"
v-model="searchForm.timeArr"
format="yyyy-MM-dd HH:mm"
valueFormat="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</div>
<div style="display: flex">
value-format="yyyy-MM-dd HH:mm:ss"
class="search-picker"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-input
:rows="18"
v-model="searchForm.name"
v-model="searchForm.createUserName"
placeholder="请输入创建人"
class="search-input"
></el-input>
</div>
<div style="display: flex">
<el-button class="search-btn" @click="searchHandle(1)"
>查询</el-button
>
@ -99,12 +100,22 @@
</div>
</template>
<script>
import { getList, add, update, remove } from "@/api/maintenance/task.js";
import {
getList,
add,
update,
remove,
getTaskParent,
getTaskLevel,
getTaskTypeData
} from "@/api/maintenance/task.js";
import { tableOption } from "@/const/maintenance/task.js";
export default {
data() {
return {
searchForm: {},
searchForm: {
timeArr: null,
},
conpanyList: [{ label: "运维公司", value: 1 }],
option: tableOption,
page: {
@ -115,17 +126,59 @@ export default {
//
tableData: [],
loading: false,
parentList: [],
levelList: [],
};
},
created() {
this.getDict();
this.onLoad();
},
methods: {
//
getDict() {
getTaskParent().then((res) => {
this.parentList = res.data.data;
const column = this.findObject(this.option.column, "taskParentId");
column.dicData = res.data.data;
});
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() {
this.loading = true;
const { current, size } = this.page;
getList(Object.assign({ current, size })).then((res) => {
if (
this.searchForm.timeArr !== null &&
this.searchForm.timeArr !== undefined
) {
this.searchForm.startTime = this.searchForm.timeArr[0];
this.searchForm.endTime = this.searchForm.timeArr[1];
}
const {
taskParentId,
taskTypeName,
taskLevel,
createUserName,
startTime,
endTime,
} = this.searchForm;
let params = {
taskParentId,
taskTypeName,
taskLevel,
createUserName,
startTime,
endTime,
};
getList({ current, size, ...params }).then((res) => {
const { total, records } = res.data.data;
this.page.total = total;
this.tableData = records;
@ -143,10 +196,11 @@ export default {
},
//
searchHandle(index) {
if (index === 1) {
//
} else {
//
this.page.current = 1;
if (index === 2) {
this.searchForm = {
timeArr: null,
};
}
this.onLoad();
},

@ -46,7 +46,8 @@ export default {
userUrl: {
type: String,
default: () => {
return '/api/blade-user/search/user'
// return '/api/blade-user/search/user'
return '/api/blade-user/search/userToProcess'
}
},
customOption: Object,

Loading…
Cancel
Save