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

推更新

parent 18785865
...@@ -113,8 +113,6 @@ export default { ...@@ -113,8 +113,6 @@ export default {
}, },
}, },
mounted() { mounted() {
console.log(this.tableData);
console.log(this.loading);
}, },
watch: { watch: {
tableData(val) { tableData(val) {
......
...@@ -22,9 +22,11 @@ ...@@ -22,9 +22,11 @@
<span>&nbsp;</span> <span>&nbsp;</span>
<el-switch <el-switch
v-if="switchBtn" v-if="switchBtn"
v-model="row.check"
@change="$emit('view', row)" @change="$emit('view', row)"
title="核查" title="核查"
v-model="row.check" :active-value="true"
:inactive-value="false"
></el-switch> ></el-switch>
<span>&nbsp;</span> <span>&nbsp;</span>
<el-button <el-button
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -107,6 +108,7 @@ ...@@ -107,6 +108,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -148,6 +150,7 @@ ...@@ -148,6 +150,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -189,6 +192,7 @@ ...@@ -189,6 +192,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -230,6 +234,7 @@ ...@@ -230,6 +234,7 @@
notAdd notAdd
notDel notDel
notSearch notSearch
notPagination
:config="tableConfig" :config="tableConfig"
> >
</LayoutTable> </LayoutTable>
...@@ -310,7 +315,7 @@ export default { ...@@ -310,7 +315,7 @@ export default {
mixins: [form, table], mixins: [form, table],
components: {}, components: {},
created() { created() {
this.changePath("perform/dept/conf"); this.changePath("perform//staff/conf");
// 获取部门列表 // 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => { this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
...@@ -319,6 +324,7 @@ export default { ...@@ -319,6 +324,7 @@ export default {
this.deptArr = []; this.deptArr = [];
} }
}); });
this.checkArr = [];
// this.getKaoQin(); // this.getKaoQin();
}, },
data() { data() {
...@@ -333,30 +339,17 @@ export default { ...@@ -333,30 +339,17 @@ export default {
direction: "rtl", direction: "rtl",
toString: [], toString: [],
toDate: [], toDate: [],
tableData: [ tableData: [],
{
core: "-0.5",
name: "迟到",
simple: "迟到5分钟以内(包含5分钟)",
check: false,
},
],
// 表单校验 // 表单校验
rules: {}, rules: {},
activeName: "1", activeName: "1",
options: [ options: [],
{
value: "1",
label: "工作纪律",
},
{
value: "2",
label: "工作效能",
},
],
type: "", type: "",
keywords: "", keywords: "",
deptArr: [], deptArr: [],
urls: {
saveUrl: "/perform/dept/conf/save",
},
config: { config: {
isshowTabPane: false, isshowTabPane: false,
search: [], search: [],
...@@ -373,36 +366,39 @@ export default { ...@@ -373,36 +366,39 @@ export default {
label: "操作", label: "操作",
width: 100, width: 100,
formatter: (row) => { formatter: (row) => {
return ( if (row.check) {
<table-buttons return <span>不选择</span>;
noAdd } else {
noView return <span style="cursor:pointer">选择</span>;
noEdit }
noDel
switchBtn
row={row}
onEdit={this.eddRules}
onDel={this.toDelRules}
onView={this.switchChange}
/>
);
}, },
}, },
], ],
}, },
cateObj: {}, cateObj: {},
dataArr: [], dataArr: [],
checkArr: [],
}; };
}, },
// watch: {
// query: {
// deep,
// handler(val) {
// console.log(val);
// },
// },
// },
methods: { methods: {
handleRowClick(val) {
val.check = !val.check;
val.check
? this.checkArr.push(val)
: (this.checkArr = this.checkArr.filter((v) => v.id !== val.id));
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
val.ruleId = val.id;
val.ruleName = val.name;
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: "";
this.form.deptConfDetail = this.checkArr;
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData.data);
},
typeSelect(val) { typeSelect(val) {
this.getKaoQin(val); this.getKaoQin(val);
}, },
...@@ -423,29 +419,56 @@ export default { ...@@ -423,29 +419,56 @@ export default {
categoryId, categoryId,
type: this.activeName, type: this.activeName,
page: this.query.page, page: this.query.page,
size: -1,
orderColList: this.typeArr, orderColList: this.typeArr,
name: this.searchValue, name: this.searchValue,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.tableData = res.data; this.tableData = res.data;
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: this.tableData.data.forEach((v) => {
v.check = false;
});
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData); this.$forceUpdate(this.tableData);
} else { } else {
this.tableData = {}; this.tableData = {};
} }
}); });
}, },
switchChange(val) {},
handleClick(val) { handleClick(val) {
this.getData(); this.getData();
this.cateObj = {};
this.type = "";
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
// this.urls.currUrl = "perform/dept/conf/edit"; this.checkArr = [];
this.type = "";
this.activeName = "1";
this.$get("/perform/dept/conf/info", { id: row.id }).then((res) => { this.$get("/perform/dept/conf/info", { id: row.id }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.form = res.data; this.form = res.data;
this.checkArr = res.data.deptConfDetail;
res.data.deptConfDetail.length > 0
? res.data.deptConfDetail.forEach((val) => {
val.check = true;
val.id = val.ruleId;
this.tableData.data.forEach((v) => {
v.check = false;
val.ruleId == v.id ? (v.check = true) : "";
});
})
: "";
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else { } else {
this.form = {}; this.form = {};
} }
...@@ -459,14 +482,18 @@ export default { ...@@ -459,14 +482,18 @@ export default {
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset(); this.reset();
// this.urls.currUrl = "perform/dept/conf/add";
this.getData(); this.getData();
this.open = true; this.open = true;
this.checkArr = [];
this.type = "";
this.activeName = "1";
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增部门自动考核信息"; this.title = "新增部门自动考核信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
console.log(123);
return;
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "perform/dept/conf/view"; this.urls.currUrl = "perform/dept/conf/view";
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="goal_title"> <div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" /> <img src="../../../../assets/images/u17641.svg" alt="" />
<span> <span>
{{ val.deptName ? val.deptName : "--" }} {{ val.deptName ? val.deptName : val.staffNames }}
</span> </span>
</div> </div>
<p class="goal_txt"> <p class="goal_txt">
...@@ -25,19 +25,19 @@ ...@@ -25,19 +25,19 @@
</p> </p>
<p> <p>
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>考勤绩效指标/工作纪律{{ val.attendCount }}</el-tag >考勤绩效指标:{{ val.attendCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>评价绩效指标/工作纪律{{ val.assessCount }}</el-tag >评价绩效指标:{{ val.assessCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>办件绩效指标/工作效能{{ val.workCount }}</el-tag >办件绩效指标:{{ val.workCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>效能绩效指标/工作纪律{{ val.effectCount }}</el-tag >效能绩效指标:{{ val.effectCount }}</el-tag
> >
<el-tag style="margin: 0 5px 5px 0" <el-tag style="margin: 0 5px 5px 0"
>其他绩效指标/工作纪律{{ val.otherCount }}</el-tag >其他绩效指标:{{ val.otherCount }}</el-tag
> >
</p> </p>
<p class="goal_txt"> <p class="goal_txt">
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="窗口负责人管理" name="2"> <el-tab-pane label="窗口负责人管理" name="2">
<div class="content"> <div class="content">
<LayoutTable :data="tableData" notSearch :config="tableConfig"> <LayoutTable :data="tableData" notSearch notDel :config="tableConfig">
</LayoutTable> </LayoutTable>
</div> </div>
</el-tab-pane> </el-tab-pane>
...@@ -99,7 +99,6 @@ export default { ...@@ -99,7 +99,6 @@ export default {
}, },
mixins: [table], mixins: [table],
created() { created() {
console.log(this.tableData);
sessionStorage.removeItem("type"); sessionStorage.removeItem("type");
sessionStorage.setItem("type", this.type); sessionStorage.setItem("type", this.type);
}, },
...@@ -168,6 +167,13 @@ export default { ...@@ -168,6 +167,13 @@ export default {
}) })
: ""; : "";
}, },
// 窗口负责人删除方法
toDel(row) {
this.$get("/window/owner/delete", { id: row }).then((res) => {
this.$message.success(res.msg);
this.getData();
});
},
}, },
data() { data() {
return { return {
...@@ -182,13 +188,11 @@ export default { ...@@ -182,13 +188,11 @@ export default {
{ type: "selection", width: 60 }, { type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 }, { type: "index", label: "序号", width: 50 },
{ label: "部门名称", prop: "deptName" }, { label: "负责人姓名", prop: "name" },
{ label: "姓名", prop: "name" },
{ label: "工号", prop: "number" }, { label: "所属部门", prop: "deptName" },
{ label: "电话号码", prop: "phone" }, { label: "联系电话", prop: "phone" },
{ {
label: "负责窗口数量", label: "负责窗口数量",
...@@ -197,10 +201,17 @@ export default { ...@@ -197,10 +201,17 @@ export default {
}, },
{ {
label: "创建时间", label: "更新时间",
prop: "createTime", prop: "updateTime",
formatter: this.formatterDate, formatter: this.formatterDate,
}, },
{
label: "更新人员",
prop: "updateUserId",
formatter: this.formatter,
},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
...@@ -208,6 +219,7 @@ export default { ...@@ -208,6 +219,7 @@ export default {
return ( return (
<table-buttons <table-buttons
noAdd noAdd
noView
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
...@@ -319,6 +331,9 @@ export default { ...@@ -319,6 +331,9 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
/deep/.el-tag {
width: 114px !important;
}
.goal_txt { .goal_txt {
font-family: "微软雅黑", sans-serif; font-family: "微软雅黑", sans-serif;
font-weight: 400; font-weight: 400;
......
...@@ -23,18 +23,22 @@ ...@@ -23,18 +23,22 @@
<Field <Field
label="联系电话:" label="联系电话:"
prop="phone" prop="phone"
maxLength="11"
v-model="form.phone" v-model="form.phone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
/> />
<el-col style="width: 100%;" :span="24"> <el-col style="width: 100%;" :span="12">
<Field <el-form-item label="选择部门">
label="选择部门:" <el-select v-model="form.deptId" style="width: 100%;">
prop="deptId" <el-option
v-model="form.deptId" v-for="item in deptArr"
placeholder="选择部门" :key="item.id"
:enumData="deptGroup" :label="item.deptName"
type="select" :value="item.id"
/> >
</el-option
></el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -42,48 +46,33 @@ ...@@ -42,48 +46,33 @@
<div class="content_top"> <div class="content_top">
<span>请选择窗口工作人员:</span> <span>请选择窗口工作人员:</span>
<div class="search_box"> <div class="search_box">
<el-select v-model="type" placeholder="请选择部门"> <el-select v-model="deptValue" style="width: 100%;">
<el-option <el-option
v-for="item in options" v-for="item in deptArr"
:key="item.value" :key="item.id"
:label="item.label" :label="item.deptName"
:value="item.value" :value="item.id"
style="width: 200px;"
> >
</el-option> </el-option
</el-select> ></el-select>
<el-input <el-input
v-model="keywords" v-model="keywords"
placeholder="请输入姓名关键字搜索" placeholder="请输入姓名关键字搜索"
style="width: 200px;margin: 0 10px;" style="width: 200px;margin: 0 10px;"
></el-input> ></el-input>
<el-button type="primary"> 搜索 </el-button> <el-button type="primary" @click="handleSearch"> 搜索 </el-button>
</div> </div>
</div> </div>
<div class="table_box"> <div class="table_box">
<el-table <LayoutTable
:data="tableData" :data="tableData"
border notAdd
style="width: 100%" notDel
height="520" notSearch
@selection-change="handleSelectionChange" notPagination
:config="tableConfig"
> >
<el-table-column type="selection" width="55"> </el-table-column> </LayoutTable>
<el-table-column type="index" label="序号" width="50">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="id" label="工号"> </el-table-column>
<el-table-column prop="deptaName" label="部门"> </el-table-column>
<el-table-column prop="zhiwei" label="职位"> </el-table-column>
<el-table-column prop="status" label="状态"> </el-table-column>
<el-table-column prop="phone" label="手机号"> </el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<span>{{ scope.row.check ? "已选择" : "选择" }}</span>
</template>
</el-table-column>
</el-table>
</div> </div>
</div> </div>
</el-row> </el-row>
...@@ -143,12 +132,23 @@ ...@@ -143,12 +132,23 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import table from "@/assets/mixins/table";
export default { export default {
name: "WindowOwnerDetail", name: "WindowOwnerDetail",
mixins: [form], mixins: [form, table],
components: {}, components: {},
created() { created() {
this.changePath("window/owner"); this.changePath("window/owner");
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
this.deptArr = res.data.data;
} else {
this.deptArr = [];
}
});
// this.getData();
}, },
data() { data() {
return { return {
...@@ -159,68 +159,144 @@ export default { ...@@ -159,68 +159,144 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
deptValue: "",
toString: [], toString: [],
toDate: [], toDate: [],
deptArr: [],
// 表单校验 // 表单校验
rules: {}, rules: {},
deptGroup: { 1: "部门1", 2: "部门2", 3: "部门3", 4: "部门4", 5: "部门5" },
options: [
{
value: "1",
label: "部门1",
},
{
value: "2",
label: "部门2",
},
],
type: "",
keywords: "", keywords: "",
tableData: [ checkArr: [],
{ urls: {
id: "123456", saveUrl: "/window/owner/save",
name: "xxx",
deptName: "部门1",
zhiwei: "工作人员",
status: "正式",
phone: "130****8888",
check: false,
}, },
config: {
isshowTabPane: false,
search: [],
columns: [
{ type: "index", label: "序号", width: 50 },
{ label: "姓名", prop: "name" },
{ label: "工号", prop: "workNum" },
{ label: "部门", prop: "deptName" },
{ label: "职位", prop: "positionName" },
{ label: "员工状态", prop: "status", formatter: this.formatter },
{ label: "手机号码", prop: "phoneNumber" },
{ {
id: "123456", label: "操作",
name: "xxx", width: 100,
deptName: "部门1", formatter: (row) => {
zhiwei: "工作人员", if (row.check) {
status: "正式", return <span>不选择</span>;
phone: "130****8888", } else {
check: false, return <span style="cursor:pointer">选择</span>;
}
},
}, },
], ],
},
}; };
}, },
methods: { methods: {
handleSelectionChange(val) { handleSearch() {
console.log(val); this.getData();
this.tableData.forEach((v) => (v.check = false)); },
val.forEach((v) => { getData() {
v.check = true; this.$post("/staff/list", {
page: 1,
size: -1,
deptId: this.deptValue,
name: this.keywords,
}).then((res) => {
if (res.code == 1) {
this.tableData = res.data;
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
});
})
: this.tableData.data.forEach((v) => {
v.check = false;
});
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else {
this.deptArr = [];
}
});
},
handleRowClick(val) {
val.check = !val.check;
val.check
? this.checkArr.push(val)
: (this.checkArr = this.checkArr.filter((v) => v.id !== val.id));
this.checkArr.length > 0
? this.checkArr.forEach((val) => {
val.staffId = val.id;
this.tableData.data.forEach((v) => {
val.id == v.id ? (v.check = val.check) : "";
}); });
})
: "";
this.tableData.data = [...this.tableData.data];
this.form.windowOwnerDetailList = this.checkArr;
this.$forceUpdate(this.tableData.data);
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "window/owner/edit"; this.deptValue = "";
this.keywords = "";
this.checkArr = [];
this.$get("/window/owner/info", { id: row.id }).then((res) => {
if (res.code == 1) {
this.form = res.data;
this.checkArr = res.data.windowOwnerDetailList;
res.data.windowOwnerDetailList.length > 0
? res.data.windowOwnerDetailList.forEach((val) => {
val.check = true;
val.id = val.staffId;
this.tableData.data.forEach((v) => {
v.check = false;
val.staffId == v.id ? (v.check = true) : "";
});
})
: "";
this.tableData.data = [...this.tableData.data];
this.$forceUpdate(this.tableData);
} else {
this.form = {};
}
this.open = true;
});
this.getData(); this.getData();
// this.urls.currUrl = "window/owner/edit";
// this.getData();
this.pageInfo.type = "edit"; this.pageInfo.type = "edit";
this.title = "修改窗口负责人"; this.title = "修改窗口负责人";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset(); this.reset();
this.urls.currUrl = "window/owner/add"; // this.urls.currUrl = "window/owner/add";
// this.getData();
this.deptValue = "";
this.checkArr = [];
this.keywords = "";
this.getData(); this.getData();
this.open = true;
this.pageInfo.type = "add"; this.pageInfo.type = "add";
this.title = "新增窗口负责人"; this.title = "新增窗口负责人";
}, },
...@@ -228,8 +304,8 @@ export default { ...@@ -228,8 +304,8 @@ export default {
view(row) { view(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "window/owner/view"; // this.urls.currUrl = "window/owner/view";
this.getData(); // this.getData();
this.pageInfo.type = "view"; this.pageInfo.type = "view";
this.title = "窗口负责人详细"; this.title = "窗口负责人详细";
}, },
...@@ -250,7 +326,7 @@ export default { ...@@ -250,7 +326,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
deptId: 0, deptId: "",
deptName: "", deptName: "",
name: "", name: "",
number: "", number: "",
...@@ -275,7 +351,7 @@ export default { ...@@ -275,7 +351,7 @@ export default {
padding: 0 20px; padding: 0 20px;
.bottom_content { .bottom_content {
width: 100%; width: 100%;
height: 600px; height: 680px;
background-color: rgba(242, 246, 252, 1); background-color: rgba(242, 246, 252, 1);
box-sizing: border-box; box-sizing: border-box;
border-width: 1px; border-width: 1px;
......
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