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

tui

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