|
@@ -41,9 +41,7 @@
|
|
|
@click="handleQuery"
|
|
|
>搜索</el-button
|
|
|
> -->
|
|
|
- <el-button size="btr" @click="resetQuery"
|
|
|
- >重置</el-button
|
|
|
- >
|
|
|
+ <el-button size="btr" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -274,12 +272,13 @@ import {
|
|
|
addBdglVisit,
|
|
|
updateBdglVisit,
|
|
|
exportBdglVisit,
|
|
|
- deptUser,
|
|
|
+ deptUser
|
|
|
} from "@/api/doormanManage/bdglVisit";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
|
|
|
import { allUser } from "@/api/workingArrangements/workTask";
|
|
|
+import Cookies from "js-cookie";
|
|
|
|
|
|
export default {
|
|
|
name: "BdglVisit",
|
|
@@ -322,40 +321,44 @@ export default {
|
|
|
updatetime: null,
|
|
|
numberPlate: null,
|
|
|
unitName: null,
|
|
|
- peopleName: null,
|
|
|
+ peopleName: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
unitId: [
|
|
|
- { required: true, message: "到访单位不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "到访单位不能为空", trigger: "blur" }
|
|
|
],
|
|
|
// peopleId: [{ required: true, message: "接待人不能为空", trigger: "blur" }],
|
|
|
name: [
|
|
|
- { required: true, message: "到访人员姓名不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "到访人员姓名不能为空", trigger: "blur" }
|
|
|
],
|
|
|
arriveTime: [
|
|
|
- { required: true, message: "到访时间不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "到访时间不能为空", trigger: "blur" }
|
|
|
],
|
|
|
endTime: [
|
|
|
- { required: true, message: "离队时间不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "离队时间不能为空", trigger: "blur" }
|
|
|
],
|
|
|
numberPlate: [
|
|
|
- { required: true, message: "到访车牌号不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
+ { required: true, message: "到访车牌号不能为空", trigger: "blur" }
|
|
|
+ ]
|
|
|
},
|
|
|
// 执行单位列表
|
|
|
users: [],
|
|
|
// 接待人
|
|
|
executor: [],
|
|
|
// 人员列表
|
|
|
- rylist: [],
|
|
|
+ rylist: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ if (Cookies.get("shuaxin") != "true") {
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ Cookies.set("shuaxin", "true");
|
|
|
this.getList();
|
|
|
- allUser().then((res) => {
|
|
|
+ allUser().then(res => {
|
|
|
this.rylist = res.rows;
|
|
|
});
|
|
|
this.selectPeo1();
|
|
@@ -370,7 +373,7 @@ export default {
|
|
|
"d+": date.getDate().toString(), // 日
|
|
|
"H+": date.getHours().toString(), // 时
|
|
|
"M+": date.getMinutes().toString(), // 分
|
|
|
- "S+": date.getSeconds().toString(), // 秒
|
|
|
+ "S+": date.getSeconds().toString() // 秒
|
|
|
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
|
|
};
|
|
|
for (let k in opt) {
|
|
@@ -400,7 +403,7 @@ export default {
|
|
|
// 获取执行人
|
|
|
getZhuChi(id) {
|
|
|
// console.log(id)
|
|
|
- deptUser(id).then((res) => {
|
|
|
+ deptUser(id).then(res => {
|
|
|
this.executor = res.data;
|
|
|
// console.log(this.executor)
|
|
|
// this.form.unitName=this.executor
|
|
@@ -420,7 +423,7 @@ export default {
|
|
|
// this.getDept2()
|
|
|
// this.handleAdd()
|
|
|
// 获取执行单位列表
|
|
|
- getDept2().then((res) => {
|
|
|
+ getDept2().then(res => {
|
|
|
// console.log(res,2)
|
|
|
this.users = res.data;
|
|
|
console.log(this.users);
|
|
@@ -434,7 +437,7 @@ export default {
|
|
|
/** 查询人员来访登记列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listBdglVisit(this.queryParams).then((response) => {
|
|
|
+ listBdglVisit(this.queryParams).then(response => {
|
|
|
// console.log(response)
|
|
|
this.bdglVisitList = response.rows;
|
|
|
console.log(this.bdglVisitList);
|
|
@@ -462,7 +465,7 @@ export default {
|
|
|
updatetime: null,
|
|
|
numberPlate: null,
|
|
|
unitName: null,
|
|
|
- peopleName: null,
|
|
|
+ peopleName: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -481,7 +484,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
+ this.ids = selection.map(item => item.id);
|
|
|
this.single = selection.length !== 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
@@ -491,7 +494,7 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "添加人员来访登记";
|
|
|
// 获取执行单位列表
|
|
|
- getDept2().then((res) => {
|
|
|
+ getDept2().then(res => {
|
|
|
// console.log(res,2)
|
|
|
this.users = res.data;
|
|
|
console.log(this.users);
|
|
@@ -500,7 +503,7 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- getDept2().then((res) => {
|
|
|
+ getDept2().then(res => {
|
|
|
// console.log(res)
|
|
|
// console.log(res,2)
|
|
|
this.users = res.data;
|
|
@@ -508,7 +511,7 @@ export default {
|
|
|
});
|
|
|
const id = row.id || this.ids;
|
|
|
// console.log(row)
|
|
|
- getBdglVisit(id).then((response) => {
|
|
|
+ getBdglVisit(id).then(response => {
|
|
|
console.log(response.data);
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
@@ -518,17 +521,17 @@ export default {
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
console.log(this.form);
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
console.log(this.form);
|
|
|
- updateBdglVisit(this.form).then((response) => {
|
|
|
+ updateBdglVisit(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addBdglVisit(this.form).then((response) => {
|
|
|
+ addBdglVisit(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -542,7 +545,7 @@ export default {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
.confirm("是否确认删除人员来访登记的数据项?")
|
|
|
- .then(function () {
|
|
|
+ .then(function() {
|
|
|
return delBdglVisit(ids);
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -560,13 +563,13 @@ export default {
|
|
|
this.exportLoading = true;
|
|
|
return exportBdglVisit(queryParams);
|
|
|
})
|
|
|
- .then((response) => {
|
|
|
+ .then(response => {
|
|
|
this.$download.name(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|