|
@@ -22,7 +22,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 循环分组 -->
|
|
|
- <el-col :span="24" style="padding-right: 0;" v-loading="rule_trees_load">
|
|
|
+ <el-col :span="24" class="grouping" v-loading="rule_trees_load">
|
|
|
<el-menu class="rule_name" :unique-opened="true">
|
|
|
<el-submenu :index="index.toString()" v-for="(item,index) in rule_list" :key="index">
|
|
|
<template slot="title">
|
|
@@ -51,79 +51,89 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="terr-right border-right flex-1" v-loading="table_loading">
|
|
|
- <el-col :span="24" v-show="(rule_list.length == 0||item_list.length == 0)" style="text-align: center;margin: 0 auto;position: relative;top: 30%;">
|
|
|
- <p><img src="@/assets/image/nodata_default.png" width="200px" alt=""></p>
|
|
|
+ <el-col
|
|
|
+ :span="24"
|
|
|
+ v-show="(rule_list.length == 0||item_list.length == 0)"
|
|
|
+ style="text-align: center;margin: 0 auto;position: relative;top: 30%;"
|
|
|
+ >
|
|
|
+ <p>
|
|
|
+ <img src="@/assets/image/nodata_default.png" width="200px" alt />
|
|
|
+ </p>
|
|
|
<p style="color: #909399;">还没有分类和规则</p>
|
|
|
- <p style="color: #909399;">先<span style="color: #26A2FF;" @click="add_grouping()">【添加分类】</span>,再<span style="color: #26A2FF;" @click="add_rules_detail">添加规则</span></p>
|
|
|
+ <p style="color: #909399;">
|
|
|
+ 先
|
|
|
+ <span style="color: #26A2FF;" @click="add_grouping()">【添加分类】</span>,再
|
|
|
+ <span style="color: #26A2FF;" @click="add_rules_detail">添加规则</span>
|
|
|
+ </p>
|
|
|
</el-col>
|
|
|
<el-col v-if="item_list.length != 0">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" style="font-size:20px;color:#303133;line-height:36px;">
|
|
|
- {{right_rules_detail.remark}}
|
|
|
- <span style="padding-left: 10px;">{{right_rules_detail.min_point}}B分</span>
|
|
|
- <el-button
|
|
|
- plain
|
|
|
- style="padding:10px 12px; margin-left: 10px;"
|
|
|
- @click="edit_rules(item_info)"
|
|
|
- >编辑</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="flex-box btns flex-v-ce">
|
|
|
- <el-button size="small" @click="del_item" type="danger" plain>批量移除</el-button>
|
|
|
- <el-button size="small" type="primary" @click="add_employee_show= true">添加人员</el-button>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="table_list"
|
|
|
- v-loading="table_loading"
|
|
|
- tooltip-effect="dark"
|
|
|
- style="width: 100%;margin-top:20px;"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="45"></el-table-column>
|
|
|
- <el-table-column label="姓名">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="display:flex">
|
|
|
- <span class="fl">
|
|
|
- <userImage
|
|
|
- :id="scope.row.employee_id"
|
|
|
- width="50px"
|
|
|
- height="50px"
|
|
|
- :user_name="scope.row.employee.name"
|
|
|
- :img_url="scope.row.employee.img_url"
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" style="font-size:20px;color:#303133;line-height:36px;">
|
|
|
+ {{right_rules_detail.remark}}
|
|
|
+ <span
|
|
|
+ style="padding-left: 10px;"
|
|
|
+ >{{right_rules_detail.min_point}}B分</span>
|
|
|
+ <el-button
|
|
|
+ plain
|
|
|
+ style="padding:10px 12px; margin-left: 10px;"
|
|
|
+ @click="edit_rules(item_info)"
|
|
|
+ >编辑</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="flex-box btns flex-v-ce">
|
|
|
+ <el-button size="medium" @click="del_item" type="danger" plain>批量移除</el-button>
|
|
|
+ <el-button type="primary" @click="add_employee_show= true">添加人员</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="table_list"
|
|
|
+ v-loading="table_loading"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%;margin-top:20px;"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="45"></el-table-column>
|
|
|
+ <el-table-column label="姓名">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="display:flex">
|
|
|
+ <span class="fl">
|
|
|
+ <userImage
|
|
|
+ :id="scope.row.employee_id"
|
|
|
+ width="50px"
|
|
|
+ height="50px"
|
|
|
+ :user_name="scope.row.employee.name"
|
|
|
+ :img_url="scope.row.employee.img_url"
|
|
|
+ v-if="scope.row.employee"
|
|
|
+ ></userImage>
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ style="margin-left: 10px; line-height: 50px; display: inline-block"
|
|
|
v-if="scope.row.employee"
|
|
|
- ></userImage>
|
|
|
- </span>
|
|
|
- <span
|
|
|
- style="margin-left: 10px; line-height: 50px; display: inline-block"
|
|
|
- v-if="scope.row.employee"
|
|
|
- >{{scope.row.employee.name}}</span>
|
|
|
- </div>
|
|
|
+ >{{scope.row.employee.name}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="cycle_remark" label="加分周期"></el-table-column>
|
|
|
+ <template slot="empty">
|
|
|
+ <noData></noData>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="cycle_remark" label="加分周期"></el-table-column>
|
|
|
- <template slot="empty">
|
|
|
- <noData></noData>
|
|
|
- </template>
|
|
|
- </el-table>
|
|
|
+ </el-table>
|
|
|
|
|
|
- <!-- 分页 -->
|
|
|
- <div style=" text-align: center; padding: 20px;">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="total, prev, pager, next"
|
|
|
- :current-page="page"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :page-size.sync="pagesize"
|
|
|
- :hide-on-single-page="true"
|
|
|
- :total="total"
|
|
|
- ></el-pagination>
|
|
|
- </div>
|
|
|
-
|
|
|
+ <!-- 分页 -->
|
|
|
+ <div style=" text-align: center; padding: 20px;">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :current-page="page"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :page-size.sync="pagesize"
|
|
|
+ :hide-on-single-page="true"
|
|
|
+ :total="total"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- 可写公共组建: -->
|
|
|
<!-- 新增加分组弹出框 -->
|
|
|
<el-dialog
|
|
@@ -148,6 +158,8 @@
|
|
|
<el-input
|
|
|
type="age"
|
|
|
v-model="numberValidateForm.name"
|
|
|
+
|
|
|
+ @keydown.enter.native="submitForm('numberValidateForm')"
|
|
|
autocomplete="off"
|
|
|
placeholder="请输入分组名称"
|
|
|
></el-input>
|
|
@@ -229,7 +241,7 @@
|
|
|
style="float:left"
|
|
|
:disabled="disabled"
|
|
|
>删除</el-button>
|
|
|
-
|
|
|
+
|
|
|
<el-button
|
|
|
v-if="rules_detail_title"
|
|
|
class="fr"
|
|
@@ -275,8 +287,7 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <div
|
|
|
- v-loading="staff_loading">
|
|
|
+ <div v-loading="staff_loading">
|
|
|
<EmployeeSelector1
|
|
|
:max="add_employee_max"
|
|
|
:can_select_dept="false"
|
|
@@ -301,11 +312,11 @@
|
|
|
|
|
|
<script>
|
|
|
import EmployeeSelector1 from "@/components/EmployeeSelector";
|
|
|
-import noData from '@/components/noData';
|
|
|
+import noData from "@/components/noData";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- jieguoId:"",
|
|
|
+ jieguoId: "",
|
|
|
table_list: [],
|
|
|
tips_show: false,
|
|
|
item_info: {},
|
|
@@ -325,9 +336,9 @@ export default {
|
|
|
del_arr: {
|
|
|
ids: [],
|
|
|
},
|
|
|
- page: 1,//默认页数 为1
|
|
|
- total: 0,//返回的总数据
|
|
|
- pagesize: 10,//每页显示的数据
|
|
|
+ page: 1, //默认页数 为1
|
|
|
+ total: 0, //返回的总数据
|
|
|
+ pagesize: 10, //每页显示的数据
|
|
|
table_loading: false,
|
|
|
staff_loading: false,
|
|
|
|
|
@@ -414,11 +425,11 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
EmployeeSelector1,
|
|
|
- noData
|
|
|
+ noData,
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
- if (localStorage.getItem("voluntarilyPoint")) {
|
|
|
+ if (localStorage.getItem("framework")) {
|
|
|
this.tips_show = false;
|
|
|
} else {
|
|
|
this.tips_show = true;
|
|
@@ -448,7 +459,6 @@ export default {
|
|
|
// 添加成员点击完成
|
|
|
sub_add_employee(form) {
|
|
|
let self = this;
|
|
|
- self.staff_loading = true;
|
|
|
if (!self.task_cycle_name) {
|
|
|
self.$message.error("请选择加分周期");
|
|
|
return false;
|
|
@@ -470,6 +480,7 @@ export default {
|
|
|
self.$message.error("请先选择细则");
|
|
|
} else {
|
|
|
this.disabled = true;
|
|
|
+ self.staff_loading = true;
|
|
|
self
|
|
|
.$axios({
|
|
|
url: "/api/integral/auto/add",
|
|
@@ -479,7 +490,7 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.disabled = false;
|
|
|
self.table_loading = false;
|
|
|
- self.staff_loading = false;
|
|
|
+ self.staff_loading = false;
|
|
|
if (res.data.code == 1) {
|
|
|
self.add_employee_show = false;
|
|
|
self.$message.success(
|
|
@@ -492,11 +503,10 @@ export default {
|
|
|
"条"
|
|
|
);
|
|
|
// self.err_open_right();
|
|
|
-
|
|
|
+
|
|
|
// self.open_right();
|
|
|
-
|
|
|
-
|
|
|
- self.get_role_lists()
|
|
|
+
|
|
|
+ self.get_role_lists();
|
|
|
} else {
|
|
|
self.$message.error(res.data.msg);
|
|
|
}
|
|
@@ -513,7 +523,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
|
|
|
editDetails() {},
|
|
|
handleSelectionChange(val) {
|
|
@@ -549,7 +558,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
- // self.$message.error(e.data.msg);
|
|
|
+ // self.$message.error(e.data.msg);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
self.loading = false;
|
|
@@ -564,7 +573,7 @@ export default {
|
|
|
import_rules_show() {},
|
|
|
// 关闭提示语
|
|
|
tips_close() {
|
|
|
- localStorage.setItem("voluntarilyPoint", "true");
|
|
|
+ localStorage.setItem("framework", "true");
|
|
|
this.tips_show = false;
|
|
|
},
|
|
|
//新增规则
|
|
@@ -573,7 +582,6 @@ export default {
|
|
|
this.rules_detail_title = false;
|
|
|
},
|
|
|
|
|
|
-
|
|
|
editRule(form) {
|
|
|
let self = this;
|
|
|
let data = null;
|
|
@@ -614,7 +622,7 @@ export default {
|
|
|
self.jieguoId = res.data.data.item_id;
|
|
|
// self.add_employee_id = res.data.data.item_id;
|
|
|
self.add_rulse_id = self.rules_detail_form.rule_id;
|
|
|
- self.get_role_lists()
|
|
|
+ self.get_role_lists();
|
|
|
if (this.rules_detail_title == false) {
|
|
|
setTimeout(() => {
|
|
|
self.add_employee_show = true;
|
|
@@ -702,6 +710,44 @@ export default {
|
|
|
this.rules_detail_show = false;
|
|
|
this.$refs[form].resetFields();
|
|
|
},
|
|
|
+ //第一次添加
|
|
|
+ // err_open_right() {
|
|
|
+ // let self = this;
|
|
|
+ // self.table_loading = true;
|
|
|
+ // self.item_id = self.jieguoId
|
|
|
+ // self.add_rulse_id = data.rule_id;
|
|
|
+ // self.right_rules_detail = data;
|
|
|
+ // // if (data || self.add_employee_id!="") {
|
|
|
+ // // self.add_employee_id = data.id;
|
|
|
+ // // self.add_rulse_id = data.rule_id;
|
|
|
+ // // self.right_rules_detail = data;
|
|
|
+ // // }
|
|
|
+ // // else{
|
|
|
+ // // self.add_employee_id = self.jieguoId
|
|
|
+ // // }
|
|
|
+ // var params = {
|
|
|
+ // params: {
|
|
|
+ // item_id: self.item_id,
|
|
|
+ // employee_id: self.employee_id || "",
|
|
|
+ // page: self.page,
|
|
|
+ // page_size:Number(this.pagesize)
|
|
|
+ // },
|
|
|
+ // };
|
|
|
+ // self.$axios
|
|
|
+ // .get("/api/integral/auto/list", params)
|
|
|
+ // .then((res) => {
|
|
|
+ // self.table_loading = false;
|
|
|
+ // if (res.data.code == 1) {
|
|
|
+ // self.table_list = res.data.data.list || [];
|
|
|
+ // self.total = res.data.data.total;
|
|
|
+ // } else {
|
|
|
+ // self.$message.error(res.data.msg);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .finally(() => {
|
|
|
+ // self.table_loading = false;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
open_right(data) {
|
|
|
let self = this;
|
|
|
self.table_loading = true;
|
|
@@ -711,12 +757,20 @@ export default {
|
|
|
self.add_rulse_id = data.rule_id;
|
|
|
self.right_rules_detail = data;
|
|
|
}
|
|
|
+ // if (data || self.add_employee_id!="") {
|
|
|
+ // self.add_employee_id = data.id;
|
|
|
+ // self.add_rulse_id = data.rule_id;
|
|
|
+ // self.right_rules_detail = data;
|
|
|
+ // }
|
|
|
+ // else{
|
|
|
+ // self.add_employee_id = self.jieguoId
|
|
|
+ // }
|
|
|
var params = {
|
|
|
params: {
|
|
|
item_id: self.add_employee_id || "",
|
|
|
employee_id: self.employee_id || "",
|
|
|
page: self.page,
|
|
|
- page_size:Number(this.pagesize)
|
|
|
+ page_size: Number(this.pagesize),
|
|
|
},
|
|
|
};
|
|
|
self.$axios
|
|
@@ -865,7 +919,7 @@ export default {
|
|
|
},
|
|
|
// 获取分组
|
|
|
get_role_lists() {
|
|
|
- this.table_loading = true
|
|
|
+ this.table_loading = true;
|
|
|
this.rule_trees_load = true;
|
|
|
this.$axios
|
|
|
.get("/api/integral/rule/trees", {
|
|
@@ -890,7 +944,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.table_loading = false;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -962,4 +1016,37 @@ export default {
|
|
|
display: block;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+.grouping{
|
|
|
+ height:815.4px;
|
|
|
+ overflow-y: hidden;
|
|
|
+ padding-right: 4.2px;
|
|
|
+}
|
|
|
+.grouping:hover{
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ padding-right: 0px;
|
|
|
+}
|
|
|
+//修改滚动条样式
|
|
|
+.grouping::-webkit-scrollbar{
|
|
|
+ width:4px;
|
|
|
+ height:10px;
|
|
|
+ /**/
|
|
|
+}
|
|
|
+.grouping::-webkit-scrollbar-track{
|
|
|
+ background: rgb(239, 239, 239);
|
|
|
+ border-radius:2px;
|
|
|
+}
|
|
|
+.grouping::-webkit-scrollbar-thumb{
|
|
|
+ background: #bfbfbf;
|
|
|
+ border-radius:10px;
|
|
|
+}
|
|
|
+.grouping::-webkit-scrollbar-thumb:hover{
|
|
|
+ background: #333;
|
|
|
+}
|
|
|
+.grouping::-webkit-scrollbar-corner{
|
|
|
+ background: #179a16;
|
|
|
+}
|
|
|
</style>
|