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

tui

parent 0aac261e
......@@ -16,6 +16,9 @@ export default {
},
];
}
data.entity.inspect && data.entity.inspect == 1
? (data.entity.inspect = true)
: (data.entity.inspect = false);
return data;
},
// 渲染后置处理
......@@ -33,10 +36,8 @@ export default {
data.leavePersonId = Number(key);
}
}
console.log(this.dict.staffList);
}
}
return data;
},
// 提交表单的后置处理, 会阻断默认的回退行为
......@@ -56,7 +57,6 @@ export default {
// 默认拉取数据
getData() {
this.loading = true;
this.$get(this.urls.currUrl || this.pageInfo.currUrl, this.query)
.then(({ data }) => {
const res = this.beforeRender(data);
......@@ -68,7 +68,14 @@ export default {
res.entity = this.util_toDateStr(res.entity, this.toDate);
this.form = Object.assign({}, this.form, res.entity);
this.dict = Object.assign({}, this.dict, res.dict);
this.afterRender(res);
this.$route.name == "window/owner/list"
? this.$post("/staff/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
this.dict.staffList = res.data.data;
this.afterRender(res);
}
})
: this.afterRender(res);
})
.catch((error) => {
this.$message.error(error.message);
......@@ -102,6 +109,7 @@ export default {
this.form.leaveType
? (this.form.leaveType = this.form.leaveType.toString())
: "";
this.form.inspect ? (this.form.inspect = 1) : (this.form.inspect = 0);
this.$post(url, this.beforeSubmit(this.form))
.then((res) => {
this.$message.success(res.msg);
......
......@@ -133,7 +133,6 @@ export default {
val.length == 0 || val.length > 0
? (this.emptytxt = "暂无数据")
: (this.emptytxt = "加载中...");
// if (val.length > 0) {
// val.forEach((v) => {
// for (let key in v) {
......
......@@ -254,6 +254,11 @@ export default {
computed: {
field: {
get() {
if (Array.isArray(this.value)) {
this.value = this.value.map((v) => {
return typeof v == 'number' ? v + "" : v;
});
}
return this.value;
},
set(val) {
......
......@@ -271,6 +271,8 @@ export default {
this.$route.name == "perform/gowork/record/list" ||
this.$route.name == "perform/effect/record/list" ||
this.$route.name == "perform/other/record/list" ||
this.$route.name == "perform/attend/appeal/list" ||
this.$route.name == "window/owner/list" ||
this.$route.name == "staff/perform/summary/list"
) {
this.getArr();
......
This diff is collapsed.
......@@ -242,6 +242,7 @@
:prePageResult="data.pageInfo.prePageResult"
/>
</div>
<slot name="table-foot" class="table-foot"></slot>
</div>
</template>
......
......@@ -120,7 +120,7 @@ export default {
? [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "窗口负责人", prop: "ownerName" },
{ label: "窗口首席代表", prop: "ownerName" },
{
label: "登记年月",
......@@ -165,6 +165,16 @@ export default {
prop: "submitDate",
formatter: this.formatterDate,
},
{
label: "核查人",
prop: "submitDate",
formatter: this.formatterDate,
},
{
label: "最新核查时间",
prop: "submitDate",
formatter: this.formatterDate,
},
{
label: "处理状态",
prop: "checkStatus",
......
......@@ -119,18 +119,17 @@ export default {
}`;
},
},
{
label: "所属部门名称",
prop: "deptName",
formatter: this.formatter,
},
{
label: "所属大厅",
prop: "salaName",
formatter: this.formatter,
},
{
label: "部门(单位)名称",
prop: "deptName",
formatter: this.formatter,
},
{
label: "工作纪律",
prop: "discipline",
......
......@@ -57,12 +57,12 @@
align="center"
>
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="evaluation"
label="群众评议"
align="center"
>
</el-table-column>
</el-table-column> -->
<el-table-column
prop="efficiency"
label="工作效能"
......
......@@ -121,7 +121,7 @@ export default {
? [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "窗口负责人", prop: "ownerName" },
{ label: "窗口首席代表", prop: "ownerName" },
{
label: "登记年月",
......@@ -148,7 +148,7 @@ export default {
},
{
label: "考核窗口",
label: "窗口(单位)名称",
formatter: (row) => {
return `${row.windowName ? row.windowName : "--"}`;
},
......
......@@ -199,10 +199,16 @@ export default {
label: "全部类型",
fuzzy: false,
},
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "select",
label: "全部部门",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
{
......@@ -223,7 +229,7 @@ export default {
{ type: "index", label: "序号", width: 50 },
{ label: "姓名", prop: "staffName", formatter: this.formatter },
{ label: "所属大厅", prop: "salaName", formatter: this.formatter },
{ label: "所属部门", prop: "deptName", formatter: this.formatter },
{
......
This diff is collapsed.
......@@ -82,7 +82,7 @@ export default {
<p>
<span>服务规范</span>
<p>
{"(考勤绩效 *" + data.dict.weightPdu.attendWeight + "%"}
{"(考勤绩效/" + data.dict.weightPdu.attendWeight + ""}
</p>
</p>
))
......@@ -90,7 +90,9 @@ export default {
? (v.label = (
<p>
<span>群众评议</span>
<p>{"" + data.dict.weightPdu.reviewWeight + "分)"}</p>
<p>
{"(评价绩效/" + data.dict.weightPdu.reviewWeight + "分)"}
</p>
</p>
))
: v.label == "工作效能"
......@@ -98,7 +100,7 @@ export default {
<p>
<span>工作效能</span>
<p>
{"(办件绩效 *" + data.dict.weightPdu.goworkWeight + "%"}
{"(办件绩效/" + data.dict.weightPdu.goworkWeight + ""}
</p>
</p>
))
......@@ -107,7 +109,7 @@ export default {
<p>
<span>工作纪律</span>
<p>
{"(效能绩效 *" + data.dict.weightPdu.effectWeight + "%"}
{"(效能绩效/" + data.dict.weightPdu.effectWeight + ""}
</p>
</p>
))
......
......@@ -46,8 +46,14 @@
v-model="form.mobile"
:maxLength="11"
/>
<Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' />
<!-- <Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' />-->
<Field
label="用户类型"
prop="userType"
v-model="form.userType"
:enumData="dict.userType"
type="select"
/>
<!-- <Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' />-->
<Field
label="角色分配"
:span="24"
......@@ -93,7 +99,7 @@ export default {
loginName: [
{ required: true, message: "请输入英文的用户名", trigger: "blur" },
{
validator: function (rule, value, callback) {
validator: function(rule, value, callback) {
// 校验英文的正则
if (/[A-Za-z0-9]$/.test(value) == false) {
callback(new Error("请输入英文"));
......@@ -145,24 +151,39 @@ export default {
},
/**获取数据后弹框 */
afterRender(data) {
let arr = [];
// for (let key in data.dict.roleIds) {
// let obj = {};
// obj["value"] = key;
// obj["label"] = data.dict.roleIds[key];
// arr.push(obj);
// }
// data.dict.roleIds = arr;
if (data.entity.roleIds && data.entity.roleIds.length) {
data.entity.roleIds = data.entity.roleIds.map((v) => {
return v + "";
});
}
console.log(data.entity.roleIds, "1111");
this.$forceUpdate();
this.open = true;
},
beforeSubmit(data) {
data.roleIds = data.roleIds
.filter((item) => {
return item !== "";
})
.join(",");
return data;
},
// beforeSubmit(data) {
// data.roleIds = data.roleIds
// .filter((item) => {
// return item !== "";
// })
// .join(",");
// return data;
// },
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {roleIds:""};
this.form = { roleIds: "" };
this.resetForm("form");
},
......@@ -193,5 +214,3 @@ export default {
},
};
</script>
This diff is collapsed.
......@@ -6,14 +6,20 @@
:direction="direction"
size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" style="padding: 20px;">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
style="padding: 20px;"
>
<el-row>
<Field
type="select"
label="负责人姓名"
prop="staffId"
filterable
:disabled="editId?true:false"
:disabled="editId ? true : false"
v-model="form.staffId"
:enumData="userList"
placeholder="请输入负责人姓名"
......@@ -24,6 +30,14 @@
v-model="form.phone"
placeholder="请输入联系电话"
/>
<Field
label="角色"
prop="roleType"
type="select"
v-model="form.roleType"
:enumData="dict.roleType"
placeholder="请选择角色"
/>
<Field
label="大厅"
prop="salaId"
......@@ -40,13 +54,17 @@
:enumData="dict.deptId"
placeholder="请选择部门"
/>
<el-form-item label="是否允许巡查" prop="inspect">
<el-checkbox v-model="form.inspect">允许</el-checkbox>
</el-form-item>
<!-- <Field
label="工号"
prop="number"
v-model="form.number"
placeholder="请输入工号"
/> -->
<!-- <Field
label="负责窗口数量"
prop="windowCount"
......@@ -62,12 +80,18 @@
/> -->
</el-row>
<div style="background-color: rgba(242, 246, 252, 1);padding: 20px;">
<wintable :editId="editId" ref="wintable" :hallId="dict.hallId" class="wintabel" @selection-change="selectionChange"/>
<wintable
:editId="editId"
ref="wintable"
:hallId="dict.hallId"
class="wintabel"
:checkPeopleArr="checkPeopleArr"
@selection-change="selectionChange"
:staffList="dict.staffList"
/>
</div>
<div style="padding: 20px;">
<el-button type="primary" @click="submitForm" >提交</el-button>
<el-button type="primary" @click="submitForm">提交</el-button>
</div>
</el-form>
</el-drawer>
......@@ -80,18 +104,18 @@ export default {
name: "WindowOwnerDetail",
mixins: [form],
components: {
wintable
wintable,
},
created() {
this.changePath("window/owner");
this.getUser()
this.getUser();
},
data() {
return {
// 大厅
options:[],
options: [],
//窗口
tableData:[],
tableData: [],
// 遮罩层
loading: true,
// 弹出层标题
......@@ -103,45 +127,48 @@ export default {
toDate: [],
// 表单校验
rules: {
name: [
{ required: true, message: "请输入姓名", trigger: "blur" },
{ max: 20, message: "最多只能录入20个字符", trigger: "blur" },
]
staffId: [{ required: true, message: "请选择负责人", trigger: "blur" }],
},
userList:{},
userarr:[],//人员数组
checkArr:[],//选中窗口
editId:''//编辑id
userList: {},
userarr: [], //人员数组
checkArr: [], //选中窗口
checkPeopleArr: [], //选中窗口
editId: "", //编辑id
};
},
methods: {
//重写表单
beforeSubmit(data){
data['deptName'] = this.dict.deptId[data.deptId]
data['salaName'] = this.dict.salaId[data.salaId]
data['staffName'] = this.userList[data.staffId]
beforeSubmit(data) {
data["deptName"] = this.dict.deptId[data.deptId];
data["salaName"] = this.dict.salaId[data.salaId];
data["staffName"] = this.userList[data.staffId];
try {
const userObj = this.userarr.find(v=>v.id == data.staffId) //工号
data['number'] = userObj.workNum
const userObj = this.userarr.find((v) => v.id == data.staffId); //工号
data["number"] = userObj.workNum;
// 窗口列表
const checkArr = []
this.checkArr.forEach(v=>{
const checkArr = [];
this.checkArr.forEach((v) => {
checkArr.push({
windowId:v.id,
windowName:v.name,
windowCode:v.fromnum,
building:v.building,
level:v.level
})
})
data['windowOwnerDetailList'] = checkArr
windowId: v.id,
windowName: v.name,
windowCode: v.fromnum,
building: v.building,
level: v.level,
});
});
data["windowOwnerDetailList"] = checkArr;
} catch (error) {}
return data
let arr = Array.from(new Set(this.$refs.wintable.checkAllList));
console.log(this.checkAllList);
data.staffIdList = arr ? arr : [];
return data;
},
// 选中窗口
selectionChange(v){
this.checkArr = v
selectionChange(v) {
// this.checkArr = v;
// this.checkPeopleArr = v;
console.log(v, "vvvvvv");
},
cascaderChange(val) {
if (this.deptList.length > 0) {
......@@ -152,35 +179,33 @@ export default {
console.log(this.form.deptId, "当前选择");
},
// 查询人员
getUser(){
this.$post("/staff/list",{page:1,size:-1}).then(res=>{
const {code,data} = res
if(code == 1){
this.userarr = data.data
const arr = {}
data.data.forEach(element => {
arr[element.id] = element.name
getUser() {
this.$post("/staff/list", { page: 1, size: -1 }).then((res) => {
const { code, data } = res;
if (code == 1) {
this.userarr = data.data;
const arr = {};
data.data.forEach((element) => {
arr[element.id] = element.name;
});
this.userList = arr
this.userList = arr;
}
})
},
onSubmitSearch(){
});
},
/** 编辑 */
edit(row) {
this.editId = row.staffId
this.editId = row.staffId;
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "window/owner/edit";
this.getData();
this.checkPeopleArr = row.staffIdList;
this.pageInfo.type = "edit";
this.title = "修改窗口负责人";
},
/** 新增 */
add(row) {
this.editId = ''
this.editId = "";
this.reset();
this.urls.currUrl = "window/owner/add";
this.getData();
......@@ -189,7 +214,7 @@ export default {
},
/** 查看*/
view(row) {
this.editId = row.staffId
this.editId = row.staffId;
this.reset();
this.query = { id: row.id };
this.urls.currUrl = "window/owner/view";
......@@ -233,7 +258,7 @@ export default {
};
</script>
<style lang="less">
.wintabel .table-body{
.wintabel .table-body {
height: 500px;
overflow-y: auto;
}
......
......@@ -36,6 +36,24 @@ export default {
config: {
isshowTabPane: true,
search: [
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
{
name: "roleType",
type: "select",
label: "角色",
fuzzy: false,
},
{
name: "staffName",
type: "text",
......@@ -56,8 +74,8 @@ export default {
{ label: "电话号码", prop: "phone" },
{
label: "负责窗口数量",
prop: "windowCount",
label: "关联人数",
prop: "staffCount",
formatter: this.formatter,
},
......
<template>
<LayoutTable :toggleRowSelection="toggleRowSelection" ref="LayoutTable" :data="tableData" :config="tableConfig" @selection-change="handleSelectionChange">
<div slot="table-head-left"><div>请选择窗口</div></div>
<div slot="table-head-center"></div>
</LayoutTable>
<div>
<div class="search_box">
<SearchForm
:search="config.search"
:page="baseInfo.current_page"
@getData="onSubmit"
ref="search"
/>
</div>
<el-table
ref="multipleTable"
:data="baseInfo.data ? baseInfo.data : []"
tooltip-effect="dark"
style="width: 100%"
@select="handleSelectionChange"
@select-all="handleAllChange"
>
<el-table-column
v-for="(val, i) in config.columns"
:key="i"
:type="val.type"
:width="val.width"
:label="val.label"
:prop="val.prop"
:formatter="val.formatter"
:align="val.align ? val.align : 'center'"
>
</el-table-column>
</el-table>
<el-pagination
@current-change="handleCurrentChange"
:current-page.sync="baseInfo.current_page"
layout="total, prev, pager, next"
:total="baseInfo.total"
style="margin-top: 10px;width: 100%;text-align: end;"
>
</el-pagination>
</div>
</template>
<script>
import table from "@/assets/mixins/table";
import SearchForm from "@/components/SearchFormDrawer.vue";
export default {
props:['hallId','checkId','editId'],
mixins: [table],
methods:{
handleSelectionChange(v){
this.$emit("selection-change",v)
},
beforeFecth(){
this.pageInfo.list = '/window/owner/subWindowList'
},
//重写
afterRender(info){
const {data} = info
if(this.editId){
// 编辑的时候回显
const toggleRowSelection = []
data.forEach(element => {
if(element.selected == 1){
toggleRowSelection.push(element)
}
});
setTimeout(()=>{
this.toggleRowSelection = toggleRowSelection
})
components: { SearchForm },
props: ["hallId", "checkId", "editId", "checkPeopleArr", "staffList"],
methods: {
handleSelectionChange(selecteds, row) {
if (!this.checkAllList.includes(row.id)) {
// 回显数据里没有本条,把这条加进来(选中)
this.checkAllList.push(row.id);
} else {
// 回显数据里有本条,把这条删除(取消选中)
this.checkAllList.forEach((id, index) => {
if (id === row.id) {
this.checkAllList = this.checkAllList.filter((v) => id !== v);
}
});
this.checkPeopleArr.forEach((id) => {
if (id == row.id) {
this.checkPeopleArr = this.checkPeopleArr.filter((v) => id !== v);
}
});
}
let arr = Array.from(new Set(this.checkAllList));
this.checkAllList = arr;
console.log(this.checkAllList);
},
// 全选、取消全选
handleAllChange(selecteds) {
selecteds = selecteds.filter((v) => (v ? v : ""));
console.log(selecteds);
if (selecteds.length > 0) {
selecteds.forEach((item) => {
if (!this.checkAllList.includes(item.id)) {
this.checkAllList.push(item.id);
}
});
let arr = Array.from(new Set(this.checkAllList));
this.checkAllList = arr;
} else {
this.baseInfo.data.forEach((item) => {
this.checkAllList.forEach((id, index) => {
if (id === item.id) {
this.checkAllList.splice(index, 1);
}
});
});
let arr = Array.from(new Set(this.checkAllList));
this.checkAllList = arr;
this.baseInfo.data.forEach((item) => {
this.checkPeopleArr.forEach((id, index) => {
if (id === item.id) {
this.checkPeopleArr.splice(index, 1);
}
}
});
});
}
},
created(){
this.config.search[0].enumData = this.hallId
console.log(this.editId,"editId")
handleCurrentChange(val) {
this.baseInfo.current_page = val;
this.$refs.search.onSubmit();
},
watch: {
editId:{
handler:function(v){
if(v){
this.query = {staffId:v}
}else{
this.query = {}
}
this.getData()
},
immediate:true
}
onSubmit(val) {
this.baseInfo = val;
this.checkAllList = [...this.checkAllList, ...this.checkPeopleArr];
if (this.staffList && this.staffList.length) {
this.$nextTick(() => {
this.staffList
? this.staffList.forEach((v) => {
this.checkAllList.forEach((val, i) => {
if (v.id == val) {
this.checkAllList[i] = v.id;
}
});
})
: "";
this.baseInfo.data
? this.checkAllList.forEach((key) => {
this.$refs.multipleTable.toggleRowSelection(
this.baseInfo.data.find((row) => {
if (row.id == key) {
return row;
}
}),
true
);
})
: "";
});
}
},
data(){
return {
toggleRowSelection:[],
config: {
downloadUrl:"",
isshowTabPane: false,
search: [
{
name: "hallId",
type: "select",
label: "大厅",
enumData:{}
},
{
name: "deptName",
type: "text",
label: "窗口名称",
fuzzy: true,
},
],
columns: [
{ type: "selection", width: 60 },
// { type: "index", label: "序号", width: 50 },
},
created() {
this.config.search[0].enumData = this.hallId;
},
mounted() {},
watch: {},
data() {
return {
checkAllList: [],
checkList: [],
baseInfo: {},
total: 0,
currentPage: 1,
toggleRowSelection: [],
config: {
downloadUrl: "",
isshowTabPane: false,
search: [
{
name: "salaId",
type: "selectSalaId",
label: "大厅",
fuzzy: false,
},
{
name: "deptId",
type: "selectDeptId",
label: "部门",
fuzzy: false,
},
{
name: "name",
type: "text",
label: "工作人员姓名",
fuzzy: true,
},
],
columns: [
{ type: "selection", width: 60 },
{
label: "序号",
width: 50,
formatter: (row, column, cellValue, index) => {
return index + 1;
},
},
{ label: "窗口名称", prop: "name" },
{ label: "工作人员姓名", prop: "name" },
{ label: "编号", prop: "fromnum" },
{ label: "工号", prop: "workNum" },
{ label: "所属楼栋", prop: "building" },
{ label: "手机号码", prop: "phoneNumber" },
{ label: "所属楼层", prop: "level" },
// {
// label: "操作",
// width: 240,
// formatter: (row) => {
// return (
// <table-buttons
// noAdd
// row={row}
// onEdit={this.toEdit}
// onView={this.toView}
// onDel={this.toDel}
// />
// );
// },
// },
],
},
}
},
}
</script>
\ No newline at end of file
{ label: "所属大厅", prop: "salaName" },
{ label: "所属部门", prop: "deptName" },
// {
// label: "操作",
// width: 100,
// formatter: (row) => {
// if (row.check) {
// return <span style="cursor:pointer;color:#ff0000">已选中</span>;
// } else {
// return <span style="cursor:pointer;color:#1890ff">选择</span>;
// }
// },
// },
],
},
};
},
};
</script>
......@@ -108,14 +108,14 @@ export default {
name: "ownerName",
type: "text",
width: 200,
label: "窗口负责人姓名搜索",
label: "窗口首席代表’姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "窗口负责人", prop: "ownerName" },
{ label: "窗口首席代表’", prop: "ownerName" },
{
label: "登记年月",
......
......@@ -106,14 +106,14 @@ export default {
name: "ownerName",
type: "text",
width: 200,
label: "窗口负责人姓名搜索",
label: "窗口首席代表’姓名搜索",
fuzzy: false,
},
],
columns: [
{ type: "selection", width: 60 },
{ type: "index", label: "序号", width: 50 },
{ label: "窗口负责人", prop: "ownerName" },
{ label: "窗口首席代表’", prop: "ownerName" },
{
label: "登记年月",
......
......@@ -8,8 +8,8 @@ module.exports = {
hot: true, //自动保存
proxy: {
"/attendance": {
// target: 'http://192.168.0.98:11039',
target: "http://112.19.80.237:11039",
target: 'http://192.168.0.98:11039',
// target: "http://112.19.80.237:11039",
// target: 'http://localhost:17500',
// target: "http://118.122.189.109:11039",
// target: 'http://10.102.252.13:11039',
......
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