Commit cd6f6438 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent ae5f9748
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
> >
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
> >
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -413,7 +413,7 @@ export default { ...@@ -413,7 +413,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
图片凭证:{{ 图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
图片凭证:{{ 图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -381,7 +381,7 @@ export default { ...@@ -381,7 +381,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.c == -1 ? this.baseUrl + val : val} src={val.c == -1 ? this.baseUrl + val : val}
......
...@@ -207,7 +207,7 @@ export default { ...@@ -207,7 +207,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<el-row> <el-row>
<el-col :span="24" <el-col :span="24"
>图片凭证:{{ >图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
......
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, // { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<el-row> <el-row>
<el-col :span="12" <el-col :span="12"
>图片凭证:{{ >图片凭证:{{
form.filePaths ? picMatter(form.filePaths) : "--" form.snapPath ? picMatter(form.snapPath) : "--"
}}</el-col }}</el-col
> >
</el-row> </el-row>
...@@ -383,7 +383,7 @@ export default { ...@@ -383,7 +383,7 @@ export default {
this.$forceUpdate(this.form); this.$forceUpdate(this.form);
}, },
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? baseUrl + val : val} src={val.indexOf("http") == -1 ? baseUrl + val : val}
......
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
......
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.filePaths ? picMatter(form.filePaths) : "--" }} {{ form.snapPath ? picMatter(form.snapPath) : "--" }}
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.filePaths" :value="form.snapPath"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -410,7 +410,7 @@ export default { ...@@ -410,7 +410,7 @@ export default {
methods: { methods: {
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
...@@ -440,7 +440,7 @@ export default { ...@@ -440,7 +440,7 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.filePaths = val; this.form.snapPath = val;
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -481,6 +481,8 @@ export default { ...@@ -481,6 +481,8 @@ export default {
} }
this.form.processStatus = 2; this.form.processStatus = 2;
this.form.view = "核查"; this.form.view = "核查";
this.staffChange(this.form.staffId);
this.open = true; this.open = true;
}); });
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
...@@ -565,7 +567,7 @@ export default { ...@@ -565,7 +567,7 @@ export default {
errorResult: "", errorResult: "",
errorTime: "", errorTime: "",
fileNames: "", fileNames: "",
filePaths: "", snapPath: "",
goOffTimeStr: "", goOffTimeStr: "",
processStatus: 1, processStatus: 1,
remark: "", remark: "",
......
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
...@@ -251,6 +251,9 @@ export default { ...@@ -251,6 +251,9 @@ export default {
return row.processStatus == 1 ? ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notDel :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -120,7 +120,8 @@ export default { ...@@ -120,7 +120,8 @@ export default {
this.$download( this.$download(
"/perform/complain/record/exportExcel", "/perform/complain/record/exportExcel",
{ {
idList: this.selection, page: 1,
size: -1,
}, },
{ type: "excel" } { type: "excel" }
) )
...@@ -136,10 +137,12 @@ export default { ...@@ -136,10 +137,12 @@ export default {
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
}, },
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "status", name: "processStatus",
type: "select", type: "select",
label: "全部状态", label: "全部状态",
fuzzy: false, fuzzy: false,
...@@ -175,7 +178,7 @@ export default { ...@@ -175,7 +178,7 @@ export default {
fuzzy: false, fuzzy: false,
}, },
{ {
name: "source", name: "complainSource",
type: "select", type: "select",
label: "全部来源", label: "全部来源",
fuzzy: false, fuzzy: false,
...@@ -221,7 +224,7 @@ export default { ...@@ -221,7 +224,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
...@@ -251,9 +254,22 @@ export default { ...@@ -251,9 +254,22 @@ export default {
label: "操作", label: "操作",
width: 200, width: 200,
formatter: (row) => { formatter: (row) => {
return ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
) : (
<table-buttons
noAdd
noEdit
noDel
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notDel :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -120,7 +120,8 @@ export default { ...@@ -120,7 +120,8 @@ export default {
this.$download( this.$download(
"/perform/effect/record/exportExcel", "/perform/effect/record/exportExcel",
{ {
idList: this.selection, page: 1,
size: -1,
}, },
{ type: "excel" } { type: "excel" }
) )
...@@ -136,10 +137,12 @@ export default { ...@@ -136,10 +137,12 @@ export default {
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
}, },
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "status", name: "processStatus",
type: "select", type: "select",
label: "全部状态", label: "全部状态",
fuzzy: false, fuzzy: false,
...@@ -224,7 +227,7 @@ export default { ...@@ -224,7 +227,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
...@@ -251,9 +254,22 @@ export default { ...@@ -251,9 +254,22 @@ export default {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: (row) => { formatter: (row) => {
return ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
) : (
<table-buttons
noAdd
noEdit
noDel
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notDel :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -120,7 +120,8 @@ export default { ...@@ -120,7 +120,8 @@ export default {
this.$download( this.$download(
"/perform/gowork/record/exportExcel", "/perform/gowork/record/exportExcel",
{ {
idList: this.selection, page: 1,
size: -1,
}, },
{ type: "excel" } { type: "excel" }
) )
...@@ -136,10 +137,12 @@ export default { ...@@ -136,10 +137,12 @@ export default {
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
}, },
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "status", name: "processStatus",
type: "select", type: "select",
label: "全部状态", label: "全部状态",
fuzzy: false, fuzzy: false,
...@@ -211,7 +214,7 @@ export default { ...@@ -211,7 +214,7 @@ export default {
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
...@@ -238,9 +241,22 @@ export default { ...@@ -238,9 +241,22 @@ export default {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: (row) => { formatter: (row) => {
return ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
) : (
<table-buttons
noAdd
noEdit
noDel
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notDel :config="tableConfig">
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -120,7 +120,8 @@ export default { ...@@ -120,7 +120,8 @@ export default {
this.$download( this.$download(
"/perform/other/record/exportExcel", "/perform/other/record/exportExcel",
{ {
idList: this.selection, page: 1,
size: -1,
}, },
{ type: "excel" } { type: "excel" }
) )
...@@ -136,10 +137,12 @@ export default { ...@@ -136,10 +137,12 @@ export default {
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
row.view = "核查";
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
toView(row) { toView(row) {
row.view = "查看";
this.$refs.drawerform.view(row); this.$refs.drawerform.view(row);
}, },
}, },
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "status", name: "processStatus",
type: "select", type: "select",
label: "全部状态", label: "全部状态",
fuzzy: false, fuzzy: false,
...@@ -220,7 +223,7 @@ export default { ...@@ -220,7 +223,7 @@ export default {
// { label: "绩效规则id", prop: "ruleId", formatter: this.formatter }, // { label: "绩效规则id", prop: "ruleId", formatter: this.formatter },
{ {
label: "图片凭证", label: "图片凭证",
prop: "filePaths", prop: "snapPath",
formatter: this.formatterPic, formatter: this.formatterPic,
}, },
{ label: "绩效规则", prop: "ruleName" }, { label: "绩效规则", prop: "ruleName" },
...@@ -247,9 +250,22 @@ export default { ...@@ -247,9 +250,22 @@ export default {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: (row) => { formatter: (row) => {
return ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
) : (
<table-buttons
noAdd
noEdit
noDel
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -139,11 +139,11 @@ ...@@ -139,11 +139,11 @@
<el-col :span="22"> <el-col :span="22">
<el-form-item label="图片凭证:"> <el-form-item label="图片凭证:">
<div v-if="form.view == '查看'"> <div v-if="form.view == '查看'">
{{ form.filePaths ? picMatter(form.filePaths) : "--" }} {{ form.snapPath ? picMatter(form.snapPath) : "--" }}
</div> </div>
<ImageUpload <ImageUpload
v-else v-else
:value="form.filePaths" :value="form.snapPath"
@input="replaceImage" @input="replaceImage"
></ImageUpload> ></ImageUpload>
</el-form-item> </el-form-item>
...@@ -198,6 +198,7 @@ ...@@ -198,6 +198,7 @@
<form-buttons <form-buttons
@submit="submitForm" @submit="submitForm"
v-show="form.view != '查看'"
v-if="pageInfo.type != 'view'" v-if="pageInfo.type != 'view'"
noCancelBtn noCancelBtn
/> />
...@@ -389,7 +390,6 @@ export default { ...@@ -389,7 +390,6 @@ export default {
], ],
createTime: [{ required: true, message: "请选择创建时间" }], createTime: [{ required: true, message: "请选择创建时间" }],
}, },
staffArr: [], staffArr: [],
deptArr: [], deptArr: [],
kaoqinArr: [], kaoqinArr: [],
...@@ -427,7 +427,7 @@ export default { ...@@ -427,7 +427,7 @@ export default {
methods: { methods: {
picMatter(val) { picMatter(val) {
if (val !== "--") { if (val || val !== "--") {
return ( return (
<el-image <el-image
src={val.indexOf("http") == -1 ? this.baseUrl + val : val} src={val.indexOf("http") == -1 ? this.baseUrl + val : val}
...@@ -457,7 +457,7 @@ export default { ...@@ -457,7 +457,7 @@ export default {
}); });
}, },
replaceImage(val) { replaceImage(val) {
this.form.filePaths = val; this.form.snapPath = val;
}, },
staffChange(val) { staffChange(val) {
console.log(val); console.log(val);
...@@ -500,6 +500,8 @@ export default { ...@@ -500,6 +500,8 @@ export default {
} }
this.form.processStatus = 2; this.form.processStatus = 2;
this.form.view = "核查"; this.form.view = "核查";
this.staffChange(this.form.staffId);
this.open = true; this.open = true;
}); });
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
...@@ -579,7 +581,7 @@ export default { ...@@ -579,7 +581,7 @@ export default {
deptId: "", deptId: "",
deptName: "", deptName: "",
fileNames: "", fileNames: "",
filePaths: "", snapPath: "",
processStatus: 1, processStatus: 1,
remark: "", remark: "",
reviewDevice: "", reviewDevice: "",
...@@ -594,6 +596,7 @@ export default { ...@@ -594,6 +596,7 @@ export default {
subMethod: "", subMethod: "",
windowNum: "", windowNum: "",
workNum: "", workNum: "",
categoryId: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
{ {
name: "status", name: "processStatus",
type: "select", type: "select",
label: "全部状态", label: "全部状态",
fuzzy: false, fuzzy: false,
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
fuzzy: false, fuzzy: false,
}, },
{ {
name: "source", name: "reviewSource",
type: "select", type: "select",
label: "全部来源", label: "全部来源",
fuzzy: false, fuzzy: false,
...@@ -222,7 +222,11 @@ export default { ...@@ -222,7 +222,11 @@ export default {
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{ label: "图片凭证", prop: "snapPath" }, {
label: "图片凭证",
prop: "snapPath",
formatter: this.formatterPic,
},
{ label: "绩效规则", prop: "ruleNme" }, { label: "绩效规则", prop: "ruleNme" },
...@@ -251,6 +255,9 @@ export default { ...@@ -251,6 +255,9 @@ export default {
return row.processStatus == 1 ? ( return row.processStatus == 1 ? (
<table-buttons <table-buttons
noAdd noAdd
noView
noEdit
reCheck
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
......
...@@ -31,11 +31,12 @@ ...@@ -31,11 +31,12 @@
v-model="switchValue" v-model="switchValue"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#1890ff" inactive-color="#1890ff"
active-value="100" active-value="1"
inactive-value="0" inactive-value="0"
inactive-text="按分值排序" inactive-text="按分值排序"
active-text="按更新时间排序" active-text="按更新时间排序"
style="margin-left: 10px;" style="margin-left: 10px;"
@change="switchChange"
> >
</el-switch> </el-switch>
</div> </div>
...@@ -43,8 +44,14 @@ ...@@ -43,8 +44,14 @@
<el-input <el-input
placeholder="请输入考核内容关键字搜索" placeholder="请输入考核内容关键字搜索"
style="width: 300px;margin-right: 10px;" style="width: 300px;margin-right: 10px;"
v-model="searchValue"
></el-input> ></el-input>
<el-button type="primary"> 搜索 </el-button> <el-button
type="primary"
@click="getKaoQin(cateObj.id ? cateObj.id : '')"
>
搜索
</el-button>
</div> </div>
</div> </div>
<div class="table_box"> <div class="table_box">
...@@ -74,7 +81,6 @@ export default { ...@@ -74,7 +81,6 @@ export default {
dialogShow, dialogShow,
}, },
mixins: [table], mixins: [table],
props: { props: {
activeName: { activeName: {
type: String, type: String,
...@@ -84,8 +90,17 @@ export default { ...@@ -84,8 +90,17 @@ export default {
data() { data() {
return { return {
switchValue: "0", switchValue: "0",
searchValue: "",
index: -1, index: -1,
dataArr: [], dataArr: [],
typeArr: [
{
colName: "score",
sortKind: "desc",
},
],
cateObj: {},
config: { config: {
isshowTabPane: false, isshowTabPane: false,
search: [], search: [],
...@@ -131,26 +146,48 @@ export default { ...@@ -131,26 +146,48 @@ export default {
created() { created() {
// this.getData(); // this.getData();
console.log(123);
this.cateObj = {};
}, },
methods: { methods: {
switchChange() {
console.log(this.switchValue);
this.switchValue == 0
? (this.typeArr = [
{
colName: "score",
sortKind: "desc",
},
])
: (this.typeArr = [
{
colName: "updateTime",
sortKind: "desc",
},
]);
this.getKaoQin(this.cateObj.id);
},
handleClick(val, i) { handleClick(val, i) {
this.index = i; this.index = i;
this.cateObj = val;
this.getKaoQin(val.id);
}, },
addRules() { addRules() {
this.$refs.drawerform.add(); this.$refs.drawerform.add(this.dataArr, this.cateObj);
}, },
eddRules(row) { eddRules(row) {
this.$refs.drawerform.edit(row); this.$refs.drawerform.edit(row, this.dataArr, this.cateObj);
}, },
addCate() { addCate() {
this.$refs.dialogform.add(); this.$refs.dialogform.add(this.activeName);
}, },
toDelRules(val) { toDelRules(val) {
console.log(val);
this.$get("/perform/rules/delete", { id: val }).then((res) => { this.$get("/perform/rules/delete", { id: val }).then((res) => {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getKaoQin(); this.getKaoQin(this.cateObj.id ? this.cateObj.id : "");
// this.tableData = [];
// this.index = -1;
}); });
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
...@@ -162,12 +199,15 @@ export default { ...@@ -162,12 +199,15 @@ export default {
(res) => { (res) => {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.index = -1;
} }
); );
}, },
async getData() { async getData() {
await this.$post("/perform/rules/category/list").then((res) => { await this.$post("/perform/rules/category/list", {
this.getKaoQin(); type: this.activeName,
}).then((res) => {
this.getKaoQin(this.cateObj ? this.cateObj.id : "");
if (res.code == 1) { if (res.code == 1) {
this.dataArr = res.data.data; this.dataArr = res.data.data;
} else { } else {
...@@ -175,18 +215,20 @@ export default { ...@@ -175,18 +215,20 @@ export default {
} }
}); });
}, },
async getKaoQin() { async getKaoQin(categoryId) {
await this.$post("/perform/rules/list", { type: this.activeName }).then( await this.$post("/perform/rules/list", {
(res) => { categoryId,
if (res.code == 1) { page: this.query.page,
this.tableData = res.data; orderColList: this.typeArr,
console.log(res.data); name: this.searchValue,
this.$forceUpdate(this.tableData); }).then((res) => {
} else { if (res.code == 1) {
this.tableData = {}; this.tableData = res.data;
} this.$forceUpdate(this.tableData);
} else {
this.tableData = {};
} }
); });
}, },
}, },
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field <!-- <Field
label="绩效规则id" label="绩效规则id"
prop="ruleId" prop="ruleId"
v-model="form.ruleId" v-model="form.ruleId"
...@@ -15,12 +15,7 @@ ...@@ -15,12 +15,7 @@
v-model="form.ruleBrief" v-model="form.ruleBrief"
placeholder="请输入规则简称" placeholder="请输入规则简称"
/> />
<Field
label="分类名称"
prop="name"
v-model="form.name"
placeholder="请输入分类名称"
/>
<Field <Field
label="规则类型" label="规则类型"
prop="type" prop="type"
...@@ -28,7 +23,15 @@ ...@@ -28,7 +23,15 @@
type="select" type="select"
:enumData="dict.type" :enumData="dict.type"
placeholder="请选择规则类型" placeholder="请选择规则类型"
/> /> -->
<el-row style="width: 100%;">
<Field
label="分类名称"
prop="name"
v-model="form.name"
placeholder="请输入分类名称"
/>
</el-row>
<Field <Field
label="备注" label="备注"
prop="remark" prop="remark"
...@@ -77,16 +80,27 @@ export default { ...@@ -77,16 +80,27 @@ export default {
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "perform/rules/category/edit"; // this.urls.currUrl = "perform/rules/category/edit";
this.getData(); // this.getData();
this.$get("/perform/rules/category/info", { id: row.id }).then((res) => {
console.log(res);
if (res.code == 1) {
this.form = res.data;
} else {
this.form = {};
}
this.open = true;
});
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "修改绩效规则分类信息"; this.title = "修改绩效规则分类信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset(); this.reset();
this.urls.currUrl = "perform/rules/category/add"; // this.urls.currUrl = "perform/rules/category/save";
this.getData(); // this.getData();
this.form.type = row;
this.open = true;
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增绩效规则分类信息"; this.title = "新增绩效规则分类信息";
}, },
......
...@@ -8,16 +8,23 @@ ...@@ -8,16 +8,23 @@
> >
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field <el-col :span="20">
:span="20" <el-form-item label="分类:">
label="分类" <el-select
prop="categoryId" v-model="form.categoryId"
v-model="form.categoryId" style="width: 100%;"
:enumData="dict.categoryId" @change="cateChange"
type="select" >
placeholder="请选择分类" <el-option
/> v-for="item in kaoqinCateArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
<Field <Field
:span="20" :span="20"
label="考核内容简称" label="考核内容简称"
...@@ -44,7 +51,7 @@ ...@@ -44,7 +51,7 @@
/> />
<Field <Field
:span="20" :span="20"
label="扣分" label="加分/扣分"
prop="score" prop="score"
v-model="form.score" v-model="form.score"
placeholder="请输入扣分或增加分值" placeholder="请输入扣分或增加分值"
...@@ -110,24 +117,72 @@ export default { ...@@ -110,24 +117,72 @@ export default {
editUrl: "/perform/rules/edit", editUrl: "/perform/rules/edit",
saveUrl: "/perform/rules/save", saveUrl: "/perform/rules/save",
}, },
kaoqinCateArr: [],
}; };
}, },
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row, arr, obj) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "perform/rules/edit"; // this.urls.currUrl = "perform/rules/edit";
this.getData(); // this.getData();
this.$get("/perform/rules/info", { id: row.id }).then((res) => {
console.log(res);
if (res.code == 1) {
this.dict = res.dict;
this.form = res.data;
} else {
this.form = {};
}
// this.form.categoryId = obj ? obj.id : "";
this.form.assoOwner =
this.form.assoOwner == 0 || this.form.assoOwner == 1
? JSON.stringify(this.form.assoOwner)
: "";
this.form.subAddType = this.form.subAddType
? JSON.stringify(this.form.subAddType)
: "";
this.open = true;
console.log(this.form);
});
this.kaoqinCateArr = arr;
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "修改规则"; this.title = "修改规则";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row, obj) {
this.reset(); this.reset();
this.urls.currUrl = "perform/rules/add"; // this.urls.currUrl = "perform/rules/add";
this.getData(); // this.getData();
this.dict = {
subAddType: {
"1": "增加",
"2": "扣除",
},
assoOwner: {
"0": "",
"1": "",
},
type: {
"1": "考勤绩效",
"2": "评价绩效指标",
"3": "办件绩效指标",
"4": "效能绩效指标",
"5": "其它绩效指标",
},
categoryId: {
"11": "种类2",
"9": "评价分类",
"10": "种类1",
},
};
this.form.assoOwner = "";
this.form.subAddType = "";
this.kaoqinCateArr = row;
this.form.categoryId = obj ? obj.id : "";
this.open = true;
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增规则"; this.title = "新增规则";
}, },
...@@ -158,16 +213,16 @@ export default { ...@@ -158,16 +213,16 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
categoryId: null, categoryId: "",
categoryName: "", categoryName: "",
name: "", name: "",
content: "", content: "",
subAddType: 1, subAddType: "",
score: 0.0, score: 0.0,
assoOwner: 0, assoOwner: "",
ownerScore: 0.0, ownerScore: 0.0,
remark: "", remark: "",
type: 1, type: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
......
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