BUG 28264
This commit is contained in:
@@ -66,7 +66,8 @@
|
|||||||
fileName="网格区块"
|
fileName="网格区块"
|
||||||
>
|
>
|
||||||
<el-button icon="iconfont iconExported" size="small"
|
<el-button icon="iconfont iconExported" size="small"
|
||||||
>导出全部</el-button
|
>导出全部
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</ai-download>
|
</ai-download>
|
||||||
<ai-import
|
<ai-import
|
||||||
@@ -85,7 +86,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<el-button size="small" icon="iconfont iconImport"
|
<el-button size="small" icon="iconfont iconImport"
|
||||||
>导入</el-button
|
>导入
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</ai-import>
|
</ai-import>
|
||||||
</template>
|
</template>
|
||||||
@@ -117,7 +119,8 @@
|
|||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="flex-box">
|
<div class="flex-box">
|
||||||
<div v-for="(item, index) in row.girdMemberNames" v-show="index < 3" :key="index">
|
<div v-for="(item, index) in row.girdMemberNames" v-show="index < 3" :key="index">
|
||||||
<AiOpenData type="userName" :openid="item"></AiOpenData><span v-if="index < 2 && index < row.girdMemberNames.length - 1">、</span>
|
<AiOpenData type="userName" :openid="item"></AiOpenData>
|
||||||
|
<span v-if="index < 2 && index < row.girdMemberNames.length - 1">、</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -167,7 +170,8 @@
|
|||||||
v-if="editRow.plottingStatus == 1"
|
v-if="editRow.plottingStatus == 1"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="mini" @click="beginPoltting()"
|
<el-button type="primary" size="mini" @click="beginPoltting()"
|
||||||
>开始编辑</el-button
|
>开始编辑
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button size="mini" @click="finishPoltting()">结束编辑</el-button>
|
<el-button size="mini" @click="finishPoltting()">结束编辑</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
@@ -176,7 +180,8 @@
|
|||||||
v-if="editRow.plottingStatus == 0"
|
v-if="editRow.plottingStatus == 0"
|
||||||
>
|
>
|
||||||
<el-button size="mini" @click="draw('polygon')"
|
<el-button size="mini" @click="draw('polygon')"
|
||||||
>开始绘制多边形</el-button
|
>开始绘制多边形
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button size="mini" @click="close()">关闭绘制</el-button> -->
|
<!-- <el-button size="mini" @click="close()">关闭绘制</el-button> -->
|
||||||
<el-button size="mini" @click="clear()">清除绘制</el-button>
|
<el-button size="mini" @click="clear()">清除绘制</el-button>
|
||||||
@@ -185,7 +190,8 @@
|
|||||||
<div class="dialog-footer" slot="footer">
|
<div class="dialog-footer" slot="footer">
|
||||||
<el-button size="medium" @click="showMap = false">取消</el-button>
|
<el-button size="medium" @click="showMap = false">取消</el-button>
|
||||||
<el-button type="primary" size="medium" @click="confirm()"
|
<el-button type="primary" size="medium" @click="confirm()"
|
||||||
>确认</el-button
|
>确认
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
@@ -197,7 +203,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
|
|||||||
import Template from '../../../../../packages/wechat/AppAskForm/components/Template.vue';
|
import Template from '../../../../../packages/wechat/AppAskForm/components/Template.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Template },
|
components: {Template},
|
||||||
name: "List",
|
name: "List",
|
||||||
label: "网格区块",
|
label: "网格区块",
|
||||||
props: {
|
props: {
|
||||||
@@ -253,7 +259,7 @@ export default {
|
|||||||
colConfigs() {
|
colConfigs() {
|
||||||
let _ = this;
|
let _ = this;
|
||||||
return [
|
return [
|
||||||
{ type: 'selection'},
|
{type: 'selection'},
|
||||||
{
|
{
|
||||||
prop: "girdName",
|
prop: "girdName",
|
||||||
align: "left",
|
align: "left",
|
||||||
@@ -268,7 +274,7 @@ export default {
|
|||||||
prop: "girdType",
|
prop: "girdType",
|
||||||
align: "center",
|
align: "center",
|
||||||
label: "网格类型",
|
label: "网格类型",
|
||||||
render(h, { row }) {
|
render(h, {row}) {
|
||||||
return h("span", {}, _.dict.getLabel("girdType", row.girdType) || '-');
|
return h("span", {}, _.dict.getLabel("girdType", row.girdType) || '-');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -276,7 +282,7 @@ export default {
|
|||||||
prop: "girdLevel",
|
prop: "girdLevel",
|
||||||
align: "center",
|
align: "center",
|
||||||
label: "网格层级",
|
label: "网格层级",
|
||||||
render(h, { row }) {
|
render(h, {row}) {
|
||||||
return h("span", {}, _.dict.getLabel("girdLevel", row.girdLevel) || '-');
|
return h("span", {}, _.dict.getLabel("girdLevel", row.girdLevel) || '-');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -284,7 +290,7 @@ export default {
|
|||||||
prop: "plottingStatus",
|
prop: "plottingStatus",
|
||||||
align: "center",
|
align: "center",
|
||||||
label: "标绘状态",
|
label: "标绘状态",
|
||||||
render(h, { row }) {
|
render(h, {row}) {
|
||||||
return h(
|
return h(
|
||||||
"span",
|
"span",
|
||||||
{
|
{
|
||||||
@@ -300,7 +306,7 @@ export default {
|
|||||||
prop: "createTime",
|
prop: "createTime",
|
||||||
align: "center",
|
align: "center",
|
||||||
label: "创建时间",
|
label: "创建时间",
|
||||||
render(h, { row }) {
|
render(h, {row}) {
|
||||||
return h("span", {}, row.createTime.substring(0, 11));
|
return h("span", {}, row.createTime.substring(0, 11));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -315,15 +321,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCorpLocation(){
|
getCorpLocation() {
|
||||||
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{
|
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res => {
|
||||||
if(res.code==0){
|
if (res.code == 0) {
|
||||||
this.location = res.data
|
this.location = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleNodeClick(val) {
|
handleNodeClick(val) {
|
||||||
this.info = { ...val };
|
this.info = {...val};
|
||||||
this.searchId = val.id;
|
this.searchId = val.id;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
@@ -337,7 +343,7 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.treeObj.treeList.length && !this.info.girdLevel) {
|
if (this.treeObj.treeList.length && !this.info.girdLevel) {
|
||||||
this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id)
|
this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id)
|
||||||
this.info = { ...this.treeObj.treeList[0] };
|
this.info = {...this.treeObj.treeList[0]};
|
||||||
} else {
|
} else {
|
||||||
this.$refs.tree.setCurrentKey(this.info.id)
|
this.$refs.tree.setCurrentKey(this.info.id)
|
||||||
}
|
}
|
||||||
@@ -357,7 +363,7 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.instance
|
this.instance
|
||||||
.post("/app/appgirdinfo/delete", null, {
|
.post("/app/appgirdinfo/delete", null, {
|
||||||
params: { ids },
|
params: {ids},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
@@ -367,7 +373,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteTree(ids) {
|
deleteTree(ids) {
|
||||||
ids &&
|
ids &&
|
||||||
@@ -377,7 +384,7 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.instance
|
this.instance
|
||||||
.post("/app/appgirdinfo/delete", null, {
|
.post("/app/appgirdinfo/delete", null, {
|
||||||
params: { ids },
|
params: {ids},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
@@ -387,7 +394,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance
|
this.instance
|
||||||
@@ -418,7 +426,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//添加二级网格
|
//添加二级网格
|
||||||
addTwoLevel() {
|
addTwoLevel() {
|
||||||
this.info = { ...this.treeObj.treeList[0] };
|
this.info = {...this.treeObj.treeList[0]};
|
||||||
this.toAdd()
|
this.toAdd()
|
||||||
},
|
},
|
||||||
toAdd() {
|
toAdd() {
|
||||||
@@ -437,7 +445,7 @@ export default {
|
|||||||
},
|
},
|
||||||
poltting(row) {
|
poltting(row) {
|
||||||
this.showMap = true;
|
this.showMap = true;
|
||||||
this.editRow = { ...row };
|
this.editRow = {...row};
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: "b553334ba34f7ac3cd09df9bc8b539dc", // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: "b553334ba34f7ac3cd09df9bc8b539dc", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
@@ -491,7 +499,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
see(row) {
|
see(row) {
|
||||||
this.info = { ...row };
|
this.info = {...row};
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
this.toAdd()
|
this.toAdd()
|
||||||
},
|
},
|
||||||
@@ -563,22 +571,18 @@ export default {
|
|||||||
.getTarget()
|
.getTarget()
|
||||||
.getPath()
|
.getPath()
|
||||||
.map((e) => {
|
.map((e) => {
|
||||||
path.push({ lng: e.lng, lat: e.lat });
|
path.push({lng: e.lng, lat: e.lat});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
path = [...this.path];
|
path = [...this.path];
|
||||||
}
|
}
|
||||||
delete this.editRow.points;
|
delete this.editRow.points;
|
||||||
this.instance
|
let {girdMemberNames} = this.editRow
|
||||||
.post(
|
this.instance.post(`/app/appgirdinfo/addOrUpdate`, {
|
||||||
`/app/appgirdinfo/addOrUpdate`,
|
|
||||||
{
|
|
||||||
...this.editRow,
|
...this.editRow,
|
||||||
points: path,
|
points: path,
|
||||||
},
|
girdMemberNames: girdMemberNames?.toString()
|
||||||
null
|
}).then((res) => {
|
||||||
)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.showMap = false;
|
this.showMap = false;
|
||||||
@@ -589,10 +593,10 @@ export default {
|
|||||||
this.path = [];
|
this.path = [];
|
||||||
this.overlays = [];
|
this.overlays = [];
|
||||||
this.map.on("mousemove", this.showInfoMove, this);
|
this.map.on("mousemove", this.showInfoMove, this);
|
||||||
this.mouseTool.on("draw", ({ type, obj }) => {
|
this.mouseTool.on("draw", ({type, obj}) => {
|
||||||
obj.getPath().map((e) => {
|
obj.getPath().map((e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.path.push({ lat: e.getLat(), lng: e.getLng() });
|
this.path.push({lat: e.getLat(), lng: e.getLng()});
|
||||||
});
|
});
|
||||||
this.overlays.push(obj);
|
this.overlays.push(obj);
|
||||||
});
|
});
|
||||||
@@ -611,11 +615,12 @@ export default {
|
|||||||
.app-grid-block {
|
.app-grid-block {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
::v-deep .el-tree {
|
::v-deep .el-tree {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
||||||
.el-tree-node__expand-icon.is-leaf {
|
.el-tree-node__expand-icon.is-leaf {
|
||||||
color: transparent!important;
|
color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tree-node__content > .el-tree-node__expand-icon {
|
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||||
|
|||||||
Reference in New Issue
Block a user