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. 247
      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) { export function alarmNotificationReply(data) {
return request.post({ return request.post({
url: `/alarm/notification/reply`, url: `/alarm/notification/reply`,

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

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

6
src/components/file/upload.vue

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

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

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

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

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

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

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

7
src/components/negative/add.vue

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

4
src/components/negative/countdown.vue

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

81
src/components/negative/dialog.vue

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

4
src/components/negative/distribute.vue

@ -56,6 +56,10 @@
> >
</el-radio-group> </el-radio-group>
</el-form-item> </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> </template>
</el-form> </el-form>
</template> </template>

2
src/components/negative/return.vue

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

5
src/components/negative/verify.vue

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

4
src/style/public.scss

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

247
src/views/sensitivePerception/RiskClue.vue

@ -2,7 +2,7 @@
<div class="container h100"> <div class="container h100">
<el-row :gutter="20" class="h100"> <el-row :gutter="20" class="h100">
<el-col :span="6" class="h100"> <el-col :span="6" class="h100">
<model-risk-tree v-model="query.riskScoreRuleId"/> <model-risk-tree v-model="query.riskScoreRuleId" />
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<header> <header>
@ -48,11 +48,10 @@
<div> <div>
<el-button type="primary" @click="getList"> <el-button type="primary" @click="getList">
<template #icon> <template #icon>
<icon name="el-icon-Search"/> <icon name="el-icon-Search" />
</template> </template>
查询 查询
</el-button </el-button>
>
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
</div> </div>
</div> </div>
@ -64,11 +63,7 @@
prop="eventTime" prop="eventTime"
width="160" width="160"
/> />
<el-table-column <el-table-column label="姓名" prop="name" width="120" />
label="姓名"
prop="name"
width="120"
/>
<el-table-column <el-table-column
label="身份证号码" label="身份证号码"
prop="idCode" prop="idCode"
@ -81,12 +76,11 @@
width="100" width="100"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column label="风险内容" show-overflow-tooltip>
label="风险内容"
show-overflow-tooltip
>
<template #default="{ row }"> <template #default="{ row }">
<span style="white-space: pre-wrap;">{{ row.data }}</span> <span style="white-space: pre-wrap">{{
row.data
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
@ -118,22 +112,24 @@
</el-col> </el-col>
</el-row> </el-row>
<el-dialog v-model="showNotification" title="创建提醒" width="600px"> <el-dialog v-model="showNotification" title="创建提醒" width="700px">
<el-form label-width="148" :model="formData2" ref="formRef"> <el-form
label-width="148"
:model="formData2"
ref="formRef"
class="mr-40"
>
<el-form-item label="提醒类型"> <el-form-item label="提醒类型">
<div class="flex gap">
<el-select <el-select
v-model="formData2.alarmTypeId" v-model="formData2.alarmTypeId"
style="min-width: 185px" style="width: 280px"
> >
<el-option :value="1" label="预警问题"/> <el-option :value="1" label="预警问题" />
<el-option :value="2" label="风险问题"/> <el-option :value="2" label="风险问题" />
<el-option :value="3" label="提醒通知"/> <el-option :value="3" label="提醒通知" />
</el-select> </el-select>
</div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
style="width: 333px"
label="被通知单位" label="被通知单位"
prop="involveDepartId" prop="involveDepartId"
:rules="{ :rules="{
@ -141,66 +137,56 @@
trigger: ['blur'], trigger: ['blur'],
}" }"
> >
<div>
<depart-tree-select <depart-tree-select
v-model="formData2.involveDepartId" v-model="formData2.involveDepartId"
:check-strictly="true" :check-strictly="true"
@node-click=" (row) => changeDepart(row)" @node-click="(row) => changeDepart(row)"
/> style="width: 280px"
</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> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="提醒内容">
label="提醒内容"
>
<el-input <el-input
type="textarea" type="textarea"
v-model="formData2.alarmContent" v-model="formData2.alarmContent"
:autosize="{ minRows: 12 }" :autosize="{ minRows: 6 }"
:rules="{ :rules="{
message: '请填写提醒内容', message: '请填写提醒内容',
trigger: ['blur'], trigger: ['blur'],
}" }"
style="width: 280px" />
</el-form-item>
<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-form-item>
</el-form> </el-form>
<footer class="flex end"> <footer class="flex end">
<el-button @click="showNotification = false" size="large">取消</el-button> <el-button @click="showNotification = false" size="large"
<el-button type="primary" @click="handleNotification" size="large" >取消</el-button
>提交
</el-button
> >
<el-button
type="primary"
@click="handleNotification"
size="large"
>提交
</el-button>
</footer> </footer>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {listRiskClues} from "@/api/sensitivePerception/riskClue"; import { listRiskClues } from "@/api/sensitivePerception/riskClue";
import {listPoliceAll} from "~/api/system/police"; import { listPoliceAll } from "~/api/system/police";
import {ref} from "vue"; import { ref } from "vue";
import {alarmNotificationCommit} from "~/api/work/alarm"; import { alarmNotificationCommit } from "~/api/work/alarm";
import feedback from "~/utils/feedback"; import feedback from "~/utils/feedback";
const query = ref({}); const query = ref({});
@ -210,9 +196,12 @@ const total = ref(0);
onMounted(() => { onMounted(() => {
getList(); getList();
}); });
watch(() => query.value.riskScoreRuleId, () => { watch(
getList() () => query.value.riskScoreRuleId,
}) () => {
getList();
}
);
const route = useRoute(); const route = useRoute();
watch( watch(
() => route.query.riskScoreRuleId, () => route.query.riskScoreRuleId,
@ -221,147 +210,147 @@ watch(
} }
); );
const loading = ref(false) const loading = ref(false);
let showNotification = ref(false) let showNotification = ref(false);
let formData2 = ref({ let formData2 = ref({
alarmTypeId: 1, alarmTypeId: 1,
involveDepartId: '', involveDepartId: "",
involveDepartName: '', involveDepartName: "",
alarmContent: '', alarmContent: "",
blameName: '', blameName: "",
blameIdCode: '', blameIdCode: "",
blameEmpNo: '', blameEmpNo: "",
blames: {}, blames: {},
level: -1 level: -1,
}) requestReply: true
let police = ref({}) });
let polices = ref([]) let police = ref({});
let currentClueId = ref(-1) let polices = ref([]);
let currentClueId = ref(-1);
const handleShowNotification = (id) => { const handleShowNotification = (id) => {
showNotification.value = true showNotification.value = true;
currentClueId.value = id currentClueId.value = id;
} };
const handleNotification = async () => { const handleNotification = async () => {
if(formData2.value.involveDepartId == '') { if (formData2.value.involveDepartId == "") {
feedback.msgWarning("请选择被提醒单位"); feedback.msgWarning("请选择被提醒单位");
return; return;
} }
if(formData2.value.alarmContent == '') { if (formData2.value.alarmContent == "") {
feedback.msgWarning("请填写提醒内容"); feedback.msgWarning("请填写提醒内容");
return; return;
} }
if(formData2.value.policeIdCode == '') { if (formData2.value.policeIdCode == "") {
feedback.msgWarning("请选择被提醒民警"); feedback.msgWarning("请选择被提醒民警");
return; return;
} }
let data = { let data = {
alarmTypeId: formData2.value.alarmTypeId, alarmTypeId: formData2.value.alarmTypeId,
notificationDepartCode: formData2.value.involveDepartId, notificationDepartId: formData2.value.involveDepartId,
notificationDepartName: formData2.value.involveDepartName, notificationDepartName: formData2.value.involveDepartName,
alarmContent: formData2.value.alarmContent, alarmContent: formData2.value.alarmContent,
policeName: police.value.name, policeName: police.value.name,
policeIdCode: police.value.idCode, policeIdCode: police.value.idCode,
policeNo: police.value.empNo policeNo: police.value.empNo,
} };
if(currentClueId.value != -1) { if (currentClueId.value != -1) {
data['clueId'] = currentClueId.value data["clueId"] = currentClueId.value;
} }
await alarmNotificationCommit(data); await alarmNotificationCommit(data);
showNotification.value = false; showNotification.value = false;
feedback.msgSuccess("操作成功"); feedback.msgSuccess("操作成功");
initFormData2(); initFormData2();
} };
const initFormData2 = () => { const initFormData2 = () => {
formData2.value = { formData2.value = {
alarmTypeId: 1, alarmTypeId: 1,
involveDepartId: '', involveDepartId: "",
involveDepartName: '', involveDepartName: "",
alarmContent: '', alarmContent: "",
blameName: '', blameName: "",
blameIdCode: '', blameIdCode: "",
blameEmpNo: '', blameEmpNo: "",
blames: {}, blames: {},
level: -1 level: -1,
} };
} };
const changeDepart = (row) => { const changeDepart = (row) => {
formData2.value.involveDepartName = row.shortName; formData2.value.involveDepartName = row.shortName;
formData2.value.level = row.level formData2.value.level = row.level;
police.value = {} police.value = {};
getPolices(row.id); getPolices(row.id);
} };
const changePolice = (data) => { const changePolice = (data) => {
police.value = { police.value = {
idCode: data.idCode, idCode: data.idCode,
empNo: data.empNo, empNo: data.empNo,
name: data.name name: data.name,
} };
} };
function getPolices(departId) { function getPolices(departId) {
if(departId=='') { if (departId == "") {
return; return;
} }
listPoliceAll(departId).then(res => { listPoliceAll(departId).then((res) => {
polices.value = res polices.value = res;
}) });
} }
function getList() { function getList() {
loading.value = true loading.value = true;
listRiskClues(query.value).then((data) => { listRiskClues(query.value).then((data) => {
list.value = data.records; list.value = data.records;
total.value = data.total; total.value = data.total;
loading.value = false loading.value = false;
}); });
} }
const filterJsonData = (row) => { const filterJsonData = (row) => {
if (row.data == undefined) { if (row.data == undefined) {
return '' return "";
} }
let j = JSON.parse(row.data) let j = JSON.parse(row.data);
let str = '' let str = "";
if (j instanceof Array) { if (j instanceof Array) {
j.forEach(item => { j.forEach((item) => {
str += JSON.stringify(item) + "\n"; str += JSON.stringify(item) + "\n";
}) });
} }
if (j.sourceData != undefined) { if (j.sourceData != undefined) {
j = JSON.parse(row.sourceData) j = JSON.parse(row.sourceData);
} }
for (let key in j) { for (let key in j) {
if (key == 'eventTime') { if (key == "eventTime") {
continue continue;
} }
if (key == 'idCode') { if (key == "idCode") {
continue continue;
} }
if (key == 'departId') { if (key == "departId") {
continue continue;
} }
if (key == 'personId') { if (key == "personId") {
continue continue;
} }
if (key == 'name') { if (key == "name") {
continue continue;
} }
str += j[key] + '\n' str += j[key] + "\n";
} }
} };
function reset() { function reset() {
query.value = {}; query.value = {};
getList(); getList();
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

1
src/views/system/Police.vue

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

Loading…
Cancel
Save