Commit ea6dc6b3 by xue_wengang

任务新增

parent 8acdcd04
{
"code":200,
"data":{
"rows":[
{
"ids":"1047651",
"label":"指纹",
"codeType":"CODE_XSJSBD_RWLXDM",
"text":"指纹",
"pId":null,
"id":"01",
"isParent":false,
"children":[]
},
{
"ids":"1047652",
"label":"足迹",
"codeType":"CODE_XSJSBD_RWLXDM",
"text":"足迹",
"pId":null,
"id":"02",
"isParent":false,
"children":[]
},
{
"ids":"1047653",
"label":"DNA",
"codeType":"CODE_XSJSBD_RWLXDM",
"text":"DNA",
"pId":null,
"id":"03",
"isParent":false,
"children":[]
},
{
"ids":"1047654",
"label":"视频",
"codeType":"CODE_XSJSBD_RWLXDM",
"text":"视频",
"pId":null,
"id":"04",
"isParent":false,
"children":[]
}
]
},
"success":true,
"message":"成功"
}
\ No newline at end of file
......@@ -14,12 +14,16 @@ import base from "@/api/base";
//查询比对任务详情信息
export const selectRwqkById = params =>
post(`${base.alyIP}/xsjsbdRwqk/selectRwqkById`, params);
postform(`${base.alyIP}/xsjsbdRwqk/selectRwqkById`, params);
//任务下发附件列表
export const selectRwxffj = params =>
postform(`${base.alyIP}/xsjsbdRwfj/selectRwxffj`, params);
//根据任务编号查询反馈列表信息
export const selectByRwbh = params =>
post(`${base.alyIP}/rwfk/selectByRwbh`, params);
//根据反馈编号查询反馈附件列表信息
export const selectFkfjxxByFkbh = params =>
post(`${base.alyIP}/rwfkfj/selectFkfjxxByFkbh`, params);
......@@ -30,6 +34,19 @@ export const updateRwqsByRwid = params =>
//新增反馈信息
export const insertFkxx = params =>
post(`${base.alyIP}/rwfk/insertFkxx`, params);
//任务新增
export const addBdrw = params =>
postform(`${base.alyIP}/xsjsbd/addBdrw`, params);
//接收人列表
export const getJsrList = params =>
post(`${base.alyIP}/xsjsbd/getJsrList`, params);
//接收人列表
export const getAsjxq = params =>
post(`${base.alyIP}/xsjsbd/getAsjxq`, params);
......@@ -26,8 +26,8 @@
? item.name
: ' '
"
v-for="(item, index) in groupItem.data"
:key="index"
v-for="item in groupItem.data"
:key="item.id"
:prop="item.id"
:ref="item.id"
:label-width="
......@@ -61,7 +61,7 @@
</el-input>
<div
v-if="item.type == 'textba'"
v-if="item.type == 'textTq'"
style="display: flex; align-items: center"
>
<el-input
......@@ -70,14 +70,8 @@
:disabled="item.disabled"
:class="item.input"
>
<template slot="append"><span @click="ajTq(formLabelAlign[item.id])">提取</span></template>
</el-input>
<el-button
type="info"
size="mini"
style="margin-left: 5px; margin-right: 0 !important"
@click="showJyDialog(item.jy, item.id)"
>搜索</el-button
>
</div>
<div
v-if="item.type == 'textXk'"
......@@ -190,8 +184,8 @@
:disabled="item.disabled"
>
<el-option
v-for="item2 in item.codeOptions"
:key="item2.value"
v-for="(item2,itemIndex) in item.codeOptions"
:key="itemIndex"
:label="item2.label"
:value="item2.value"
>
......@@ -1079,6 +1073,9 @@ export default {
self.initFields();
},
methods: {
ajTq(ajbh){
this.$emit('ajtq',ajbh)
},
initFields() {
var self = this;
var ifInitRules = false;
......@@ -1248,11 +1245,50 @@ export default {
}
}
}
} else if (item.type == "setValue") {
if (self.formLabelAlign[item.id]) {
if (itemData.objStr) {
if (item.multiple) {
params.append(
itemData.objStr + "." + item.id,
self.formLabelAlign[item.id][
self.formLabelAlign[item.id].length - 1
]
);
} else {
if(item.id == 'jsrXm'){
let arr = item.codeOptions.filter(items=> self.formLabelAlign[item.id] == items.value)
debugger
for(var index in arr[0] ){
params.append(
itemData.objStr + "." + index,
arr[0][index]
);
}
}else{
params.append(
itemData.objStr + "." + item.id,
self.formLabelAlign[item.id]
);
}
}
} else {
if (item.multiple) {
params.append(
item.id,
self.formLabelAlign[item.id][
self.formLabelAlign[item.id].length - 1
]
);
} else {
params.append(item.id, self.formLabelAlign[item.id]);
}
}
}
}
//1.2普通字段处理
else {
if (self.formLabelAlign[item.id]) {
console.log(self.formLabelAlign[item.id]);
if (self.formLabelAlign[item.id]) {
if (itemData.objStr) {
params.append(
......
<!--
* @Author: your name
* @Date: 2021-09-11 10:30:55
* @LastEditTime: 2021-09-11 10:30:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\xsjsdb\addRwbd.vue
-->
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
@ajtq="ajtq"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { getJsrList, addBdrw, getAsjxq } from "@/api/xsjsdb.js";
export default {
name: "addRwbd",
components: {
formCompontent,
},
data() {
return {
propFormField: [
//基本信息
{
title: "任务新增",
id: 1,
objStr: "rwqk",
index: 0,
data: [
{
name: "任务名称:",
id: "rwmc",
type: "text",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "任务类型:",
id: "rwlxdm",
type: "codeTree",
prop: "checkEmpty",
value: "",
placeholder: "请选择",
col: "2",
codeOptions: [],
codeTree: "CODE_XSJSBD_RWLXDM",
},
{
name: "案件编号:",
id: "asjbh",
type: "textTq",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案件名称:",
id: "ajmc",
type: "text",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "录入时间:",
id: "asjfssjKssj",
type: "dates",
disabled: false,
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "案件类别:",
id: "ajlbdm",
type: "codeTree",
prop: "checkEmpty",
value: "",
placeholder: "请选择",
col: "2",
codeOptions: [],
codeTree: "CODE_AJLB",
},
{
name: "简要案情:",
id: "jyaq",
type: "text",
prop: "checkEmpty",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "任务描述:",
id: "rwxq",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "接收人姓名:",
id: "jsrXm",
type: "setValue",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "图片列表:",
id: "picList",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "11",
acceptType: "image/jpeg,image/gif,image/png",
},
{
name: "视频列表:",
id: "videoList",
type: "file",
value: "",
requestUrl: "/flwsFj/tbstasjflwsCj/save",
col: "11",
acceptType: "image/jpeg,image/gif,image/png",
},
],
},
],
formLabelAlign: {
// lrsj: this.$moment().format("YYYY-MM-DD HH:mm:ss"),
},
Breadcrumb: [
{
name: "号码线索管理",
to: "/hmxsGl",
isActive: false,
},
{
name: "号码线索管理",
to: "/hmxsGl",
isActive: false,
},
{
name: "新增号码线索",
to: "/addHmxs",
isActive: true,
},
],
jsrList: [],
};
},
methods: {
ajtq(asjbh) {
var self = this;
getAsjxq({
asjbh,
}).then((res) => {
var result = res.data.data;
self.propFormField[0].data.forEach((fieldItem) => {
//遍历配置文件,拿到数据返回来的xs实体。
var fieldVale;
// if (entityName) {
// if (result[entityName] && fieldItem.id) {
// fieldVale = result[entityName][fieldItem.id];
// } else {
// fieldVale = result[fieldItem.id];
// }
// }
if (fieldItem.type == "file") {
self.$set(self.formLabelAlign, fieldItem.id, []);
if (result[fieldItem.id]) {
result[fieldItem.id].forEach((fileItem, fileIndex) => {
const fileObj = {
name: fileItem.xsfjDzwjmc,
url: fileItem.xsfjDzwjwz,
};
self.$set(
self.formLabelAlign[fieldItem.id],
fileIndex,
fileObj
);
});
}
} else {
fieldVale = result[fieldItem.id];
self.$set(self.formLabelAlign, fieldItem.id, fieldVale);
}
this.$forceUpdate();
});
self.$forceUpdate();
});
},
submit(params) {
debugger;
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
addBdrw(params)
.then((res) => {
debugger;
// this.$message.success("保存成功");
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
// callback: () => {
// this.$router.push("hmxsGl");
// loading.close();
// },
});
})
.catch((res) => {
loading.close();
});
},
getJsr(val) {
let type = "";
var self = this;
type =
val == "01"
? "BD0101"
: val == "02"
? "BD0102"
: val == "03"
? "BD0103"
: "BD0104";
debugger;
getJsrList({
qxid: type,
}).then((res) => {
self.jsrList = res.data.rows;
let arr = [];
self.jsrList.forEach((item) => {
arr.push({
label: item.trueName,
value: item.identitycard,
unitname: item.unitname,
unitcode: item.unitcode,
});
});
self.$set(self.propFormField[0].data[8], "codeOptions", arr);
});
},
},
created() {
this.$store.commit("user/SET_Breadcrumb", this.Breadcrumb);
this.getJsr();
},
watch: {
"formLabelAlign.rwlxdm"(val) {
if (val) {
this.getJsr(val);
}
},
},
};
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
......@@ -51,9 +51,9 @@ module.exports = {
proxy: {
"/apialy": {
target: "http://39.99.155.173:9022", //西藏: https://155.1.33.10:20010/ 阿里云:http://39.99.155.173:9022
ws: true,
// ws: true,
changeOrigin: true,
// secure: false,
secure: false,
pathRewrite: {
'^/apialy': '/'
}
......
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