From f9a1c057e76b15c8aa1e615c881a248a211367a1 Mon Sep 17 00:00:00 2001
From: wxc <191104855@qq.com>
Date: Sun, 10 Nov 2024 18:33:55 +0800
Subject: [PATCH] =?UTF-8?q?fit:=20=E8=AE=A4=E5=AE=9A=E5=8A=9E=E7=BB=93?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E6=89=93=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/depart.ts | 6 +
src/api/work/negative.ts | 6 +
src/components/depart-tree-select.vue | 10 +-
src/components/file/list.vue | 3 +-
src/components/file/upload-group.vue | 1 +
src/components/home/work/my-todo.vue | 6 +
src/components/negative/add.vue | 9 +
src/components/negative/approve.vue | 2 +-
.../negative/confirmation-completion.vue | 212 ++++++-
src/components/negative/countdown.vue | 1 -
src/components/negative/description.vue | 12 +-
src/components/negative/dialog.vue | 48 +-
.../negative/verify-description.vue | 60 +-
src/components/negative/verify.vue | 579 ++++++++++--------
src/components/police-select.vue | 21 +-
src/components/problem-type-select.vue | 53 ++
src/stores/modules/catch.ts | 24 +-
src/utils/util.ts | 2 +-
src/views/sensitivePerception/DictContent.vue | 5 +-
src/views/work/Query.vue | 45 +-
20 files changed, 745 insertions(+), 360 deletions(-)
create mode 100644 src/components/problem-type-select.vue
diff --git a/src/api/system/depart.ts b/src/api/system/depart.ts
index 60f2dd6..eca3961 100644
--- a/src/api/system/depart.ts
+++ b/src/api/system/depart.ts
@@ -20,6 +20,12 @@ export function departTree() {
});
}
+export function departTreeAll() {
+ return request.get({
+ url: '/depart/treeAll'
+ });
+}
+
export function secondList() {
return request.get({
url: '/depart/second'
diff --git a/src/api/work/negative.ts b/src/api/work/negative.ts
index f7aca90..ff0ca04 100644
--- a/src/api/work/negative.ts
+++ b/src/api/work/negative.ts
@@ -55,3 +55,9 @@ export function delNegative(id) {
url: `/negative/${id}`
});
}
+
+export function getCompletionInfo(id) {
+ return request.get({
+ url: `/negative/completion/${id}`
+ });
+}
diff --git a/src/components/depart-tree-select.vue b/src/components/depart-tree-select.vue
index 1f34f26..354cd3b 100644
--- a/src/components/depart-tree-select.vue
+++ b/src/components/depart-tree-select.vue
@@ -6,13 +6,21 @@ import useCatchStore from '@/stores/modules/catch'
import { ROOT_DEPART_ID } from '@/enums/appEnums';
const data = ref([])
-const departs = useCatchStore().getDeparts();
+
const props = defineProps({
showRoot: {
type: Boolean,
default: false
+ },
+ auth: {
+ type: Boolean,
+ default: true
}
})
+
+const catchSotre = useCatchStore();
+const departs = props.auth ? catchSotre.getDeparts() : catchSotre.getDepartsAll();
+
onMounted(() => {
getData()
})
diff --git a/src/components/file/list.vue b/src/components/file/list.vue
index b5fd65d..cbebcae 100644
--- a/src/components/file/list.vue
+++ b/src/components/file/list.vue
@@ -250,6 +250,8 @@ const scale = ref(0);
const translateX = ref(0);
const translateY = ref(0);
let moveFlag = false;
+let initialX = 0;
+let initialY = 0;
const fileRrror = ref(false);
function filePreview(file) {
@@ -299,7 +301,6 @@ function wheel(event) {
}
}
-
function mousedown() {
moveFlag = true;
initialX = event.clientX;
diff --git a/src/components/file/upload-group.vue b/src/components/file/upload-group.vue
index b8a2aba..32b356e 100644
--- a/src/components/file/upload-group.vue
+++ b/src/components/file/upload-group.vue
@@ -263,6 +263,7 @@ function uploadProgress(progressEvent, file) {
function handleSuccess(data, file) {
if (data.code !== 200) {
+ feedback.msgError("上传失败!");
return;
}
const filterFiles = fileList.value.filter((item) => file.uid === item.uid);
diff --git a/src/components/home/work/my-todo.vue b/src/components/home/work/my-todo.vue
index 720bbd3..b3bfdc6 100644
--- a/src/components/home/work/my-todo.vue
+++ b/src/components/home/work/my-todo.vue
@@ -107,6 +107,12 @@
prop="thingDesc"
show-overflow-tooltip
/>
+
关联问题涉及单位
@@ -588,6 +590,13 @@ function handleLinkDepart() {
form.value.departId = form.value.involveDepartId;
form.value.departName = form.value.involveDepartName;
}
+
+function handleChangeHostLevel(val) {
+ if (val === HostLevel.FIRST) {
+ form.value.departId = ''
+ }
+}
+
\ No newline at end of file
diff --git a/src/stores/modules/catch.ts b/src/stores/modules/catch.ts
index dffd87e..b165f81 100644
--- a/src/stores/modules/catch.ts
+++ b/src/stores/modules/catch.ts
@@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import { listDictDataAll, listDictProblemSourceTree } from '@/api/system/dict'
import { listDictContentTree } from '@/api/system/dictContent'
-import { departTree } from '@/api/system/depart'
+import { departTree, departTreeAll } from '@/api/system/depart'
import { listFlowNode } from '@/api/work/flowNode'
export interface CatchState {
@@ -9,12 +9,16 @@ export interface CatchState {
dictContent: any[],
dictProblemSources: any[],
departs: any[],
+ departsAll: any[],
flowNodes: any[]
}
// 判定是否已请求缓存
let departCatchFlag = true;
+let departAllCatchFlag = true;
+
const dictCatchFlag = {};
let dictProblemSourcesFlag = true;
+
const useCatchStore = defineStore({
id: 'catch',
state: ():CatchState => ({
@@ -22,6 +26,7 @@ const useCatchStore = defineStore({
dictContent: [],
dictProblemSources: [],
departs: [],
+ departsAll: [],
flowNodes: []
}),
getters: {},
@@ -100,6 +105,23 @@ const useCatchStore = defineStore({
}
return this.departs;
},
+ getDepartsAll() {
+ if (!this.departsAll.length && departAllCatchFlag) {
+ departAllCatchFlag = false
+ const refresh = async () => {
+ const res = await Promise.allSettled>([departTreeAll()])
+ res.forEach((item) => {
+ if (item.status == 'fulfilled') {
+ item.value.forEach(item => {
+ this.departsAll.push(item)
+ })
+ }
+ })
+ }
+ refresh()
+ }
+ return this.departsAll;
+ },
getFlowNodes() {
if (!this.flowNodes.length) {
const refresh = async () => {
diff --git a/src/utils/util.ts b/src/utils/util.ts
index 9d17293..e38a668 100644
--- a/src/utils/util.ts
+++ b/src/utils/util.ts
@@ -333,7 +333,7 @@ export function getFileType(fileName) {
if (fileName.endsWith('.mp3') || fileName.endsWith('.m4a') || fileName.endsWith('.wav')) {
return FileType.MP3;
}
- if (fileName.endsWith('.mp4')) {
+ if (fileName.endsWith('.mp4') || fileName.endsWith('.mpeg')) {
return FileType.MP4;
}
return "unknown";
diff --git a/src/views/sensitivePerception/DictContent.vue b/src/views/sensitivePerception/DictContent.vue
index bbbbdfa..18b6fe2 100644
--- a/src/views/sensitivePerception/DictContent.vue
+++ b/src/views/sensitivePerception/DictContent.vue
@@ -40,7 +40,7 @@
:href="`${BASE_PATH}/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf`"
target="__blank"
>
-
+
问题赋分机制.pdf
@@ -288,10 +288,11 @@ function getScoreRange(row) {