From 236a0a1445692152d4d66d4f501e9b530f1ff822 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 16 Jan 2024 08:58:40 +0800
Subject: [PATCH] 派遣单位地图选点、派遣记录导入
---
src/views/dispatch/dispatch.vue | 97 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 78 insertions(+), 19 deletions(-)
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index 467f240..122e26f 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -10,11 +10,13 @@
<span v-if="typeTABS.prop === 'tab1'"> -->
<avue-crud
class="tablesss"
+ v-model="form"
:option="option"
:data="data"
:page.sync="page"
ref="crudrec"
:permission="permissionList"
+ :before-open="beforeOpen"
@on-load="onLoad"
:table-loading="loading"
@row-save="rowSave"
@@ -110,6 +112,7 @@
import { mapGetters } from "vuex";
import { mapState } from "vuex";
import { getToken } from "@/util/auth";
+import {getDetail} from "@/api/check/postFiling";
export default {
name:"dispatchList",
data() {
@@ -207,6 +210,7 @@
}
]
},
+ form:{},
option: {
tip: false,
index: true,
@@ -237,6 +241,30 @@
]
},
{
+ label: "企业名称",
+ prop: "deptId",
+ type: "tree",
+ overHidden: true,
+ dicUrl: "",
+ props: {
+ label: "title",
+ value: "id"
+ },
+ rules: [
+ {
+ required: true,
+ message: "请选择企业名称",
+ trigger: "click"
+ }
+ ],
+ labelWidth: 138,
+ width: 180,
+ searchLabelWidth: 80,
+ search: true,
+ searchSpan: 4
+ },
+
+ {
label: "派遣单位类型",
prop: "district",
type: "select",
@@ -262,28 +290,37 @@
dataType: "number"
},
{
- label: "企业名称",
- prop: "deptId",
- type: "tree",
- overHidden: true,
- dicUrl: "",
+ label: "派遣单位行业",
+ prop: "profession",
+ type: "select",
+ search: false,
+ dicUrl:
+ "/api/blade-system/dict-biz/dictionary?code=dispatchProfession",
props: {
- label: "title",
- value: "id"
+ label: "dictValue",
+ value: "dictKey"
},
+ searchLabelWidth: 110,
+ overHidden: true,
+ searchSpan: 4,
+ width: 100,
+ labelWidth: 138,
rules: [
{
required: true,
- message: "请选择企业名称",
+ message: "请选择派遣单位行业",
trigger: "click"
}
],
- labelWidth: 138,
- width: 180,
- searchLabelWidth: 80,
- search: true,
- searchSpan: 4
+ dataType: "number"
},
+ {
+ label: " 派遣单位地址",
+ prop: "address",
+ labelWidth: 138,
+ span:24,
+ },
+
{
label: "保安服务类型",
prop: "serveType",
@@ -369,11 +406,6 @@
trigger: "click"
}
]
- },
- {
- label: " 派遣单位地址",
- prop: "address",
- labelWidth: 138
},
{
label: "合同开始时间",
@@ -470,7 +502,24 @@
trigger: "click"
}
]
- }
+ },
+ {
+ label:"地图选点",
+ labelWidth: 138,
+ width: 110,
+ prop:"mapAddress",
+ type: "map",
+ span:24,
+ hide:true,
+ value:[112.85857823133,35.496284586473,""],
+ rules: [
+ {
+ required: false,
+ message: "请选择点位",
+ trigger: "blur"
+ }
+ ]
+ },
]
},
@@ -549,6 +598,12 @@
},
methods: {
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ this.form['mapAddress'] = [this.form.longitude,this.form.latitude,this.form.address]
+ }
+ done();
+ },
handleChangeTABS(column) {
this.typeTABS = column;
if (column.prop == "tab1") {
@@ -578,6 +633,8 @@
if (this.useifid != 266) {
form["deptId"] = this.useifid;
}
+ form.longitude =form.mapAddress[0]
+ form.latitude = form.mapAddress[1]
adddata(form).then(
res => {
this.onLoad(this.page);
@@ -608,6 +665,8 @@
if (this.useifid != 266) {
row["deptId"] = this.useifid;
}
+ row.longitude = this.form.mapAddress[0]
+ row.latitude = this.form.mapAddress[1]
update(row).then(
() => {
this.onLoad(this.page);
--
Gitblit v1.9.3