diff --git a/package.json b/package.json index 886ae96..787c21d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "less-loader": "5.0.0", "momen": "^0.0.1-security", "nprogress": "^0.2.0", + "qrcodejs2": "^0.0.2", "vue": "^2.6.11", "vue-router": "^3.5.3", "vuex": "^3.6.2" diff --git a/src/api/operation/inspection/route.js b/src/api/operation/inspection/route.js index 2e55e2b..72b3dc8 100644 --- a/src/api/operation/inspection/route.js +++ b/src/api/operation/inspection/route.js @@ -2,44 +2,51 @@ import httpService from "@/request" // 路线 -export function routerList(params) { +export function routeList(params) { return httpService({ - url: `/user/inspectionRouter/list`, + url: `/user/inspectionRoute/list`, method: 'get', params: params, }) } -export function routerisEnable(params) { +export function routeisEnable(params) { return httpService({ - url: `/user/inspectionRouter/isEnable`, + url: `/user/inspectionRoute/isEnable`, method: 'get', params: params, }) } -export function routerInfo(params) { +export function pointSelect(params) { return httpService({ - url: `/user/inspectionRouter/findById`, + url: `/user/inspectionPoint/allList`, method: 'get', params: params, }) } -export function routerInsert(params) { +export function routeInfo(params) { return httpService({ - url: `/user/inspectionRouter/insert`, + url: `/user/inspectionRoute/findById`, + method: 'get', + params: params, + }) +} +export function routeInsert(params) { + return httpService({ + url: `/user/inspectionRoute/insert`, method: 'post', data: params, }) } -export function routerDel(params) { +export function routeDel(params) { return httpService({ - url: `/user/inspectionRouter/delete`, + url: `/user/inspectionRoute/delete`, method: 'post', data: params, }) } -export function routerUpdate(params) { +export function routeUpdate(params) { return httpService({ - url: `/user/inspectionRouter/update`, + url: `/user/inspectionRoute/update`, method: 'post', data: params, }) diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 Binary files a/src/assets/logo.png and /dev/null differ diff --git a/src/router/operation.js b/src/router/operation.js index dd52897..477b1b4 100644 --- a/src/router/operation.js +++ b/src/router/operation.js @@ -50,6 +50,14 @@ export default [ component: resolve => require(['@/views/Operation/InspectionManage/_inspectionPlan'], resolve), meta: {title: '巡检计划'}, }, + { + path: '/InspectionManage/InspectionExecute', + name: "InspectionExecute", + title: "巡检记录", + hide: false, + component: resolve => require(['@/views/Operation/InspectionManage/_inspectionExecute/index.vue'], resolve), + meta: {title: '巡检记录'}, + }, ] }, { diff --git a/src/views/Operation/InspectionManage/_inspectionExecute/depend/config.js b/src/views/Operation/InspectionManage/_inspectionExecute/depend/config.js new file mode 100644 index 0000000..d0b7ea0 --- /dev/null +++ b/src/views/Operation/InspectionManage/_inspectionExecute/depend/config.js @@ -0,0 +1,80 @@ +export const formItem = [ + { + type: 'select', + label:'资讯分类', + prop:'categoryId', + option:[], + placeholder:'请选择' + }, + { + type: 'select', + label:'发布状态', + prop:'status', + option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'},], + placeholder:'请选择状态' + }, + { + type: 'time', + label:'创建时间', + start: 'createStartDate', + end:'createEndDate', + }, + { + type: 'input', + label:'标题', + prop:'title', + placeholder:'请输入' + }, +] +export const columns = [ + + { + title: "标题", + dataIndex: "title", + width: "10%", + }, + { + title: "分类", + dataIndex: "categoryName", + width: "10%", + }, + { + title: "发布状态", + dataIndex: "status", + width: "6%", + customRender: function (status) { + switch (status) { + case 1: + return '未发布' + case 2: + return '已发布' + } + } + }, + { + title: "阅读量", + dataIndex: "viewsNum", + width: "10%", + }, + { + title: "创建时间", + dataIndex: "createDate", + width: "12%", + }, + { + title: "操作", + dataIndex: "action", + key: "action", + width: "180", + fixed: "right", + scopedSlots: { customRender: "action" }, + }, +] +export const pagination = { + current: 1, + total: 0, + pageSize: 10, + showTotal: (total) => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, +} \ No newline at end of file diff --git a/src/views/Operation/InspectionManage/_inspectionPlan/depend/detail.vue b/src/views/Operation/InspectionManage/_inspectionExecute/depend/detail.vue similarity index 100% rename from src/views/Operation/InspectionManage/_inspectionPlan/depend/detail.vue rename to src/views/Operation/InspectionManage/_inspectionExecute/depend/detail.vue diff --git a/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.js b/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.js new file mode 100644 index 0000000..1358dae --- /dev/null +++ b/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.js @@ -0,0 +1,21 @@ +export const form = { + id:undefined, + title:undefined, + categoryId:undefined, + status:undefined, + content:undefined, + imgUrls:[] +} +export const rules = { + title:[{required:true,message:'请输入标题',trigger:'blur'}], + categoryId:[{required:true,message:'请选择分类',trigger:'change'}], + status:[{required:true,message:'请选择',trigger:'change'}], + content:[{required:true,message:'请输入',trigger:'blur'}], +} +export const options = { + status:[ + { id:1, name:'未发布' }, + { id:2, name:'已发布' }, + ], + categoryId:[] +} \ No newline at end of file diff --git a/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.vue b/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.vue new file mode 100644 index 0000000..2bd27a0 --- /dev/null +++ b/src/views/Operation/InspectionManage/_inspectionExecute/depend/form.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/views/Operation/InspectionManage/_inspectionExecute/index.vue b/src/views/Operation/InspectionManage/_inspectionExecute/index.vue new file mode 100644 index 0000000..93b6ce6 --- /dev/null +++ b/src/views/Operation/InspectionManage/_inspectionExecute/index.vue @@ -0,0 +1,190 @@ + + + + diff --git a/src/views/Operation/InspectionManage/_inspectionPlan/depend/config.js b/src/views/Operation/InspectionManage/_inspectionPlan/depend/config.js index d0b7ea0..b4b0c7f 100644 --- a/src/views/Operation/InspectionManage/_inspectionPlan/depend/config.js +++ b/src/views/Operation/InspectionManage/_inspectionPlan/depend/config.js @@ -1,66 +1,47 @@ export const formItem = [ { - type: 'select', - label:'资讯分类', - prop:'categoryId', - option:[], - placeholder:'请选择' - }, - { - type: 'select', - label:'发布状态', - prop:'status', - option:[{ id:1,name:'未发布'},{ id:2,name:'已发布'},], - placeholder:'请选择状态' - }, - { - type: 'time', - label:'创建时间', - start: 'createStartDate', - end:'createEndDate', + type: 'input', + label:'编号', + prop:'code', + placeholder:'请输入' }, { type: 'input', - label:'标题', - prop:'title', + label:'名称', + prop:'name', placeholder:'请输入' }, ] export const columns = [ - { - title: "标题", - dataIndex: "title", - width: "10%", + title: "路线编号", + dataIndex: "code", + }, + { + title: "路线名称", + dataIndex: "name", + }, + { + title: "持续时间", + dataIndex: "spaceTime", }, { - title: "分类", - dataIndex: "categoryName", - width: "10%", + title: "创建时间", + dataIndex: "createDate", }, { - title: "发布状态", + title: "状态", dataIndex: "status", width: "6%", customRender: function (status) { switch (status) { case 1: - return '未发布' + return '启用' case 2: - return '已发布' + return '停用' } } }, - { - title: "阅读量", - dataIndex: "viewsNum", - width: "10%", - }, - { - title: "创建时间", - dataIndex: "createDate", - width: "12%", - }, { title: "操作", dataIndex: "action", diff --git a/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.js b/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.js index 1358dae..1d940e7 100644 --- a/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.js +++ b/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.js @@ -1,21 +1,21 @@ export const form = { id:undefined, - title:undefined, - categoryId:undefined, + name:undefined, + describes:undefined, status:undefined, - content:undefined, - imgUrls:[] + spaceTime:undefined, + pointRouteList:[] } export const rules = { - title:[{required:true,message:'请输入标题',trigger:'blur'}], - categoryId:[{required:true,message:'请选择分类',trigger:'change'}], + name:[{required:true,message:'请输入路线名称',trigger:'blur'}], + describes:[{required:true,message:'请输入描述',trigger:'blur'}], status:[{required:true,message:'请选择',trigger:'change'}], - content:[{required:true,message:'请输入',trigger:'blur'}], + spaceTime:[{required:true,message:'请输入持续时间',trigger:'blur'}], } export const options = { status:[ - { id:1, name:'未发布' }, - { id:2, name:'已发布' }, + { id:1, name:'启用' }, + { id:2, name:'停用' }, ], - categoryId:[] + pointList:[] } \ No newline at end of file diff --git a/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.vue b/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.vue index 2bd27a0..2f20733 100644 --- a/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.vue +++ b/src/views/Operation/InspectionManage/_inspectionPlan/depend/form.vue @@ -16,65 +16,25 @@ :rules="rules" layout="vertical" > - - - - - - - - - - {{ item.name }} - - - - - - - {{ item.name }} - - - - - - - - - - 资讯封面图片 - - - + + + + + + + + + {{item.name}} + + + + + + + + {{item.name}} + +