Commit e10f007d by liupeng

Merge branch 'dev_xzeq' of http://47.92.108.28/changchao/founder_vue into dev_xzeq

parents 50ed38e6 a095bc9c
......@@ -27,3 +27,15 @@ export const downAsjZjcl = params =>
//证据附件信息删除
export const delAsjZjcl = params =>
post(`${base.alyIP}/zjclJc/delAsjZjcl`, params);
//新证据类别删除
export const delZjclLbById = params =>
post(`${base.alyIP}/zjclLb/delZjclLbById`, params);
//新证据类别新增
export const addZjclLb = params =>
postform(`${base.alyIP}/zjclLb/addZjclLb`, params);
//新证据类别回显
export const getZjclLbById = params =>
post(`${base.alyIP}/zjclLb/getZjclLbById`, params);
//新证据类别修改
export const updateZjclLb = params =>
postform(`${base.alyIP}/zjclLb/updateZjclLb`, params);
......@@ -51,6 +51,15 @@ const menuLayouts = [
component: () => import("@/views/zjcl/jcgz/queryZjclLb.vue")
},
{
path: "/addZjclLb",
name: "addZjclLb",
meta: {
title: '检查规则',
isAdd: true,
},
component: () => import("@/views/zjcl/jcgz/addZjclLb.vue")
},
{
path: "/zjclrz",
name: "zjclrz",
meta: {
......
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "@c/form.vue";
import { addZjclLb,getZjclLbById, updateZjclLb } from "@/api/zjcl/zjcl";
export default {
name: "insertJcgz",
components: {
formCompontent,
},
data() {
return {
title: '新增证据类别',
propFormField: [
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "证据类别名称:",
id: "name",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
prop:'checkEmpty'
},
{
name: "证据类别描述:",
id: "description",
type: "text",
value: "",
placeholder: "请输入",
col: "2",
prop:'checkEmpty'
},
],
},
],
formLabelAlign: {
name:'',
description:''
},
};
},
methods: {
submit(params) {
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
if (!this.id) {
this.addSubmit(params, loading);
} else {
params.append('id',this.id)
this.editSubmit(params, loading);
}
},
addSubmit(params,loading){
addZjclLb(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryZjclLb");
},
});
} else {
loading.close();
this.$message.error(res.message);
}
});
},
editSubmit(params,loading){
updateZjclLb(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
this.$router.push("queryZjclLb");
},
});
} else {
loading.close();
this.$message.error(res.message);
}
});
},
},
created() {
if (this.$route.query.id) {
this.title = "修改证据材料检查规则"
this.id = this.$route.query.id;
getZjclLbById({id:this.id}).then(res=>{
if(res.code === 200){
let {name,description} = {...res.data.zjcl}
this.formLabelAlign.name = name
this.formLabelAlign.description = description
}
})
}
},
};
</script>
<style scoped lang="scss">
</style>
<template>
<div>12</div>
<div class="Content">
<right-content
:tableOperation="tableOperation"
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxDefaultFormThead="cxDefaultFormThead"
:cxUrl="cxUrl"
@add="add"
ref="rightContent"
>
<template #btnGroup="scope">
<el-button @click="edit(scope.scope)" type="text">编辑</el-button>
<el-button @click="dele(scope.scope)" type="text">删除</el-button>
</template>
</right-content>
</div>
</template>
<script>
import rightContent from "@c/ptCxForm_components.vue";
import { insertZjcl,delZjclLbById } from "@/api/zjcl/zjcl.js";
export default {
name: "queryZjclLb"
}
</script>
name: "queryZjclLb",
components: {
rightContent,
},
data() {
return {
tableOperation:true,
header: "证据类别管理",
pageBs: "queryZjclLb",
cxFormData: {
limit: 10,
page: 1,
},
cxDefaultFormThead: [
{
label: "证据类别编码",
prop: "code",
},
{
label: "证据类别名称",
prop: "name",
},
{
label: "证据类别描述",
prop: "description",
},
{
label: "录入时间",
prop: "lrsj",
},
<style scoped>
],
cxUrl: "/zjclLb/getZjclLbList",
revokeVisiable: false,
selectArr: [],
ckForm: {
file: "",
},
fileArr: [],
asjbh: "",
zjcl_lxdm: "",
Menu: [
{
id: "queryZjclLb",
label: "证据类别管理",
index: "queryZjclLb",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
},
methods: {
add() {
this.$router.push("addZjclLb");
},
dele(obj) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log(obj);
delZjclLbById({
id: obj.row.id,
}).then((res) => {
if (res.success && res.code == 200) {
this.$message({
type: "success",
message: "删除成功",
});
this.$refs.rightContent.doQuery("yes");
} else {
this.$message({
type: "warning",
message: res.message,
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
edit(obj) {
this.$router.push({
path: "/addZjclLb",
query: {
id: obj.row.id,
},
});
},
submitCKD() {
if (this.fileArr.length <= 0) {
this.$message.warning("请选择文件");
} else {
console.log(this.fileArr, this.asjbh);
let params = new FormData();
params.append("asjbh", this.asjbh);
params.append("zjclLxdm", this.zjcl_lxdm);
this.fileArr.forEach((i) => {
params.append("file", i.raw);
});
let loading = this.$loading({
lock: true,
text: "正在导入...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
insertZjcl(params).then((res) => {
if (res.code == 200 && res.success) {
this.$message.success("导入成功");
this.revokeVisiable = false;
this.$router.push("queryZjcl");
sessionStorage.setItem("routerPath", "queryZjcl");
setTimeout(() => {
this.$bus.$emit("routerPath");
}, 20);
} else {
this.$message.error("导入失败");
}
loading.close();
});
}
},
fileOnchange(file, fileList) {
if (fileList.length > 0) {
this.fileArr = [fileList[0]]; // 这一步,是 展示最后一次选择的csv文件
if (fileList.length > 1) this.$message.error("只能上传一个文件!");
}
},
// edit(obj) {
// this.$router.push({
// path: "/insertZjcl",
// query: {
// asjbh: obj.row.asjbh,
// },
// });
// },
},
};
</script>
<style>
.el-dialog__body {
padding: 10px 15px !important;
}
.rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 32px;
line-height: 32px;
font-family: inherit;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
.rightContent .el-form-item__error {
left: calc(66% - 27px);
top: 12px;
}
.success-row {
background-color: #fbf9f4 !important;
}
.Content .el-input,
.Content .el-date-editor--daterange.el-input__inner {
width: 100% !important;
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
</style>
......@@ -210,7 +210,7 @@ export default {
Menu: [
{
id: "queryZjcl",
label: "证据材料检查规则管理",
label: "案件证据材料检查",
index: "queryZjcl",
auth: "M0101",
className: "iconfont iconrizhi",
......
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