lcw
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
const api = "/mosty-api/mosty-base";
|
const api = "/mosty-api/mosty-base";
|
||||||
|
const fzapi = "/mosty-api/mosty-gsxt";
|
||||||
/*
|
/*
|
||||||
* 登录
|
* 登录
|
||||||
* return promise 实例对象
|
* return promise 实例对象
|
||||||
@ -154,3 +155,11 @@ export const deleteSysDictItem = (data) => {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 方正字典
|
||||||
|
export const fzdict = (params) => {
|
||||||
|
return request({
|
||||||
|
url: fzapi + "/xsaj/dict/selectList",
|
||||||
|
method: "GET",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -217,4 +217,17 @@ export const sjzlQryp = (id) => {
|
|||||||
method: "get",
|
method: "get",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const xsajSelectPage = (params) => {
|
||||||
|
return request({
|
||||||
|
url: api + `/asj/xsaj/selectPage`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const xsajDictSelectList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: api + ``,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -52,13 +52,14 @@ import installFilter from "@/filters";
|
|||||||
import mitt from "mitt";
|
import mitt from "mitt";
|
||||||
|
|
||||||
import { resetForm } from "@/utils/validate";
|
import { resetForm } from "@/utils/validate";
|
||||||
import { getDict, setCascader } from '@/utils/dict';
|
import { getDict, setCascader, getFzDict } from '@/utils/dict';
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
// import fzui from 'fzui-fengqun-vue'
|
// import fzui from 'fzui-fengqun-vue'
|
||||||
|
|
||||||
//挂载全局方法
|
//挂载全局方法
|
||||||
app.config.globalProperties.resetForm = resetForm;
|
app.config.globalProperties.resetForm = resetForm;
|
||||||
app.config.globalProperties.$dict = getDict; //字典公共函数
|
app.config.globalProperties.$dict = getDict; //字典公共函数
|
||||||
|
app.config.globalProperties.$fzdict = getFzDict; //字典公共函数
|
||||||
app.config.globalProperties.$message = ELMessage; //element提示组件
|
app.config.globalProperties.$message = ELMessage; //element提示组件
|
||||||
app.config.globalProperties.$set = setCascader; //设置级联选择器回显
|
app.config.globalProperties.$set = setCascader; //设置级联选择器回显
|
||||||
app.config.globalProperties.mittBus = new mitt(); //配置事件总线
|
app.config.globalProperties.mittBus = new mitt(); //配置事件总线
|
||||||
|
|||||||
@ -117,3 +117,4 @@ export function IdCard(IdCard, type) {
|
|||||||
}
|
}
|
||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ref, toRefs, isRef } from 'vue';
|
import { ref, toRefs, isRef } from 'vue';
|
||||||
import { getSysDictByCode } from '@/api/sysDict' //引入封装数字字典接口
|
import { getSysDictByCode, fzdict } from '@/api/sysDict' //引入封装数字字典接口
|
||||||
|
|
||||||
import { getLocalDic } from "@/utils/localDic/index.js"
|
import { getLocalDic } from "@/utils/localDic/index.js"
|
||||||
/**
|
/**
|
||||||
@ -24,11 +24,11 @@ export function getDict(...args) {
|
|||||||
return (() => {
|
return (() => {
|
||||||
args.forEach((d, index) => {
|
args.forEach((d, index) => {
|
||||||
res.value[d] = [];
|
res.value[d] = [];
|
||||||
|
|
||||||
// 本地字典拦截,如果本地字典存在,则使用本地字典,否则使用远程字典
|
// 本地字典拦截,如果本地字典存在,则使用本地字典,否则使用远程字典
|
||||||
if (isLocalDict(d) && getLocalDic(d)) {
|
if (isLocalDict(d) && getLocalDic(d)) {
|
||||||
res.value[d] = getLocalDic(d)
|
res.value[d] = getLocalDic(d)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
getSysDictByCode({
|
getSysDictByCode({
|
||||||
dictCode: d
|
dictCode: d
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
@ -53,7 +53,42 @@ export function getDict(...args) {
|
|||||||
return toRefs(res.value);
|
return toRefs(res.value);
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
|
export function getFzDict(...args) {
|
||||||
|
const res = ref({});
|
||||||
|
return (() => {
|
||||||
|
args.forEach((d, index) => {
|
||||||
|
res.value[d] = [];
|
||||||
|
// 本地字典拦截,如果本地字典存在,则使用本地字典,否则使用远程字典
|
||||||
|
if (isLocalDict(d) && getLocalDic(d)) {
|
||||||
|
res.value[d] = getLocalDic(d);
|
||||||
|
} else {
|
||||||
|
fzdict({
|
||||||
|
dictLabel: d
|
||||||
|
}).then(result => {
|
||||||
|
result = result || {};
|
||||||
|
// result.itemList = Array.isArray(result.itemList) ? result.itemList : [];
|
||||||
|
// result.itemList.forEach(p => {
|
||||||
|
// p.label = p.itemName;
|
||||||
|
// p.value = p.itemValue;
|
||||||
|
// p.id = p.itemValue;
|
||||||
|
// p.elTagType = p.dictType;
|
||||||
|
// if (p?.itemList && p.itemList?.length > 0) {
|
||||||
|
// getChildren(p);
|
||||||
|
// }
|
||||||
|
// p.children = p.itemList;
|
||||||
|
// });
|
||||||
|
// console.log(res.value);
|
||||||
|
|
||||||
|
res.value[d] = result
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 使用toRefs确保返回的是响应式对象
|
||||||
|
return toRefs(res.value);
|
||||||
|
})()
|
||||||
|
|
||||||
|
}
|
||||||
export function getChildren(item) {
|
export function getChildren(item) {
|
||||||
item.label = item.zdmc
|
item.label = item.zdmc
|
||||||
item.value = item.dm
|
item.value = item.dm
|
||||||
@ -177,3 +212,4 @@ export function getMultiDictVal(values, dict) {
|
|||||||
}).join(',');
|
}).join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -104,11 +104,12 @@ import LineEcharts from "@/views/home/echarts/moreLineEcharts.vue";
|
|||||||
import MyTable from "@/components/aboutTable/DarkTable.vue";
|
import MyTable from "@/components/aboutTable/DarkTable.vue";
|
||||||
import Pages from "@/components/aboutTable/Pages.vue";
|
import Pages from "@/components/aboutTable/Pages.vue";
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import {tbJqGetPageList } from '@/api/yj.js'
|
import {tbJqGetPageList,xsajSelectPage } from '@/api/yj.js'
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
import { nextTick, onMounted, reactive, getCurrentInstance, ref, watch } from 'vue';
|
import { nextTick, onMounted, reactive, getCurrentInstance, ref, watch } from 'vue';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { JQLB } = proxy.$dict("JQLB"); //获取字典数据
|
const { JQLB } = proxy.$dict("JQLB"); //获取字典数据
|
||||||
|
const {GA_D_XSAJXALBDM} = proxy.$fzdict("GA_D_XSAJXALBDM"); //获取字典数据
|
||||||
const readonly_lx = ref(false)
|
const readonly_lx = ref(false)
|
||||||
const readonly_ry = ref(false)
|
const readonly_ry = ref(false)
|
||||||
const readonly_dd = ref(false)
|
const readonly_dd = ref(false)
|
||||||
@ -195,10 +196,11 @@ const list = reactive([
|
|||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
},
|
},
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
{ label: "案件编号", prop: "ajbh", showOverflowTooltip: true },
|
{ label: "案件编号", prop: "asjbh", showOverflowTooltip: true },
|
||||||
{ label: "案件内容", prop: "ajnr", showOverflowTooltip: true },
|
{ label: "案件标题", prop: "ajmc", showOverflowTooltip: true },
|
||||||
{ label: "案件类型", prop: "ajlx", showOverflowTooltip: true },
|
{ label: "简要案情", prop: "jyaq", showOverflowTooltip: true },
|
||||||
{ label: "案件时间", prop: "ajsj", showOverflowTooltip: true },
|
{ label: "案件类型", prop: "ajxlbDmbcms", showOverflowTooltip: true },
|
||||||
|
{ label: "案件时间", prop: "asjfssjAsjfskssj", showOverflowTooltip: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -243,11 +245,20 @@ watch(() => JQLB.value, (val) => {
|
|||||||
deep: true, immediate: true
|
deep: true, immediate: true
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
|
|
||||||
// getCount(); //获取统计数据
|
// getCount(); //获取统计数据
|
||||||
tabHeightFn()
|
tabHeightFn()
|
||||||
getJqList() //警情列表
|
getJqList() //警情列表
|
||||||
|
getAjList()//案件列表
|
||||||
});
|
});
|
||||||
|
// 获取字典
|
||||||
|
const getxsajDictSelectList = () => {
|
||||||
|
xsajDictSelectList().then(res => {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
const getCount = () => {
|
const getCount = () => {
|
||||||
// 获取处置状态统计
|
// 获取处置状态统计
|
||||||
qcckPost({}, '/mosty-gsxt/qbcj/getXscjTjByXslx').then(res => {
|
qcckPost({}, '/mosty-gsxt/qbcj/getXscjTjByXslx').then(res => {
|
||||||
@ -275,12 +286,13 @@ const changeNo = (e, type) => {
|
|||||||
break;
|
break;
|
||||||
case '案件':
|
case '案件':
|
||||||
list[2].pageConfiger.page = e;
|
list[2].pageConfiger.page = e;
|
||||||
|
getAjList()
|
||||||
break;
|
break;
|
||||||
case '风险隐患':
|
case '风险隐患':
|
||||||
list[3].pageConfiger.page = e;
|
list[3].pageConfiger.page = e;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
getJqList()
|
// getJqList()
|
||||||
}
|
}
|
||||||
const changeSize = (e, type) => {
|
const changeSize = (e, type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -293,6 +305,7 @@ const changeSize = (e, type) => {
|
|||||||
break;
|
break;
|
||||||
case '案件':
|
case '案件':
|
||||||
list[2].pageConfiger.pageSize = e;
|
list[2].pageConfiger.pageSize = e;
|
||||||
|
getAjList()
|
||||||
break;
|
break;
|
||||||
case '风险隐患':
|
case '风险隐患':
|
||||||
list[3].pageConfiger.pageSize = e;
|
list[3].pageConfiger.pageSize = e;
|
||||||
@ -316,6 +329,26 @@ const getJqList = () => {
|
|||||||
obj.data_hstj.list = [{ label: '总数', val: [0, res.total, 0, 0] }];
|
obj.data_hstj.list = [{ label: '总数', val: [0, res.total, 0, 0] }];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const getAjList = () => {
|
||||||
|
let params = {
|
||||||
|
pageCurrent: list[2].pageConfiger.page,
|
||||||
|
pageSize: list[2].pageConfiger.pageSize,
|
||||||
|
}
|
||||||
|
console.log("执行");
|
||||||
|
|
||||||
|
xsajSelectPage(params).then(res => {
|
||||||
|
list[2].tableList = res.records || [];
|
||||||
|
list[2].pageConfiger.total = res.total;
|
||||||
|
|
||||||
|
// //模拟的统计警情接口
|
||||||
|
// obj.data_lxtj.list = [{ label: '总数', val: [0, res.total, 0, 0] }];
|
||||||
|
// obj.data_hstj.list = [{ label: '总数', val: [0, res.total, 0, 0] }];
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// xsajSelectPage(promes).then(res => {
|
||||||
|
// list[2].tableList = res.records || [];
|
||||||
|
// list[2].pageConfiger.total = res.total;
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -420,7 +453,6 @@ const onSearch = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('请选择查询条件')
|
ElMessage.warning('请选择查询条件')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user