Commit 79588fbc by liyuhang19990520

警犬

parent 903f4d9b
No preview for this file type
......@@ -9,6 +9,10 @@ export const getJobDogList = params =>
export const dogQuery = params =>
postJson(`${baseUrl}/retired/dogQuery`, params)
// 获取警犬复训列表接口
export const retiredDogSpQuery = params =>
postJson(`${baseUrl}/retired/dogSpQuery`, params)
// 警犬复训(导出url)
export const exportJobDogUrl = `${baseUrl}/refreshment/export`
......
......@@ -356,6 +356,21 @@ export default [
routeNames: ['poDogRetireManageEdit', 'poDogRetireManageAdd'],
}
},
// 退役审核(二级菜单)
{
path: 'tyshManage',
name: 'tyshManage',
component: () => import('@/views/tyshManage/index.vue'),
meta: {
title: '退役审核',
isOneMenu: false,
keepAlive: true,
oneMenuName: 'poDogManage',
paixu: 4,
routeNames: [],
}
},
// 警用退役犬信息管理(编辑页)
{
path: 'poDogRetireManageEdit',
......@@ -388,7 +403,7 @@ export default [
isOneMenu: false,
keepAlive: true,
oneMenuName: 'poDogManage',
paixu: 4,
paixu: 5,
routeNames: [],
}
},
......
......@@ -308,10 +308,18 @@ export const getGzqfxglAllColumns = () => {
prop: "checkUnit",
},
{
label: "评定日期",
label: "考核评定日期",
prop: "checkDate",
},
{
label: "考核结果",
prop: "trainResult",
},
{
label: "等级评定日期",
prop: "pdrq",
},
{
label: "主考人",
prop: "checkStaff",
},
......
......@@ -918,8 +918,8 @@ export default {
this.$set(this.detailInfo, "file1", arr);
this.fileList = arr;
}
if (datas.workingDogClassificationId) {
workDog = datas.workingDogClassificationId.split("#") || [];
if (datas.workingDogClassificationIdStr) {
workDog = datas.workingDogClassificationIdStr.split("#") || [];
let fArr = datas.score.split("#") || [];
if (workDog && workDog.length > 0) workDog.pop();
workDog.forEach((workItem, workIndex) => {
......
......@@ -641,7 +641,7 @@ export default {
this.gsjzOptions = await getJsonDataApi("CODE_POLICECATEGORY");
},
methods: {
tqsp() {
tqsp(dogxxzjbh) {
let self = this;
this.$refs.detailInfoRef.validate((result) => {
if (result) {
......@@ -657,7 +657,7 @@ export default {
}
addSp({
orderXxzjbh: this.detailInfo.orderXxzjbh,
fxDogXxzjbh: this.$route.query.xxzjbh,
fxDogXxzjbh: this.$route.query.xxzjbh || dogxxzjbh,
glxxzjbhSource: "01",
spType: "01",
// spType: spType,
......@@ -818,11 +818,11 @@ export default {
let workArr = [];
let scoreArr = [];
let workDog = [];
if (datas.trainSubject) {
workArr = datas.trainSubject.split("#") || [];
if (datas.workingDogClassificationId) {
workArr = datas.workingDogClassificationId.split("#") || [];
}
if (datas.trainSubjectGrade) {
scoreArr = datas.trainSubjectGrade.split("#") || [];
if (datas.score) {
scoreArr = datas.score.split("#") || [];
}
if (datas.tbStDogFile2) {
let arr = datas.tbStDogFile2.map((e) => {
......@@ -847,8 +847,10 @@ export default {
this.$set(this.detailInfo, "file1", arr);
this.fileList = arr;
}
if (datas.workingDogClassificationId) {
workDog = datas.workingDogClassificationId.split("#") || [];
this.workingDogClassificationId = [];
if (datas.workingDogClassificationIdStr) {
workDog =
datas.workingDogClassificationIdStr.split("#") || [];
let fArr = datas.score.split("#") || [];
if (workDog && workDog.length > 0) workDog.pop();
workDog.forEach((workItem, workIndex) => {
......@@ -862,6 +864,12 @@ export default {
fArr[workIndex];
});
}
this.kaoHeLists = [
{
zhuanye: "",
fenshu: "",
},
];
if (
workArr &&
scoreArr &&
......@@ -1187,6 +1195,11 @@ export default {
dogAdd(obj)
.then((res) => {
if (res.code === 200 && res.success) {
if (boo) {
this.loading = false;
this.tqsp(res.data.xxzjbh);
return;
} else {
this.$message({
message: "保存成功",
type: "success",
......@@ -1196,6 +1209,7 @@ export default {
this.goBack();
return;
}
}
this.loading = false;
this.$message({
message: res.message,
......
......@@ -50,7 +50,7 @@
<span
class="zd-value"
v-if="
item.id == 'workingDogClassificationId#score' ||
item.id == 'workingDogClassificationIdStr#score' ||
item.id == 'trainSubjectStr#trainSubjectGrade'
"
v-html="strReplace(item.id, detailObj)"
......@@ -593,7 +593,7 @@ export default {
data: [
{ title: "工作犬等级", col: "3", id: "trainingLevelId" },
{ title: "评定日期", col: "3", id: "pdrq" },
{ title: "专业方向及成绩", col: "5", id: "workingDogClassificationId#score" },
{ title: "专业方向及成绩", col: "5", id: "workingDogClassificationIdStr#score" },
{
title: "其他材料",
col: "6",
......
......@@ -129,6 +129,7 @@
}}
</p>
<el-upload
:class="'noup'"
disabled
class="photo"
action="#"
......@@ -214,6 +215,7 @@
prop="file1"
>
<el-upload
class="noup"
disabled
action="#"
list-type="picture-card"
......@@ -330,6 +332,7 @@
>
<el-select
clearable
@change="ifreChange"
placeholder="请选择是否退役"
v-model="detailInfo.ifretired"
>
......@@ -353,6 +356,7 @@
</el-form-item>
<el-form-item
v-if="zdAll"
label="健康状态"
class="elItemClass elDateClass"
prop="healthStatus"
......@@ -373,6 +377,7 @@
</el-form-item>
<el-form-item
v-if="zdAll"
label="归宿单位"
class="elItemClass elDateClass"
prop="destinationUnitName"
......@@ -386,6 +391,7 @@
</el-form-item>
<el-form-item
v-if="zdAll"
label="退役原因"
class="elItemClass elDateClass"
prop="retiredReasons"
......@@ -404,6 +410,59 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
v-if="zdAll"
:label="'其他材料文件' + `(${fileList3.length})`"
class="elItemClass2 elDateClass"
prop="file3"
>
<el-upload
action="#"
list-type="picture-card"
multiple
:on-change="fileChange3"
:file-list="fileList3"
:auto-upload="false"
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{ file }">
<div class="photoList">
<p :title="file.name">{{ file.name }}</p>
<img width="146px" height="146px" :src="file.url2" alt="" />
<span class="el-upload-list__item-actions">
<span
v-if="
file.name.indexOf('png') >= 0 ||
file.name.indexOf('jpg') >= 0 ||
file.name.indexOf('jpeg') >= 0 ||
file.name.indexOf('pdf') >= 0
"
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</div>
</el-upload>
</el-form-item>
</div>
<div class="elBtns">
......@@ -467,6 +526,8 @@ export default {
},
data() {
return {
fileList3: [],
zdAll: true,
updatepdtraininglevelidflag: null,
disabled: false,
dialogImageUrl: "",
......@@ -648,6 +709,13 @@ export default {
this.jkztOptions = await getJsonDataApi("CODE_RETIRED_HEALTHSTATUS");
},
methods: {
ifreChange(val) {
if (val == "1") {
this.zdAll = true;
} else {
this.zdAll = false;
}
},
tqsp() {
let self = this;
this.$refs.detailInfoRef.validate((result) => {
......@@ -721,6 +789,21 @@ export default {
window.URL.revokeObjectURL(anchor.href);
}
},
async handleRemove(file) {
let uid = file.uid;
if (file.xxzjbh) {
let parm = new FormData();
parm.append("xxzjbh", file.xxzjbh);
let res = await deleteFileByXxzjbh(parm);
if (!res.success) {
this.$message.error("文件删除失败!");
return;
}
}
let index = this.fileList3.findIndex((e) => e.uid == uid);
this.fileList3.splice(index, 1);
this.$message.success("删除成功!");
},
handleDownload(file) {
if (file.url) {
const xhr = new XMLHttpRequest();
......@@ -773,6 +856,18 @@ export default {
return e;
});
},
fileChange3(file, fileList) {
let h = ["png", "jpg", "jpeg"];
this.fileList3 = fileList.map((e) => {
let index = h.findIndex((j) => e.name.indexOf(j) >= 0);
if (index < 0) {
e.url2 = require("@/assets/img/excel.png");
} else {
e.url2 = e.url;
}
return e;
});
},
fileChange2(file, fileList) {
this.fileList2 = fileList;
this.$set(this.detailInfo, "file2", fileList);
......@@ -937,8 +1032,22 @@ export default {
this.$set(this.detailInfo, "file1", arr);
this.fileList = arr;
}
if (datas.workingDogClassificationId) {
workDog = datas.workingDogClassificationId.split("#") || [];
if (datas.tbStDogFile3) {
let arr = datas.tbStDogFile3.map((e) => {
e.name = e.filename;
if (e.zpnr) {
e.url = e.zpnr;
e.url2 = e.zpnr;
} else {
e.url2 = require("@/assets/img/excel.png");
}
return e;
});
this.$set(this.detailInfo, "file3", arr);
this.fileList3 = arr;
}
if (datas.workingDogClassificationIdStr) {
workDog = datas.workingDogClassificationIdStr.split("#") || [];
let fArr = datas.score.split("#") || [];
if (workDog && workDog.length > 0) workDog.pop();
workDog.forEach((workItem, workIndex) => {
......@@ -981,6 +1090,16 @@ export default {
);
}
}
if (!datas.ifretired) {
datas.ifretired = "1";
}
if (datas.ifretired) {
if (datas.ifretired == "1") {
this.zdAll = true;
} else {
this.zdAll = false;
}
}
this.detailInfo = datas;
this.loading = false;
return;
......@@ -1042,12 +1161,13 @@ export default {
healthStatus: this.detailInfo.healthStatus,
destinationUnitName: this.detailInfo.destinationUnitName,
retiredReasons: this.detailInfo.retiredReasons,
file3: this.fileList3,
};
if (this.$route.query.xxzjbh) {
this.editParams(params, boo);
} else {
this.addParams(params);
this.addParams(params,boo);
}
}
});
......@@ -1061,11 +1181,18 @@ export default {
healthStatus: this.detailInfo.healthStatus,
destinationUnitName: this.detailInfo.destinationUnitName,
retiredReasons: this.detailInfo.retiredReasons,
file3: this.fileList3,
};
let param = new FormData();
for (let key in obj) {
if (key == "file3") {
obj[key].forEach((e) => {
if (e.raw) param.append("file3", e.raw);
});
} else {
param.append(key, obj[key]);
}
}
this.loading = true;
dogUpdate(param)
.then((res) => {
......@@ -1148,7 +1275,7 @@ export default {
<style scoped lang="scss">
@import "../../../assets/styles/detailContent.scss";
/deep/ .el-upload--picture-card {
.noup /deep/ .el-upload--picture-card {
display: none !important;
}
.jssfzhClass {
......
......@@ -85,14 +85,14 @@
>
</div>
<div class="rightC">
<el-button
<!-- <el-button
icon="el-icon-plus"
size="small"
type="primary"
plain
class="btnStylePub btnStyle1"
@click="addData"
>新增</el-button>
>新增</el-button> -->
<!-- <el-button
size="small"
icon="el-icon-plus"
......
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