diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/views/components/uploadFile.vue b/src/views/components/uploadFile.vue
index 788a7a1..615f959 100644
--- a/src/views/components/uploadFile.vue
+++ b/src/views/components/uploadFile.vue
@@ -16,19 +16,14 @@
-
- {{ item.data.originalName }}
+
+ {{ item.originalName }}
-
+
@@ -38,8 +33,8 @@
import { fileUpload, fileDelete } from '@/api/publicApi.js';
import { useStore } from '@/pinia/store.js';
import { getCurrentInstance } from 'vue';
-import 'vue3-video-play/dist/style.css';
-import vue3VideoPlay from 'vue3-video-play';
+// import 'vue3-video-play/dist/style.css';
+// import vue3VideoPlay from 'vue3-video-play';
const props = defineProps({
//最大上传数
@@ -74,13 +69,11 @@
// 查看视频弹窗
function checkVideo(url) {
- console.log(url, 'url');
videoUrl.value = url;
- console.log(videoUrl.value, '1111');
+ console.log(videoUrl.value, ' videoUrl.value');
showVideo.value = true;
}
// 开始上传图片
-
const beforeRead = async (file) => {
// console.log(file, '原本上传的文件--');
// 压缩图片,大于500kb就压缩
@@ -98,9 +91,10 @@
};
formData.append('file', imgFile);
let res = await fileUpload(formData, config);
- if (res && res.data.code == 200) {
+ if (res && res.code == 200) {
uploadList.value.push(res.data);
console.log(uploadList.value, ' uploadList.value');
+
emit('update:saveFileArr', uploadList.value); //绑定的传值赋值
proxy.showSuccessToast('上传成功');
} else {
@@ -117,7 +111,7 @@
};
// 图片删除
const deletePic = (file) => {
- // console.log('图片删除--', file);
+ console.log('图片删除--', file);
let fileIndex = null;
uploadList.value.map((item, index) => {
if (file.file.name == (item.originalName || item.name)) {
@@ -198,6 +192,7 @@
};
fileList.value.push(params);
uploadList.value.push(params);
+ console.log(uploadList.value, ' uploadList.value1111');
});
});
onBeforeUnmount(() => {
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/views/components/uploadFile.vue b/src/views/components/uploadFile.vue
index 788a7a1..615f959 100644
--- a/src/views/components/uploadFile.vue
+++ b/src/views/components/uploadFile.vue
@@ -16,19 +16,14 @@
-
- {{ item.data.originalName }}
+
+ {{ item.originalName }}
-
+
@@ -38,8 +33,8 @@
import { fileUpload, fileDelete } from '@/api/publicApi.js';
import { useStore } from '@/pinia/store.js';
import { getCurrentInstance } from 'vue';
-import 'vue3-video-play/dist/style.css';
-import vue3VideoPlay from 'vue3-video-play';
+// import 'vue3-video-play/dist/style.css';
+// import vue3VideoPlay from 'vue3-video-play';
const props = defineProps({
//最大上传数
@@ -74,13 +69,11 @@
// 查看视频弹窗
function checkVideo(url) {
- console.log(url, 'url');
videoUrl.value = url;
- console.log(videoUrl.value, '1111');
+ console.log(videoUrl.value, ' videoUrl.value');
showVideo.value = true;
}
// 开始上传图片
-
const beforeRead = async (file) => {
// console.log(file, '原本上传的文件--');
// 压缩图片,大于500kb就压缩
@@ -98,9 +91,10 @@
};
formData.append('file', imgFile);
let res = await fileUpload(formData, config);
- if (res && res.data.code == 200) {
+ if (res && res.code == 200) {
uploadList.value.push(res.data);
console.log(uploadList.value, ' uploadList.value');
+
emit('update:saveFileArr', uploadList.value); //绑定的传值赋值
proxy.showSuccessToast('上传成功');
} else {
@@ -117,7 +111,7 @@
};
// 图片删除
const deletePic = (file) => {
- // console.log('图片删除--', file);
+ console.log('图片删除--', file);
let fileIndex = null;
uploadList.value.map((item, index) => {
if (file.file.name == (item.originalName || item.name)) {
@@ -198,6 +192,7 @@
};
fileList.value.push(params);
uploadList.value.push(params);
+ console.log(uploadList.value, ' uploadList.value1111');
});
});
onBeforeUnmount(() => {
diff --git a/src/views/home/home_my.vue b/src/views/home/home_my.vue
index 1b24a1b..5008332 100644
--- a/src/views/home/home_my.vue
+++ b/src/views/home/home_my.vue
@@ -66,8 +66,8 @@
// 退出登录
function logOut() {
- localStorage.removeItem('NFAppToken');
- document.cookie = 'NFAppToken=' + '';
+ localStorage.removeItem('KFAppToken');
+ document.cookie = 'KFAppToken=' + '';
proxy.showSuccessToast('退出成功');
router.push('/login');
}
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/views/components/uploadFile.vue b/src/views/components/uploadFile.vue
index 788a7a1..615f959 100644
--- a/src/views/components/uploadFile.vue
+++ b/src/views/components/uploadFile.vue
@@ -16,19 +16,14 @@
-
- {{ item.data.originalName }}
+
+ {{ item.originalName }}
-
+
@@ -38,8 +33,8 @@
import { fileUpload, fileDelete } from '@/api/publicApi.js';
import { useStore } from '@/pinia/store.js';
import { getCurrentInstance } from 'vue';
-import 'vue3-video-play/dist/style.css';
-import vue3VideoPlay from 'vue3-video-play';
+// import 'vue3-video-play/dist/style.css';
+// import vue3VideoPlay from 'vue3-video-play';
const props = defineProps({
//最大上传数
@@ -74,13 +69,11 @@
// 查看视频弹窗
function checkVideo(url) {
- console.log(url, 'url');
videoUrl.value = url;
- console.log(videoUrl.value, '1111');
+ console.log(videoUrl.value, ' videoUrl.value');
showVideo.value = true;
}
// 开始上传图片
-
const beforeRead = async (file) => {
// console.log(file, '原本上传的文件--');
// 压缩图片,大于500kb就压缩
@@ -98,9 +91,10 @@
};
formData.append('file', imgFile);
let res = await fileUpload(formData, config);
- if (res && res.data.code == 200) {
+ if (res && res.code == 200) {
uploadList.value.push(res.data);
console.log(uploadList.value, ' uploadList.value');
+
emit('update:saveFileArr', uploadList.value); //绑定的传值赋值
proxy.showSuccessToast('上传成功');
} else {
@@ -117,7 +111,7 @@
};
// 图片删除
const deletePic = (file) => {
- // console.log('图片删除--', file);
+ console.log('图片删除--', file);
let fileIndex = null;
uploadList.value.map((item, index) => {
if (file.file.name == (item.originalName || item.name)) {
@@ -198,6 +192,7 @@
};
fileList.value.push(params);
uploadList.value.push(params);
+ console.log(uploadList.value, ' uploadList.value1111');
});
});
onBeforeUnmount(() => {
diff --git a/src/views/home/home_my.vue b/src/views/home/home_my.vue
index 1b24a1b..5008332 100644
--- a/src/views/home/home_my.vue
+++ b/src/views/home/home_my.vue
@@ -66,8 +66,8 @@
// 退出登录
function logOut() {
- localStorage.removeItem('NFAppToken');
- document.cookie = 'NFAppToken=' + '';
+ localStorage.removeItem('KFAppToken');
+ document.cookie = 'KFAppToken=' + '';
proxy.showSuccessToast('退出成功');
router.push('/login');
}
diff --git a/src/views/login.vue b/src/views/login.vue
index 0870d8c..8174527 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -78,11 +78,11 @@
allData.loginLoading = true;
// 默认存储密码
if (allData.remberPass) {
- localStorage.setItem('usernameNFApp', allData.userName);
- localStorage.setItem('passwordNFApp', EncryptAES(allData.password));
+ localStorage.setItem('usernameKFApp', allData.userName);
+ localStorage.setItem('passwordKFApp', EncryptAES(allData.password));
} else {
- localStorage.removeItem('usernameNFApp');
- localStorage.removeItem('passwordNFApp');
+ localStorage.removeItem('usernameKFApp');
+ localStorage.removeItem('passwordKFApp');
}
let params = {
username: allData.userName,
@@ -94,23 +94,23 @@
if (res && res.code == 200) {
allData.loginLoading = false;
- const { access_token } = res;
+ let access_token = res.data.access_token;
pinias.$patch((state) => {
state.token = access_token;
});
- localStorage.setItem('NFAppToken', access_token); //存储token
+ localStorage.setItem('KFAppToken', access_token); //存储token
router.push('/home_homePage');
// 获取用户个人详细信息
- // getInfo().then((res2) => {
- // let datas = res2.data.user;
- // pinias.$patch((state) => {
- // state.userNo = datas.userId;
- // state.phonenumber = datas.phonenumber;
- // state.imageUrl = datas.avatar || userImages;
- // state.userName = datas.nickName || '管理员';
- // state.userDeptName = datas.dept.deptName;
- // });
- // });
+ getInfo().then((res2) => {
+ let datas = res2.data.user;
+ pinias.$patch((state) => {
+ state.userNo = datas.userId;
+ state.phonenumber = datas.phonenumber;
+ state.imageUrl = datas.avatar || userImages;
+ state.userName = datas.nickName || '管理员';
+ state.userDeptName = datas.dept.deptName;
+ });
+ });
} else {
getCode();
allData.loginLoading = false;
@@ -128,10 +128,10 @@
onMounted(() => {
getCode();
if (allData.remberPass) {
- const usernameNFApp = localStorage.getItem('usernameNFApp');
- const passwordNFApp = localStorage.getItem('passwordNFApp');
- allData.userName = usernameNFApp ? usernameNFApp : '';
- allData.password = passwordNFApp ? DecryptAES(passwordNFApp) : '';
+ const usernameKFApp = localStorage.getItem('usernameKFApp');
+ const passwordKFApp = localStorage.getItem('passwordKFApp');
+ allData.userName = usernameKFApp ? usernameKFApp : '';
+ allData.password = passwordKFApp ? DecryptAES(passwordKFApp) : '';
}
});
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/views/components/uploadFile.vue b/src/views/components/uploadFile.vue
index 788a7a1..615f959 100644
--- a/src/views/components/uploadFile.vue
+++ b/src/views/components/uploadFile.vue
@@ -16,19 +16,14 @@
-
- {{ item.data.originalName }}
+
+ {{ item.originalName }}
-
+
@@ -38,8 +33,8 @@
import { fileUpload, fileDelete } from '@/api/publicApi.js';
import { useStore } from '@/pinia/store.js';
import { getCurrentInstance } from 'vue';
-import 'vue3-video-play/dist/style.css';
-import vue3VideoPlay from 'vue3-video-play';
+// import 'vue3-video-play/dist/style.css';
+// import vue3VideoPlay from 'vue3-video-play';
const props = defineProps({
//最大上传数
@@ -74,13 +69,11 @@
// 查看视频弹窗
function checkVideo(url) {
- console.log(url, 'url');
videoUrl.value = url;
- console.log(videoUrl.value, '1111');
+ console.log(videoUrl.value, ' videoUrl.value');
showVideo.value = true;
}
// 开始上传图片
-
const beforeRead = async (file) => {
// console.log(file, '原本上传的文件--');
// 压缩图片,大于500kb就压缩
@@ -98,9 +91,10 @@
};
formData.append('file', imgFile);
let res = await fileUpload(formData, config);
- if (res && res.data.code == 200) {
+ if (res && res.code == 200) {
uploadList.value.push(res.data);
console.log(uploadList.value, ' uploadList.value');
+
emit('update:saveFileArr', uploadList.value); //绑定的传值赋值
proxy.showSuccessToast('上传成功');
} else {
@@ -117,7 +111,7 @@
};
// 图片删除
const deletePic = (file) => {
- // console.log('图片删除--', file);
+ console.log('图片删除--', file);
let fileIndex = null;
uploadList.value.map((item, index) => {
if (file.file.name == (item.originalName || item.name)) {
@@ -198,6 +192,7 @@
};
fileList.value.push(params);
uploadList.value.push(params);
+ console.log(uploadList.value, ' uploadList.value1111');
});
});
onBeforeUnmount(() => {
diff --git a/src/views/home/home_my.vue b/src/views/home/home_my.vue
index 1b24a1b..5008332 100644
--- a/src/views/home/home_my.vue
+++ b/src/views/home/home_my.vue
@@ -66,8 +66,8 @@
// 退出登录
function logOut() {
- localStorage.removeItem('NFAppToken');
- document.cookie = 'NFAppToken=' + '';
+ localStorage.removeItem('KFAppToken');
+ document.cookie = 'KFAppToken=' + '';
proxy.showSuccessToast('退出成功');
router.push('/login');
}
diff --git a/src/views/login.vue b/src/views/login.vue
index 0870d8c..8174527 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -78,11 +78,11 @@
allData.loginLoading = true;
// 默认存储密码
if (allData.remberPass) {
- localStorage.setItem('usernameNFApp', allData.userName);
- localStorage.setItem('passwordNFApp', EncryptAES(allData.password));
+ localStorage.setItem('usernameKFApp', allData.userName);
+ localStorage.setItem('passwordKFApp', EncryptAES(allData.password));
} else {
- localStorage.removeItem('usernameNFApp');
- localStorage.removeItem('passwordNFApp');
+ localStorage.removeItem('usernameKFApp');
+ localStorage.removeItem('passwordKFApp');
}
let params = {
username: allData.userName,
@@ -94,23 +94,23 @@
if (res && res.code == 200) {
allData.loginLoading = false;
- const { access_token } = res;
+ let access_token = res.data.access_token;
pinias.$patch((state) => {
state.token = access_token;
});
- localStorage.setItem('NFAppToken', access_token); //存储token
+ localStorage.setItem('KFAppToken', access_token); //存储token
router.push('/home_homePage');
// 获取用户个人详细信息
- // getInfo().then((res2) => {
- // let datas = res2.data.user;
- // pinias.$patch((state) => {
- // state.userNo = datas.userId;
- // state.phonenumber = datas.phonenumber;
- // state.imageUrl = datas.avatar || userImages;
- // state.userName = datas.nickName || '管理员';
- // state.userDeptName = datas.dept.deptName;
- // });
- // });
+ getInfo().then((res2) => {
+ let datas = res2.data.user;
+ pinias.$patch((state) => {
+ state.userNo = datas.userId;
+ state.phonenumber = datas.phonenumber;
+ state.imageUrl = datas.avatar || userImages;
+ state.userName = datas.nickName || '管理员';
+ state.userDeptName = datas.dept.deptName;
+ });
+ });
} else {
getCode();
allData.loginLoading = false;
@@ -128,10 +128,10 @@
onMounted(() => {
getCode();
if (allData.remberPass) {
- const usernameNFApp = localStorage.getItem('usernameNFApp');
- const passwordNFApp = localStorage.getItem('passwordNFApp');
- allData.userName = usernameNFApp ? usernameNFApp : '';
- allData.password = passwordNFApp ? DecryptAES(passwordNFApp) : '';
+ const usernameKFApp = localStorage.getItem('usernameKFApp');
+ const passwordKFApp = localStorage.getItem('passwordKFApp');
+ allData.userName = usernameKFApp ? usernameKFApp : '';
+ allData.password = passwordKFApp ? DecryptAES(passwordKFApp) : '';
}
});
diff --git a/src/views/xuncha/TaskInspection.vue b/src/views/xuncha/TaskInspection.vue
index 19b129c..606f35f 100644
--- a/src/views/xuncha/TaskInspection.vue
+++ b/src/views/xuncha/TaskInspection.vue
@@ -5,7 +5,7 @@
-
![]()
+
@@ -37,7 +37,7 @@
:offset="50"
@load="lowerRefresh"
>
-
+
@@ -122,9 +122,11 @@
diff --git a/src/api/xuncha.js b/src/api/xuncha.js
new file mode 100644
index 0000000..7d9088d
--- /dev/null
+++ b/src/api/xuncha.js
@@ -0,0 +1,88 @@
+import request from '@/utils/request';
+
+// 信息
+export function patrolTaskpage(params) {
+ return request({
+ url: '/business/patrolTask/page',
+ method: 'get',
+ params,
+ });
+}
+
+// 获取项目选择列表
+export function getProjectInfoList(params) {
+ return request({
+ url: '/business/projectInfoNew/list',
+ method: 'get',
+ params,
+ });
+}
+
+// 上传问题
+export function patrolProblemadd(data) {
+ return request({
+ url: '/business/patrolProblem/add',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 开始巡查
+export function patrolTaskbeginPatrol(data) {
+ return request({
+ url: '/business/patrolTask/beginPatrol',
+ method: 'post',
+ data: data,
+ });
+}
+
+// 状态统计
+export function status_statistics(params) {
+ return request({
+ url: '/business/patrolTask/status_statistics',
+ method: 'get',
+ params,
+ });
+}
+// 结束巡查
+export function patrolTaskFinishPatrol(data) {
+ return request({
+ url: '/business/patrolTask/finishPatrol',
+ method: 'POST',
+ data: data,
+ });
+}
+
+// // 删除任务
+export function patrolTaskId(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'delete',
+ });
+}
+
+// 重新巡查
+export function patrolTaskRestartPatrol(query) {
+ return request({
+ url: '/business/patrolTask/restartPatrol',
+ method: 'PUT',
+ params: query,
+ });
+}
+
+// 问题统计
+export function patrolProblemList(params) {
+ return request({
+ url: '/business/patrolProblem/list',
+ method: 'get',
+ params,
+ });
+}
+
+// // 查询巡查任务
+export function PatrolTaskID(id) {
+ return request({
+ url: '/business/patrolTask/' + id,
+ method: 'get',
+ });
+}
diff --git a/src/pinia/store.js b/src/pinia/store.js
index 53324e4..fa88a84 100644
--- a/src/pinia/store.js
+++ b/src/pinia/store.js
@@ -3,14 +3,14 @@
export const useStore = defineStore('HomePage', {
state: () => {
return {
- token: '2222',
+ token: '',
userNo: '', //用户名称
loading: false, //全局loading效果
imageUrl: '', //用户默认头像
userName: '', //用户姓名
userDeptName: '', //用户部门
appMenuAuthList: [], //角色访问菜单权限
- authType: 2, //权限类型 1-管理 2-操作
+ authType: 1, //权限类型 1-管理 2-操作
};
},
persist: {
diff --git a/src/router/index.js b/src/router/index.js
index c2087d1..30b7cc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,15 +46,21 @@
path: '/TaskInspection',
name: 'TaskInspection',
component: () => import('@/views/xuncha/TaskInspection.vue'),
- meta: { keepAlive: true, title: '任务巡查', ifShowHead: true, ifBack: true },
+ meta: { keepAlive: false, title: '任务巡查', ifShowHead: true, ifBack: true },
},
{
- path: '/inspectionPipe',
- name: 'inspectionPipe',
+ path: '/inspectionA',
+ name: 'inspectionA',
component: () => import('@/views/xuncha/components/inspection.vue'),
meta: { keepAlive: false, title: '开始巡查任务', ifShowHead: true },
},
{
+ path: '/patroLogDetails',
+ name: 'patroLogDetails',
+ component: () => import('@/views/xuncha/components/patroLogDetails.vue'),
+ meta: { keepAlive: false, title: '巡查记录详情', ifShowHead: true },
+ },
+ {
path: '/editPassword',
name: 'editPassword',
component: () => import('@/views/home/editPassword.vue'),
diff --git a/src/utils/request.js b/src/utils/request.js
index d16fa70..e79fba9 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -75,6 +75,7 @@
dataType: 'json',
timeout: config.timeout || 8000,
});
+
//处理返回
promise
.then((res) => {
diff --git a/src/views/components/Header.vue b/src/views/components/Header.vue
index c5ea586..3841be3 100644
--- a/src/views/components/Header.vue
+++ b/src/views/components/Header.vue
@@ -22,12 +22,12 @@
diff --git a/src/views/components/uploadFile.vue b/src/views/components/uploadFile.vue
index 788a7a1..615f959 100644
--- a/src/views/components/uploadFile.vue
+++ b/src/views/components/uploadFile.vue
@@ -16,19 +16,14 @@
-
- {{ item.data.originalName }}
+
+ {{ item.originalName }}
-
+
@@ -38,8 +33,8 @@
import { fileUpload, fileDelete } from '@/api/publicApi.js';
import { useStore } from '@/pinia/store.js';
import { getCurrentInstance } from 'vue';
-import 'vue3-video-play/dist/style.css';
-import vue3VideoPlay from 'vue3-video-play';
+// import 'vue3-video-play/dist/style.css';
+// import vue3VideoPlay from 'vue3-video-play';
const props = defineProps({
//最大上传数
@@ -74,13 +69,11 @@
// 查看视频弹窗
function checkVideo(url) {
- console.log(url, 'url');
videoUrl.value = url;
- console.log(videoUrl.value, '1111');
+ console.log(videoUrl.value, ' videoUrl.value');
showVideo.value = true;
}
// 开始上传图片
-
const beforeRead = async (file) => {
// console.log(file, '原本上传的文件--');
// 压缩图片,大于500kb就压缩
@@ -98,9 +91,10 @@
};
formData.append('file', imgFile);
let res = await fileUpload(formData, config);
- if (res && res.data.code == 200) {
+ if (res && res.code == 200) {
uploadList.value.push(res.data);
console.log(uploadList.value, ' uploadList.value');
+
emit('update:saveFileArr', uploadList.value); //绑定的传值赋值
proxy.showSuccessToast('上传成功');
} else {
@@ -117,7 +111,7 @@
};
// 图片删除
const deletePic = (file) => {
- // console.log('图片删除--', file);
+ console.log('图片删除--', file);
let fileIndex = null;
uploadList.value.map((item, index) => {
if (file.file.name == (item.originalName || item.name)) {
@@ -198,6 +192,7 @@
};
fileList.value.push(params);
uploadList.value.push(params);
+ console.log(uploadList.value, ' uploadList.value1111');
});
});
onBeforeUnmount(() => {
diff --git a/src/views/home/home_my.vue b/src/views/home/home_my.vue
index 1b24a1b..5008332 100644
--- a/src/views/home/home_my.vue
+++ b/src/views/home/home_my.vue
@@ -66,8 +66,8 @@
// 退出登录
function logOut() {
- localStorage.removeItem('NFAppToken');
- document.cookie = 'NFAppToken=' + '';
+ localStorage.removeItem('KFAppToken');
+ document.cookie = 'KFAppToken=' + '';
proxy.showSuccessToast('退出成功');
router.push('/login');
}
diff --git a/src/views/login.vue b/src/views/login.vue
index 0870d8c..8174527 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -78,11 +78,11 @@
allData.loginLoading = true;
// 默认存储密码
if (allData.remberPass) {
- localStorage.setItem('usernameNFApp', allData.userName);
- localStorage.setItem('passwordNFApp', EncryptAES(allData.password));
+ localStorage.setItem('usernameKFApp', allData.userName);
+ localStorage.setItem('passwordKFApp', EncryptAES(allData.password));
} else {
- localStorage.removeItem('usernameNFApp');
- localStorage.removeItem('passwordNFApp');
+ localStorage.removeItem('usernameKFApp');
+ localStorage.removeItem('passwordKFApp');
}
let params = {
username: allData.userName,
@@ -94,23 +94,23 @@
if (res && res.code == 200) {
allData.loginLoading = false;
- const { access_token } = res;
+ let access_token = res.data.access_token;
pinias.$patch((state) => {
state.token = access_token;
});
- localStorage.setItem('NFAppToken', access_token); //存储token
+ localStorage.setItem('KFAppToken', access_token); //存储token
router.push('/home_homePage');
// 获取用户个人详细信息
- // getInfo().then((res2) => {
- // let datas = res2.data.user;
- // pinias.$patch((state) => {
- // state.userNo = datas.userId;
- // state.phonenumber = datas.phonenumber;
- // state.imageUrl = datas.avatar || userImages;
- // state.userName = datas.nickName || '管理员';
- // state.userDeptName = datas.dept.deptName;
- // });
- // });
+ getInfo().then((res2) => {
+ let datas = res2.data.user;
+ pinias.$patch((state) => {
+ state.userNo = datas.userId;
+ state.phonenumber = datas.phonenumber;
+ state.imageUrl = datas.avatar || userImages;
+ state.userName = datas.nickName || '管理员';
+ state.userDeptName = datas.dept.deptName;
+ });
+ });
} else {
getCode();
allData.loginLoading = false;
@@ -128,10 +128,10 @@
onMounted(() => {
getCode();
if (allData.remberPass) {
- const usernameNFApp = localStorage.getItem('usernameNFApp');
- const passwordNFApp = localStorage.getItem('passwordNFApp');
- allData.userName = usernameNFApp ? usernameNFApp : '';
- allData.password = passwordNFApp ? DecryptAES(passwordNFApp) : '';
+ const usernameKFApp = localStorage.getItem('usernameKFApp');
+ const passwordKFApp = localStorage.getItem('passwordKFApp');
+ allData.userName = usernameKFApp ? usernameKFApp : '';
+ allData.password = passwordKFApp ? DecryptAES(passwordKFApp) : '';
}
});
diff --git a/src/views/xuncha/TaskInspection.vue b/src/views/xuncha/TaskInspection.vue
index 19b129c..606f35f 100644
--- a/src/views/xuncha/TaskInspection.vue
+++ b/src/views/xuncha/TaskInspection.vue
@@ -5,7 +5,7 @@
-
![]()
+
@@ -37,7 +37,7 @@
:offset="50"
@load="lowerRefresh"
>
-
+
@@ -122,9 +122,11 @@
diff --git a/vite.config.js b/vite.config.js
index 5a203cd..d43716a 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -10,8 +10,8 @@
const Timestamp = new Date().getTime(); //随机时间戳
// const targetUrl = 'http://192.168.16.100:7200'; //陈迁
-const targetUrl = 'http://192.168.1.6:7300'; //杨辉
-// const targetUrl = 'https://server2.wh-nf.cn:8082/prod-api'; //线上
+// const targetUrl = 'http://192.168.1.6:7300'; //杨辉
+const targetUrl = 'https://server2.wh-nf.cn:8082/prod-api'; //线上
export default defineConfig({
// 地址是和router中和ngix中配置的名称一致
@@ -82,7 +82,7 @@
'/business': {
target: targetUrl,
changeOrigin: true,
- rewrite: (path) => path.replace(/^\/business/, '/business'),
+ rewrite: (p) => p.replace(/^\/business/, '/business'),
},
'/publicService': {
target: targetUrl,