Browse Source

界面完善优化、BUG修复

main
wxc 12 months ago
parent
commit
3d660dc530
  1. 7
      src/api/work/alarm.ts
  2. 4
      src/components/file/upload-group.vue
  3. 6
      src/components/file/upload.vue
  4. 33
      src/components/home/work/index.vue
  5. 35
      src/components/home/work/my-alarm.vue
  6. 24
      src/components/home/work/my-todo.vue
  7. 7
      src/components/negative/add.vue
  8. 4
      src/components/negative/countdown.vue
  9. 81
      src/components/negative/dialog.vue
  10. 4
      src/components/negative/distribute.vue
  11. 2
      src/components/negative/return.vue
  12. 5
      src/components/negative/verify.vue
  13. 4
      src/style/public.scss
  14. 615
      src/views/sensitivePerception/RiskClue.vue
  15. 1
      src/views/system/Police.vue

7
src/api/work/alarm.ts

@ -7,6 +7,13 @@ export function alarmNotificationPages(query) {
});
}
export function alarmNotificationPageByTodo(query) {
return request.post({
url: `/alarm/notification/pages/todo`,
body: query
});
}
export function alarmNotificationReply(data) {
return request.post({
url: `/alarm/notification/reply`,

4
src/components/file/upload-group.vue

@ -263,7 +263,7 @@ function uploadProgress(progressEvent, file) {
function handleSuccess(data, file) {
if (data.code !== 200) {
feedback.msgError("上传失败!");
feedback.msgError("上传失败!若重复上传失败请联系系统管理员");
fileList.value.splice(fileList.value.findIndex((item) => file.uid === item.uid), 1)
return;
}
@ -277,7 +277,7 @@ function handleSuccess(data, file) {
function handleError(e) {
console.log(e);
feedback.msgError("上传失败!");
feedback.msgError("上传失败!若重复上传失败请联系系统管理员");
}
function handleUpdateFileClass(item) {

6
src/components/file/upload.vue

@ -63,7 +63,11 @@ watch(files, () => {
});
function beforeUpload(file) {
console.log("uid", file.uid);
// 1024 * 1024 * 100 100MB
if (file.size >= 104857600) {
feedback.msgError('文件大小不能超过100MB');
return false;
}
files.value.push({
uid: file.uid,
percent: 0,

33
src/components/home/work/index.vue

@ -23,14 +23,6 @@
<home-work-my-todo :data="todoToExpires" @refresh="getList" />
</div>
</el-tab-pane>
<el-tab-pane name="alarm">
<template #label>
<span class="tab-nav-title">通知提醒</span>
</template>
<div v-loading="loading" class="pt-20">
<home-work-my-alarm />
</div>
</el-tab-pane>
<el-tab-pane name="third">
<template #label>
<span class="tab-nav-title">我的收藏</span>
@ -40,15 +32,33 @@
</div>
</el-tab-pane>
<el-tab-pane name="alarm">
<template #label>
<el-badge :value="myAlarmTotal" v-if="alarms.length">
<span class="tab-nav-title">通知提醒</span>
</el-badge>
<span class="tab-nav-title" v-else>通知提醒</span>
</template>
<div v-loading="loading" class="pt-20">
<home-work-my-alarm :data="alarms" />
</div>
</el-tab-pane>
</el-tabs>
</template>
<script setup>
import { listTodos } from "@/api/work";
import {
alarmNotificationPageByTodo
} from "@/api/work/alarm";
const activeName = "todo";
const myTodoTotal = ref(0)
const todos = ref([])
const todoToExpires = ref([])
const alarms = ref([])
const myAlarmTotal = ref(0)
const loading = ref(true)
function getList() {
loading.value = true
@ -61,6 +71,13 @@ function getList() {
todoToExpires.value = data.records.filter(item => item.remainingDuration < 43200)
loading.value = false
});
alarmNotificationPageByTodo({
current: 1,
size: 100,
}).then((data) => {
alarms.value = data.records;
myAlarmTotal.value = data.total
});
}
onMounted(() => {

35
src/components/home/work/my-alarm.vue

@ -1,6 +1,6 @@
<template>
<div class="table-container" v-loading="loading">
<el-table :data="list">
<el-table :data="data">
<el-table-column label="提醒时间" prop="alarmTime" width="170" />
<el-table-column label="提醒类型" prop="alarmType" width="90" />
<el-table-column
@ -9,7 +9,6 @@
width="110"
show-overflow-tooltip
/>
<el-table-column label="被通知民警" prop="policeName" width="110" />
<el-table-column label="提醒内容" prop="alarmContent" show-overflow-tooltip />
<el-table-column label="回复情况" width="110" align="center">
<template #default="{ row }">
@ -21,41 +20,25 @@
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="{ row }">
<el-button
<!-- <el-button
type="primary"
link
@click="handleEdit(row)"
v-perms="['negative:edit']"
>立即回复
</el-button>
</el-button> -->
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import {
alarmNotificationPages
} from "@/api/work/alarm";
const list = ref([]);
const loading = ref(true);
function getList() {
loading.value = true;
alarmNotificationPages({
current: 1,
size: 100,
}).then((data) => {
list.value = data.records;
loading.value = false;
});
}
onMounted(() => {
getList();
});
defineProps({
data: {
type: Array,
default: []
}
})
const show = ref(false);
const activeNegativeId = ref("");

24
src/components/home/work/my-todo.vue

@ -192,7 +192,7 @@ const todos = ref([]);
watch(
() => props.data,
(val) => {
todos.value = val;
getTodos()
tabs.value = [];
tabs.value.push({
name: "全部",
@ -212,13 +212,18 @@ watch(
);
const myTodoActionTab = ref(ALL_LABEL);
watch(myTodoActionTab, (val) => {
if (val === ALL_LABEL) {
watch(myTodoActionTab, getTodos);
function getTodos() {
if (myTodoActionTab.value === ALL_LABEL) {
todos.value = props.data;
} else {
todos.value = props.data.filter((item) => item.problemSources === val);
todos.value = props.data.filter((item) => item.problemSources === myTodoActionTab.value);
if (todos.value.length === 0) {
todos.value = ALL_LABEL
}
}
});
}
const show = ref(false);
const activeNegativeId = ref("");
@ -235,14 +240,7 @@ const addShow = ref(false);
function handleUpdate() {
emit('refresh')
if (myTodoActionTab.value === ALL_LABEL) {
todos.value = props.data;
} else {
todos.value = props.data.filter((item) => item.problemSources === myTodoActionTab.value);
if (todos.value.length === 0) {
todos.value = ALL_LABEL
}
}
}
</script>
<style lang="scss" scoped>

7
src/components/negative/add.vue

@ -250,6 +250,7 @@
value-format="YYYY-MM-DD HH:mm"
time-format="HH:mm"
style="width: 100%"
:disabled-date="disabledDate"
/>
</el-form-item>
</el-col>
@ -265,6 +266,7 @@
value-format="YYYY-MM-DD HH:mm"
time-format="HH:mm"
style="width: 100%"
:disabled-date="disabledDate"
/>
</el-form-item>
</el-col>
@ -447,6 +449,7 @@
</el-dialog>
</template>
<script lang="ts" setup>
import moment from 'moment'
import {
HostLevel,
TimeLimit,
@ -555,6 +558,10 @@ function handleChangeHostLevel(val) {
form.value.approvalFlow = "3";
}
}
function disabledDate(time) {
return time.getTime() < moment('1949-10-01', 'YYYY-MM-DD').valueOf()
}
</script>
<style lang="scss" scoped>
.add-negation-container {

4
src/components/negative/countdown.vue

@ -94,7 +94,7 @@ const percentage = computed(() => {
watch(
() => props.time,
(val) => {
updateState(val > 0 ? val : -val);
updateState(val >= 0 ? val : -val);
}
);
@ -115,7 +115,7 @@ function updateState(val) {
let timer;
onMounted(() => {
updateState(props.time);
updateState(props.time >= 0 ? props.time : -props.time);
if (props.time < 3600 && props.time > -3600) {
clearInterval(timer);
timer = setInterval(() => {

81
src/components/negative/dialog.vue

@ -87,15 +87,30 @@
<div class="row">
<div class="col col-24" style="--label-width: 60px">
<label>办理时限</label>
<span>{{ getDictLable(dict.timeLimit, negative.timeLimit) }}</span>
<span>{{
getDictLable(
dict.timeLimit,
negative.timeLimit
)
}}</span>
</div>
<div class="col col-24" style="--label-width: 60px">
<label>主办层级</label>
<span>{{ getDictLable(dict.hostLevel, negative.hostLevel) }}</span>
<span>{{
getDictLable(
dict.hostLevel,
negative.hostLevel
)
}}</span>
</div>
<div class="col col-24" style="--label-width: 60px">
<label>审批流程</label>
<span>{{ getDictLable(dict.approvalFlow, negative.approvalFlow) }}</span>
<span>{{
getDictLable(
dict.approvalFlow,
negative.approvalFlow
)
}}</span>
</div>
</div>
<negative-action-history />
@ -106,6 +121,20 @@
<negative-sign-return-description />
<negative-apply-extension-description />
<negative-description />
<div
class="row mt-10"
v-if="
negative.firstDistributeComments &&
negative.processingStatus === 'signing'
"
>
<div class="col col-24">
<label>市局下发意见</label>
<span class="text-wrap">{{
negative.firstDistributeComments
}}</span>
</div>
</div>
<template
v-if="
components.indexOf(
@ -126,7 +155,8 @@
</template>
<template
v-if="
components.indexOf('negative-verify') > -1 || verifyEditFlag
components.indexOf('negative-verify') >
-1 || verifyEditFlag
"
>
<negative-verify
@ -141,13 +171,13 @@
<negative-countersign-description />
<template
v-if="
components.indexOf(
'negative-countersign'
) > -1
components.indexOf('negative-countersign') > -1
"
>
<negative-countersign ref="componentRef"
@submit="handleSubmitExecute" />
<negative-countersign
ref="componentRef"
@submit="handleSubmitExecute"
/>
</template>
</el-scrollbar>
</el-col>
@ -175,7 +205,11 @@
item.actionKey ===
FlowActionEnum.THREE_SIGN_RETURN))
"
>{{ item.actionKey === 'update_verify' && verifyEditFlag ? '保存核查内容' : item.buttonLabel }}</el-button
>{{
item.actionKey === "update_verify" && verifyEditFlag
? "保存核查内容"
: item.buttonLabel
}}</el-button
>
</div>
</footer>
@ -234,7 +268,12 @@ import { getDictLable } from "@/utils/util";
import useCatchStore from "@/stores/modules/catch";
const dict = useCatchStore().getDicts(["processingStatus", "timeLimit", "approvalFlow", "hostLevel"]);
const dict = useCatchStore().getDicts([
"processingStatus",
"timeLimit",
"approvalFlow",
"hostLevel",
]);
const props = defineProps({
id: {
@ -258,7 +297,7 @@ const actionHistory = ref([]);
const signReturns = ref([]);
const approves = ref([]);
const extensionApply = ref({});
const countersignApplys = ref([])
const countersignApplys = ref([]);
provide("negative", negative);
provide("actionHistory", actionHistory);
provide("signReturns", signReturns);
@ -289,7 +328,7 @@ function getDetails() {
signReturns.value = data.signReturns;
approves.value = data.approves;
extensionApply.value = data.extensionApply || {};
countersignApplys.value = data.countersignApplys
countersignApplys.value = data.countersignApplys;
isFav.value = data.isFav;
remainingDuration.value = data.remainingDuration;
maxDuration.value = data.maxDuration;
@ -311,15 +350,15 @@ const setActionItemRef = (actionKey, el) => {
const confirmationCompletionRef = ref(null);
const activeAction = ref({});
const verifyEditFlag = ref(false)
const verifyEditFlag = ref(false);
async function handleExecute(action, data) {
if (action.actionKey === 'update_verify' && !verifyEditFlag.value) {
if (action.actionKey === "update_verify" && !verifyEditFlag.value) {
verifyEditFlag.value = true;
return
return;
}
if (action.actionKey !== 'update_verify' && verifyEditFlag.value) {
feedback.confirm('请先“保存核查内容”再操作')
return
if (action.actionKey !== "update_verify" && verifyEditFlag.value) {
feedback.confirm("请先“保存核查内容”再操作");
return;
}
if (action.validateForm) {
if (action.actionKey !== FlowActionEnum.SAVE) {
@ -343,7 +382,7 @@ async function handleExecute(action, data) {
activeAction.value = {
actionName: "认定办结",
actionKey: "confirmationCompletion",
doClose: true
doClose: true,
};
return;
}
@ -352,7 +391,7 @@ async function handleExecute(action, data) {
return;
}
loading.value = true;
if (action.actionKey === 'update_verify') {
if (action.actionKey === "update_verify") {
verifyEditFlag.value = false;
}
await negativeExecute(props.id, {

4
src/components/negative/distribute.vue

@ -56,6 +56,10 @@
>
</el-radio-group>
</el-form-item>
<el-form-item label="下发意见" prop="">
<el-input v-model="form.firstDistributeComments" type="textarea" placeholder="请输入" :autosize="{ minRows: 4 }" class="mb-8" />
<el-alert title="经核验,该问题为二次下发,请填写下发意见" type="warning" />
</el-form-item>
</template>
</el-form>
</template>

2
src/components/negative/return.vue

@ -22,7 +22,7 @@
<el-input
type="textarea"
placeholder="请输入退回原因"
:autosize="{ minRows: 5 }"
:autosize="{ minRows: 5, maxRows: 12 }"
v-model="form.comments"
/>
</el-form-item>

5
src/components/negative/verify.vue

@ -827,10 +827,7 @@
</el-col>
<el-col
:span="12"
v-if="
negative.problemSourcesCode !==
ProblemSources.JWDC
"
v-if="form.checkStatus !== InspectCase.FALSE"
>
<el-form-item
label="维权容错"

4
src/style/public.scss

@ -246,6 +246,10 @@ svg + span {
margin-right: 20px;
}
.mr-40 {
margin-right: 40px;
}
.mt-4 {
margin-top: 4px;
}

615
src/views/sensitivePerception/RiskClue.vue

@ -1,206 +1,192 @@
<template>
<div class="container h100">
<el-row :gutter="20" class="h100">
<el-col :span="6" class="h100">
<model-risk-tree v-model="query.riskScoreRuleId"/>
</el-col>
<el-col :span="18">
<header>
<el-form :label-width="140">
<el-row>
<el-col :span="8">
<el-form-item label="发生时间">
<date-time-range-picker-ext
v-model="query.eventTime"
/>
<div class="container h100">
<el-row :gutter="20" class="h100">
<el-col :span="6" class="h100">
<model-risk-tree v-model="query.riskScoreRuleId" />
</el-col>
<el-col :span="18">
<header>
<el-form :label-width="140">
<el-row>
<el-col :span="8">
<el-form-item label="发生时间">
<date-time-range-picker-ext
v-model="query.eventTime"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名">
<el-input
placeholder="请输入"
v-model="query.name"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证号">
<el-input
placeholder="请输入"
v-model="query.idCode"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="风险内容">
<el-input
placeholder="请输入"
v-model="query.thingDesc"
clearable
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="flex end mb-20">
<div>
<el-button type="primary" @click="getList">
<template #icon>
<icon name="el-icon-Search" />
</template>
查询
</el-button>
<el-button @click="reset">重置</el-button>
</div>
</div>
</header>
<div class="table-container" v-loading="loading">
<el-table :data="list">
<el-table-column
label="发生时间"
prop="eventTime"
width="160"
/>
<el-table-column label="姓名" prop="name" width="120" />
<el-table-column
label="身份证号码"
prop="idCode"
width="170"
show-overflow-tooltip
/>
<el-table-column
label="风险因素"
prop="riskReason"
width="100"
show-overflow-tooltip
/>
<el-table-column label="风险内容" show-overflow-tooltip>
<template #default="{ row }">
<span style="white-space: pre-wrap">{{
row.data
}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180">
<template #default="{ row }">
<el-button
type="primary"
link
@click="handleShowNotification(row.id)"
>预警提醒
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex end mt-8">
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page="query.current"
:page-sizes="[9, 18, 36]"
v-model:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
v-if="list.length"
>
</el-pagination>
</div>
</el-col>
</el-row>
<el-dialog v-model="showNotification" title="创建提醒" width="700px">
<el-form
label-width="148"
:model="formData2"
ref="formRef"
class="mr-40"
>
<el-form-item label="提醒类型">
<el-select
v-model="formData2.alarmTypeId"
style="width: 280px"
>
<el-option :value="1" label="预警问题" />
<el-option :value="2" label="风险问题" />
<el-option :value="3" label="提醒通知" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名">
<el-input
placeholder="请输入"
v-model="query.name"
clearable
/>
<el-form-item
label="被通知单位"
prop="involveDepartId"
:rules="{
message: '请选择问题涉及单位',
trigger: ['blur'],
}"
>
<div>
<depart-tree-select
v-model="formData2.involveDepartId"
:check-strictly="true"
@node-click="(row) => changeDepart(row)"
style="width: 280px"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证号">
<el-input
placeholder="请输入"
v-model="query.idCode"
clearable
/>
<el-form-item label="提醒内容">
<el-input
type="textarea"
v-model="formData2.alarmContent"
:autosize="{ minRows: 6 }"
:rules="{
message: '请填写提醒内容',
trigger: ['blur'],
}"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="风险内容">
<el-input
placeholder="请输入"
v-model="query.thingDesc"
clearable
/>
<el-form-item label="是否要求回复">
<el-switch
v-model="formData2.requestReply"
inline-prompt
active-text="必须回复"
inactive-text="无需回复"
:active-value="true"
:inactive-value="false"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="flex end mb-20">
<div>
<el-button type="primary" @click="getList">
<template #icon>
<icon name="el-icon-Search"/>
</template>
查询
</el-button
>
<el-button @click="reset">重置</el-button>
</div>
</div>
</header>
<div class="table-container" v-loading="loading">
<el-table :data="list">
<el-table-column
label="发生时间"
prop="eventTime"
width="160"
/>
<el-table-column
label="姓名"
prop="name"
width="120"
/>
<el-table-column
label="身份证号码"
prop="idCode"
width="170"
show-overflow-tooltip
/>
<el-table-column
label="风险因素"
prop="riskReason"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="风险内容"
show-overflow-tooltip
>
<template #default="{ row }">
<span style="white-space: pre-wrap;">{{ row.data }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180">
<template #default="{ row }">
</el-form>
<footer class="flex end">
<el-button @click="showNotification = false" size="large"
>取消</el-button
>
<el-button
type="primary"
link
@click="handleShowNotification(row.id)"
>预警提醒
@click="handleNotification"
size="large"
>提交
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex end mt-8">
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page="query.current"
:page-sizes="[9, 18, 36]"
v-model:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
v-if="list.length"
>
</el-pagination>
</div>
</el-col>
</el-row>
<el-dialog v-model="showNotification" title="创建提醒" width="600px">
<el-form label-width="148" :model="formData2" ref="formRef">
<el-form-item label="提醒类型">
<div class="flex gap">
<el-select
v-model="formData2.alarmTypeId"
style="min-width: 185px"
>
<el-option :value="1" label="预警问题"/>
<el-option :value="2" label="风险问题"/>
<el-option :value="3" label="提醒通知"/>
</el-select>
</div>
</el-form-item>
<el-form-item
style="width: 333px"
label="被通知单位"
prop="involveDepartId"
:rules="{
message: '请选择问题涉及单位',
trigger: ['blur'],
}"
>
<depart-tree-select
v-model="formData2.involveDepartId"
:check-strictly="true"
@node-click=" (row) => changeDepart(row)"
/>
</el-form-item>
<el-form-item
label="被提醒民警"
prop="blameEmpNo"
:rules="{
required: true,
message: '请选择提醒民警',
trigger: ['blur'],
}"
>
<el-select
v-model="police"
value-key="idCode"
placeholder="请选择提醒民警"
@change="changePolice"
style="width: 240px"
>
<el-option
v-for="item in polices"
:key="item.idCode"
:label="item.name"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item
label="提醒内容"
>
<el-input
type="textarea"
v-model="formData2.alarmContent"
:autosize="{ minRows: 12 }"
:rules="{
message: '请填写提醒内容',
trigger: ['blur'],
}"
style="width: 280px"
/>
</el-form-item>
</el-form>
<footer class="flex end">
<el-button @click="showNotification = false" size="large">取消</el-button>
<el-button type="primary" @click="handleNotification" size="large"
>提交
</el-button
>
</footer>
</el-dialog>
</div>
</footer>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import {listRiskClues} from "@/api/sensitivePerception/riskClue";
import {listPoliceAll} from "~/api/system/police";
import {ref} from "vue";
import {alarmNotificationCommit} from "~/api/work/alarm";
import { listRiskClues } from "@/api/sensitivePerception/riskClue";
import { listPoliceAll } from "~/api/system/police";
import { ref } from "vue";
import { alarmNotificationCommit } from "~/api/work/alarm";
import feedback from "~/utils/feedback";
const query = ref({});
@ -208,160 +194,163 @@ const list = ref([]);
const total = ref(0);
onMounted(() => {
getList();
getList();
});
watch(() => query.value.riskScoreRuleId, () => {
getList()
})
watch(
() => query.value.riskScoreRuleId,
() => {
getList();
}
);
const route = useRoute();
watch(
() => route.query.riskScoreRuleId,
(val) => {
query.value.riskScoreRuleId = [val];
query.value.riskScoreRuleId = [val];
}
);
const loading = ref(false)
const loading = ref(false);
let showNotification = ref(false)
let showNotification = ref(false);
let formData2 = ref({
alarmTypeId: 1,
involveDepartId: '',
involveDepartName: '',
alarmContent: '',
blameName: '',
blameIdCode: '',
blameEmpNo: '',
blames: {},
level: -1
})
let police = ref({})
let polices = ref([])
let currentClueId = ref(-1)
alarmTypeId: 1,
involveDepartId: "",
involveDepartName: "",
alarmContent: "",
blameName: "",
blameIdCode: "",
blameEmpNo: "",
blames: {},
level: -1,
requestReply: true
});
let police = ref({});
let polices = ref([]);
let currentClueId = ref(-1);
const handleShowNotification = (id) => {
showNotification.value = true
currentClueId.value = id
}
showNotification.value = true;
currentClueId.value = id;
};
const handleNotification = async () => {
if(formData2.value.involveDepartId == '') {
feedback.msgWarning("请选择被提醒单位");
return;
}
if(formData2.value.alarmContent == '') {
feedback.msgWarning("请填写提醒内容");
return;
}
if(formData2.value.policeIdCode == '') {
feedback.msgWarning("请选择被提醒民警");
return;
}
let data = {
alarmTypeId: formData2.value.alarmTypeId,
notificationDepartCode: formData2.value.involveDepartId,
notificationDepartName: formData2.value.involveDepartName,
alarmContent: formData2.value.alarmContent,
policeName: police.value.name,
policeIdCode: police.value.idCode,
policeNo: police.value.empNo
}
if(currentClueId.value != -1) {
data['clueId'] = currentClueId.value
}
await alarmNotificationCommit(data);
showNotification.value = false;
feedback.msgSuccess("操作成功");
initFormData2();
}
if (formData2.value.involveDepartId == "") {
feedback.msgWarning("请选择被提醒单位");
return;
}
if (formData2.value.alarmContent == "") {
feedback.msgWarning("请填写提醒内容");
return;
}
if (formData2.value.policeIdCode == "") {
feedback.msgWarning("请选择被提醒民警");
return;
}
let data = {
alarmTypeId: formData2.value.alarmTypeId,
notificationDepartId: formData2.value.involveDepartId,
notificationDepartName: formData2.value.involveDepartName,
alarmContent: formData2.value.alarmContent,
policeName: police.value.name,
policeIdCode: police.value.idCode,
policeNo: police.value.empNo,
};
if (currentClueId.value != -1) {
data["clueId"] = currentClueId.value;
}
await alarmNotificationCommit(data);
showNotification.value = false;
feedback.msgSuccess("操作成功");
initFormData2();
};
const initFormData2 = () => {
formData2.value = {
alarmTypeId: 1,
involveDepartId: '',
involveDepartName: '',
alarmContent: '',
blameName: '',
blameIdCode: '',
blameEmpNo: '',
blames: {},
level: -1
}
}
formData2.value = {
alarmTypeId: 1,
involveDepartId: "",
involveDepartName: "",
alarmContent: "",
blameName: "",
blameIdCode: "",
blameEmpNo: "",
blames: {},
level: -1,
};
};
const changeDepart = (row) => {
formData2.value.involveDepartName = row.shortName;
formData2.value.level = row.level
police.value = {}
getPolices(row.id);
}
formData2.value.involveDepartName = row.shortName;
formData2.value.level = row.level;
police.value = {};
getPolices(row.id);
};
const changePolice = (data) => {
police.value = {
idCode: data.idCode,
empNo: data.empNo,
name: data.name
}
}
const changePolice = (data) => {
police.value = {
idCode: data.idCode,
empNo: data.empNo,
name: data.name,
};
};
function getPolices(departId) {
if(departId=='') {
return;
}
listPoliceAll(departId).then(res => {
polices.value = res
})
if (departId == "") {
return;
}
listPoliceAll(departId).then((res) => {
polices.value = res;
});
}
function getList() {
loading.value = true
listRiskClues(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
loading.value = false
});
loading.value = true;
listRiskClues(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
loading.value = false;
});
}
const filterJsonData = (row) => {
if (row.data == undefined) {
return ''
}
let j = JSON.parse(row.data)
let str = ''
if (j instanceof Array) {
j.forEach(item => {
str += JSON.stringify(item) + "\n";
})
}
if (j.sourceData != undefined) {
j = JSON.parse(row.sourceData)
}
for (let key in j) {
if (key == 'eventTime') {
continue
}
if (key == 'idCode') {
continue
if (row.data == undefined) {
return "";
}
if (key == 'departId') {
continue
let j = JSON.parse(row.data);
let str = "";
if (j instanceof Array) {
j.forEach((item) => {
str += JSON.stringify(item) + "\n";
});
}
if (key == 'personId') {
continue
if (j.sourceData != undefined) {
j = JSON.parse(row.sourceData);
}
if (key == 'name') {
continue
for (let key in j) {
if (key == "eventTime") {
continue;
}
if (key == "idCode") {
continue;
}
if (key == "departId") {
continue;
}
if (key == "personId") {
continue;
}
if (key == "name") {
continue;
}
str += j[key] + "\n";
}
str += j[key] + '\n'
}
}
};
function reset() {
query.value = {};
getList();
query.value = {};
getList();
}
</script>
<style lang="scss" scoped>
</style>

1
src/views/system/Police.vue

@ -65,6 +65,7 @@
v-model="query.roleId"
placeholder="请选择角色"
clearable
style="width: 220px"
>
<el-option
v-for="item in roles"

Loading…
Cancel
Save