Commit e384f4e7 by zhangzhijie

修复单位字典bug,添加标注时必选的校验

parent ddcccb91
......@@ -180,7 +180,8 @@
v-for="city in item.checkList"
:label="city"
:key="city.val"
>{{ city.label }}</el-checkbox
>{{ city.label }}
</el-checkbox
>
</el-checkbox-group>
</div>
......@@ -395,7 +396,7 @@ import SelectTree from "@c/tree_components.vue";
import SelectTreeDialog from "@c/treeCode_components.vue";
import LazySelectTreeDialog from "@c/lazy_treeCode.vue";
import axios from "axios";
import { esAsjQuery } from "@/api/queryAj.js";
import {esAsjQuery} from "@/api/queryAj.js";
import Http from "@/utils/http.js";
import qs from "qs";
......@@ -474,6 +475,19 @@ export default {
this.isInclude = arr.some((item) => item == this.identitycard);
},
methods: {
getCurrentUnit(unitcode, unitList,arr) {
for (let i = 0; i < unitList.length; i++) {
if (unitcode == unitList[i].id) {
console.log(unitList[i])
arr.push(unitList[i]);
}
}
if(arr.length==0){
for(let i = 0; i < unitList.length; i++){
this.getCurrentUnit(unitcode, unitList[i].children,arr);
}
}
},
bjBack(ajbh) {
this.$emit("bjBack", ajbh);
},
......@@ -562,7 +576,7 @@ export default {
self.doQueryRequest(json).then((res) => {
if (res.code === 200) {
require.ensure([], () => {
const { export_json_to_excel } = require("../utils/Export2Excel");
const {export_json_to_excel} = require("../utils/Export2Excel");
const list = res.data.rows;
const data = self.formatJson(filterVal, list);
export_json_to_excel(tHeader, data, self.excelHeader);
......@@ -586,7 +600,8 @@ export default {
cancelButtonText: "取消",
type: "warning",
})
.then(() => {})
.then(() => {
})
.catch(() => {
this.$message({
type: "info",
......@@ -597,14 +612,14 @@ export default {
toXg(item, type) {
let routeData = this.$router.resolve({
path: "/malamodify",
query: { asjbh: item.asjbh, type: type },
query: {asjbh: item.asjbh, type: type},
});
window.open(routeData.href, "_blank");
},
toLasxxg(asjbh, type, type2) {
let routeData = this.$router.resolve({
path: "/malasxmodify",
query: { asjbh: asjbh, type: type, type2 },
query: {asjbh: asjbh, type: type, type2},
});
window.open(routeData.href, "_blank");
},
......@@ -661,7 +676,7 @@ export default {
this.formData.page = val;
this.doQuery("yes");
},
tableRowClassName({ rowIndex }) {
tableRowClassName({rowIndex}) {
if (rowIndex % 2 == 0) {
return "";
} else {
......@@ -768,9 +783,12 @@ export default {
unitcode = unitcode.substring(0, 4) + "00000000";
}
axios.get(`JsonData/CODE_UNITNM.json`).then((res) => {
var arr = res.data.rows.filter((value) => {
let arr = [];
this.getCurrentUnit(unitcode,res.data.rows,arr);
/* var arr = res.data.rows.filter((value) => {
return value.id == unitcode;
});
});*/
console.log(arr)
self.$set(self.propQueryField[1], "codeOptions", arr);
});
self.doQuery("yes");
......@@ -850,6 +868,7 @@ export default {
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
.el-radio {
color: #606266;
cursor: pointer;
......
......@@ -35,7 +35,8 @@
>
<el-tag
style="font-size: 24px; color: #888; border: 1px solid #888"
>{{ bzztMs }}</el-tag
>{{ bzztMs }}
</el-tag
>
</div>
<div
......@@ -712,7 +713,7 @@ import {
initAjlbTree,
} from "@/api/ajbzDetail.js";
import axios from "@/utils/http.js";
import { queryCodeByType } from "@/api/queryAj.js";
import {queryCodeByType} from "@/api/queryAj.js";
export default {
name: "ajbzDetail",
......@@ -762,21 +763,21 @@ export default {
formLabelAlign: [],
formLabelAlign2: [],
barData: [
{ id: 1, name: "案件信息" },
{ id: 2, name: "现场信息" },
{ id: 3, name: "人员" },
{id: 1, name: "案件信息"},
{id: 2, name: "现场信息"},
{id: 3, name: "人员"},
],
tableBar: [
{ key: 1, name: "盗窃案" },
{ key: 2, name: "诈骗案" },
{ key: 3, name: "抢劫案" },
{ key: 4, name: "抢夺案" },
{ key: 5, name: "招摇撞骗案" },
{key: 1, name: "盗窃案"},
{key: 2, name: "诈骗案"},
{key: 3, name: "抢劫案"},
{key: 4, name: "抢夺案"},
{key: 5, name: "招摇撞骗案"},
],
ryList: [
{ ryid: 1, name: "嫌疑人" },
{ ryid: 2, name: "受害人" },
{ ryid: 3, name: "报案人" },
{ryid: 1, name: "嫌疑人"},
{ryid: 2, name: "受害人"},
{ryid: 3, name: "报案人"},
],
centerDialogVisible: false,
centerDialogVisible1: false,
......@@ -1000,6 +1001,7 @@ export default {
this.laData = response.data.rows.filter((val) => {
return val.parentId == `${this.ajzlb}0000`;
});
function compare(id) {
return function (a, b) {
var value1 = a[id];
......@@ -1007,6 +1009,7 @@ export default {
return value1 - value2;
};
}
this.laData.sort(compare("id"));
this.parentLb.id = this.ajxzlb;
}
......@@ -1073,21 +1076,21 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {});
}).then(() => {
});
}
},
toXk() {
window.open(this.xcbhUrl, "_blank");
},
submitBz() {
if (
(this.parentLb.parentId == null || this.parentLb.parentId == "") &&
(this.parentLb.id == null || this.parentLb.id == "") &&
(this.parentLb.childId == null || this.parentLb.childId == "")
) {
this.$message.error(
"未找到有效的标注数据,请选择案件类别后再进行标注保存"
);
if ((this.parentLb.id == null || this.parentLb.id == "") && this.laData.length > 0) {
this.$message.error("请标注小案类别后再完成标注");
return;
}
if ((this.parentLb.childId == null || this.parentLb.childId == "") && this.xaData.length > 0) {
this.$message.error("请标注细案类别后再完成标注");
return;
}
this.$confirm("此操作将进行案件标注, 是否继续?", "提示", {
......
......@@ -1082,14 +1082,13 @@ export default {
window.open(this.xcbhUrl, "_blank");
},
submitBz() {
if (
(this.parentLb.parentId == null || this.parentLb.parentId == "") &&
(this.parentLb.id == null || this.parentLb.id == "") &&
(this.parentLb.childId == null || this.parentLb.childId == "")
) {
this.$message.error(
"未找到有效的标注数据,请选择案件类别后再进行标注保存"
);
if ((this.parentLb.id == null || this.parentLb.id == "") && this.laData.length > 0) {
this.$message.error("请标注小案类别后再完成标注");
return;
}
if ((this.parentLb.childId == null || this.parentLb.childId == "") && this.xaData.length > 0) {
this.$message.error("请标注细案类别后再完成标注");
return;
}
this.$confirm("此操作将进行案件标注, 是否继续?", "提示", {
......
......@@ -1082,14 +1082,13 @@ export default {
window.open(this.xcbhUrl, "_blank");
},
submitBz() {
if (
(this.parentLb.parentId == null || this.parentLb.parentId == "") &&
(this.parentLb.id == null || this.parentLb.id == "") &&
(this.parentLb.childId == null || this.parentLb.childId == "")
) {
this.$message.error(
"未找到有效的标注数据,请选择案件类别后再进行标注保存"
);
if ((this.parentLb.id == null || this.parentLb.id == "") && this.laData.length > 0) {
this.$message.error("请标注小案类别后再完成标注");
return;
}
if ((this.parentLb.childId == null || this.parentLb.childId == "") && this.xaData.length > 0) {
this.$message.error("请标注细案类别后再完成标注");
return;
}
this.$confirm("此操作将进行案件标注, 是否继续?", "提示", {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment