|
@@ -16,8 +16,9 @@
|
|
|
>
|
|
|
<el-form-item label="人员类别:">
|
|
|
<el-select
|
|
|
- v-model="form.personnelCategoryIndex"
|
|
|
+ v-model="personnelCategoryIndex"
|
|
|
placeholder="请选择"
|
|
|
+ disabled
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in personnelCategory"
|
|
@@ -40,12 +41,13 @@
|
|
|
v-model="form.staff_list"
|
|
|
multiple
|
|
|
placeholder="请选择"
|
|
|
+ value-key="id"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in peopleArr"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
- :value="item.id"
|
|
|
+ :value="item"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -58,7 +60,7 @@
|
|
|
>
|
|
|
</el-date-picker> 至
|
|
|
<el-date-picker
|
|
|
- v-model="form.duty_time.start_time"
|
|
|
+ v-model="form.duty_time.stop_time"
|
|
|
type="datetime"
|
|
|
placeholder="选择日期时间"
|
|
|
>
|
|
@@ -97,6 +99,9 @@
|
|
|
import api from "@/api/infoConfig/api";
|
|
|
export default {
|
|
|
props: {
|
|
|
+ itemInfo: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
update: {
|
|
|
type: Function,
|
|
|
},
|
|
@@ -106,8 +111,7 @@ export default {
|
|
|
value: "",
|
|
|
dialogVisible: false,
|
|
|
form: {
|
|
|
- name: "",
|
|
|
- personnel_type: "",
|
|
|
+ personnel_type: "1",
|
|
|
responsibility_range: "",
|
|
|
staff_list: [],
|
|
|
duty_time: {
|
|
@@ -116,19 +120,11 @@ export default {
|
|
|
},
|
|
|
remark: "",
|
|
|
},
|
|
|
-
|
|
|
+ personnelCategoryIndex: "1",
|
|
|
personnelCategory: [
|
|
|
{
|
|
|
value: "1",
|
|
|
- label: "保洁",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "前台",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "3",
|
|
|
- label: "安防",
|
|
|
+ label: "驻地物业",
|
|
|
},
|
|
|
],
|
|
|
peopleArr: [],
|
|
@@ -140,14 +136,66 @@ export default {
|
|
|
methods: {
|
|
|
getPersonList() {
|
|
|
api
|
|
|
- .getPersonList()
|
|
|
+ .getPersonList({ type_id: 1 })
|
|
|
.then((result) => {
|
|
|
+ // "access": null,
|
|
|
+ // "account": null,
|
|
|
+ // "address": null,
|
|
|
+ // "car_number": null,
|
|
|
+ // "card_number": null,
|
|
|
+ // "company_id": null,
|
|
|
+ // "company_name": null,
|
|
|
+ // "create_time": null,
|
|
|
+ // "dept_id": null,
|
|
|
+ // "dept_name": null,
|
|
|
+ // "duty": null,
|
|
|
+ // "email": null,
|
|
|
+ // "floor": null,
|
|
|
+ // "function_type": null,
|
|
|
+ // "hiredate": null,
|
|
|
+ // "hr_number": null,
|
|
|
+ // "id": 3,
|
|
|
+ // "id_card": null,
|
|
|
+ // "impower_time": null,
|
|
|
+ // "in_out": null,
|
|
|
+ // "is_del": 0,
|
|
|
+ // "issue_status": null,
|
|
|
+ // "name": "\u5f20\u707f",
|
|
|
+ // "operate_status": null,
|
|
|
+ // "phone": "010-68799999-6688",
|
|
|
+ // "physics_card": null,
|
|
|
+ // "role": null,
|
|
|
+ // "room_number": null,
|
|
|
+ // "site_number": "0399",
|
|
|
+ // "status": 0,
|
|
|
+ // "type": 1,
|
|
|
+ // "update_time": null,
|
|
|
+ // "work_address": null,
|
|
|
+ // "zy_number": null
|
|
|
this.peopleArr = result.data.data;
|
|
|
})
|
|
|
.catch((err) => {});
|
|
|
},
|
|
|
sure() {
|
|
|
let that = this;
|
|
|
+ let form = JSON.parse(JSON.stringify(this.form));
|
|
|
+ form.duty_time.start_time = this.$dayjs(form.duty_time.start_time).format(
|
|
|
+ "YYYY-MM-DD HH:mm:ss"
|
|
|
+ );
|
|
|
+ form.duty_time.stop_time = this.$dayjs(form.duty_time.stop_time).format(
|
|
|
+ "YYYY-MM-DD HH:mm:ss"
|
|
|
+ );
|
|
|
+ form.duty_time = JSON.stringify(form.duty_time);
|
|
|
+ form.staff_list = JSON.stringify(
|
|
|
+ form.staff_list.map(function (item) {
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ details: item,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
+ form.id = this.itemInfo.data.id;
|
|
|
+ // console.log(form);
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: "新建中,请稍后!",
|
|
@@ -155,15 +203,15 @@ export default {
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
customClass: "systemConfigLoading",
|
|
|
});
|
|
|
- setTimeout(() => {
|
|
|
- loading.close();
|
|
|
- this.update();
|
|
|
- this.$message.success("添加成功!");
|
|
|
- this.dialogVisible = false;
|
|
|
- }, 1000);
|
|
|
- return;
|
|
|
+ // setTimeout(() => {
|
|
|
+ // loading.close();
|
|
|
+ // this.update();
|
|
|
+ // this.$message.success("添加成功!");
|
|
|
+ // this.dialogVisible = false;
|
|
|
+ // }, 1000);
|
|
|
+ // return;
|
|
|
api
|
|
|
- .updateSecurityInfoConfiguration(this.form)
|
|
|
+ .addPerson(form)
|
|
|
.then((result) => {
|
|
|
loading.close();
|
|
|
if (result.data.code == 0) {
|
|
@@ -179,8 +227,8 @@ export default {
|
|
|
});
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
- loading.close();
|
|
|
- that.dialogVisible = true;
|
|
|
+ // loading.close();
|
|
|
+ // that.dialogVisible = true;
|
|
|
// }, 2000);
|
|
|
},
|
|
|
close() {
|