Commit 67fdebf9 by 前端

Merge branch 'v1.23.0' into 'master'

V1.23.0版本需求已上线,合并代码到master

See merge request !53
2 parents 888e81a1 1f7f31d0
...@@ -4,14 +4,4 @@ export const CONSTANT = { ...@@ -4,14 +4,4 @@ export const CONSTANT = {
//ROOT: process.env.NODE_ENV === 'development'?'ots/':'', //ROOT: process.env.NODE_ENV === 'development'?'ots/':'',
API_URL: '/ots/', API_URL: '/ots/',
MAP_KEY, MAP_KEY,
AMAP_URL: `https://webapi.amap.com/maps?v=1.4.2&key=${MAP_KEY}&plugin=AMap.PolyEditor,AMap.CircleEditor,AMap.DistrictSearch,AMap.Autocomplete,AMap.MarkerClusterer,AMap.MouseTool,AMap.Text`,
MAP_PLUGINS: [
"AMap.PolyEditor",
"AMap.CircleEditor",
"AMap.DistrictSearch",
"AMap.Autocomplete",
"AMap.MarkerClusterer",
"AMap.MouseTool",
"AMap.Text",
]
} }
\ No newline at end of file \ No newline at end of file
...@@ -72,11 +72,34 @@ export default { ...@@ -72,11 +72,34 @@ export default {
// 初始化地图 // 初始化地图
initMap() { initMap() {
let _this = this; let _this = this;
if (window.AMap) {
_this.init(window.AMap);
return false;
}
AMapLoader.rest();
AMapLoader.load({ AMapLoader.load({
key: CONSTANT.MAP_KEY, // 申请好的Web端开发者Key,首次调用 load 时必填 key: CONSTANT.MAP_KEY, // 申请好的Web端开发者Key,首次调用 load 时必填
version: "1.4.2", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 version: "1.4.2", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: CONSTANT.MAP_PLUGINS, // 需要使用的的插件列表,如比例尺'AMap.Scale'等 plugins: CONSTANT.MAP_PLUGINS, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
}).then((AMap) => { }).then((AMap) => {
_this.init(AMap);
// let _amap = new AMap.Map("mapContainer", {
// //设置地图容器id
// viewMode: "3D", //是否为3D地图模式
// });
// _amap.on("complete", function () {
// console.log(_this.info);
// if (_this.info && (_this.info.bsLng || _this.info.gpsLng)) {
// _this.drawMaker();
// }
// });
// _this.mapObj = _amap;
});
},
// 初始化方法
init(AMap) {
let _this = this;
let _amap = new AMap.Map("mapContainer", { let _amap = new AMap.Map("mapContainer", {
//设置地图容器id //设置地图容器id
viewMode: "3D", //是否为3D地图模式 viewMode: "3D", //是否为3D地图模式
...@@ -88,7 +111,6 @@ export default { ...@@ -88,7 +111,6 @@ export default {
} }
}); });
_this.mapObj = _amap; _this.mapObj = _amap;
});
}, },
// 激活位置 // 激活位置
......
...@@ -25,6 +25,10 @@ export default { ...@@ -25,6 +25,10 @@ export default {
size:{ size:{
type:String, type:String,
default:'' default:''
},
permissionTag:{
type:[String,Number],
default:''
} }
}, },
data() { data() {
...@@ -37,9 +41,9 @@ export default { ...@@ -37,9 +41,9 @@ export default {
hasPermission() { hasPermission() {
let id = this.uid; let id = this.uid;
let _name = this.name; let _name = this.name;
let _tag = this.permissionTag;
let list = this.$root.parentCommon.getAuthData(); let list = this.$root.parentCommon.getAuthData();
console.log(list[0]) let idx = list.findIndex((k) => k.id == id || k.label == _name || k.origin.permissionTag == _tag);
let idx = list.findIndex((k) => k.id == id || k.label == _name);
if (idx < 0) { if (idx < 0) {
return false; return false;
} else { } else {
......
...@@ -23,6 +23,10 @@ export default { ...@@ -23,6 +23,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
permissionTag:{
type:[String,Number],
default:''
}
}, },
data() { data() {
return {}; return {};
...@@ -33,8 +37,9 @@ export default { ...@@ -33,8 +37,9 @@ export default {
hasPermission() { hasPermission() {
let id = this.uid; let id = this.uid;
let _name = this.name; let _name = this.name;
let _tag = this.permissionTag;
let list = this.$root.parentCommon.getAuthData(); let list = this.$root.parentCommon.getAuthData();
let idx = list.findIndex((k) => k.id == id || k.label == _name); let idx = list.findIndex((k) => k.id == id || k.label == _name || k.origin.permissionTag == _tag);
if (idx < 0) { if (idx < 0) {
return false; return false;
} else { } else {
......
...@@ -92,8 +92,10 @@ ...@@ -92,8 +92,10 @@
<el-link class="el_link" type="primary" @click="lookDetail(row,1)">查看</el-link> <el-link class="el_link" type="primary" @click="lookDetail(row,1)">查看</el-link>
<el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,2)">编辑</el-link> <el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,2)">编辑</el-link>
<auth-link class="el_link" type="primary" name="删除" @click.native="removeOrder(row)">删除</auth-link> <auth-link class="el_link" type="primary" name="删除" @click.native="removeOrder(row)">删除</auth-link>
<el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,3)">激活</el-link> <!-- <el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,3)">激活</el-link>
<el-link class="el_link" type="primary" v-if="row.status == 5" @click="lookDetail(row,4)">审核</el-link> <el-link class="el_link" type="primary" v-if="row.status == 5" @click="lookDetail(row,4)">审核</el-link> -->
<auth-link class="el_link" type="primary" permission-tag="WORK_ORDER_ACTIVATE_BUTTON" v-if="row.status == 0 ||row.status == 1" @click.native="lookDetail(row,3)">激活</auth-link>
<auth-link class="el_link" type="primary" permission-tag="WORK_ORDER_APPROVE_BUTTON" v-if="row.status == 5" @click.native="lookDetail(row,4)">审核</auth-link>
<auth-link class="el_link" type="primary" v-if="row.status == 2" uid="14010101" name="照片编辑" @click.native="lookDetail(row,5)">照片编辑</auth-link> <auth-link class="el_link" type="primary" v-if="row.status == 2" uid="14010101" name="照片编辑" @click.native="lookDetail(row,5)">照片编辑</auth-link>
<el-dropdown trigger="click" @command="e => onCommand(e,row)" v-if="hasPermission('work_order_associated') && (row.status == 1 || row.status == 0)"> <el-dropdown trigger="click" @command="e => onCommand(e,row)" v-if="hasPermission('work_order_associated') && (row.status == 1 || row.status == 0)">
<el-button class="btn_mini_size" icon="el-icon-arrow-down" size="mini"></el-button> <el-button class="btn_mini_size" icon="el-icon-arrow-down" size="mini"></el-button>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!