Commit cdd9ec0b authored by Kimber's avatar Kimber

Merge branch 'rev2'

parents 2bf9672c 1313bb76
......@@ -96,9 +96,9 @@ export default {
},
// 修改
set: (iotNormalMachine) => {
iotNormalMachine.enterpriseId = null
iotNormalMachine.mineType = null
iotNormalMachine.mineId = null
// iotNormalMachine.enterpriseId = null
// iotNormalMachine.mineType = null
// iotNormalMachine.mineId = null
iotNormalMachine.createDatetime = null
iotNormalMachine.createBy = null
iotNormalMachine.updateDatetime = null
......
......@@ -50,7 +50,7 @@ export default {
// 修改地下矿山
setUnderground: (mine) => {
mine.hasEnable = null
mine.enterpriseId = null
// mine.enterpriseId = null
mine.createDatetime = null
mine.createBy = null
mine.updateDatetime = null
......@@ -183,5 +183,14 @@ export default {
method: 'get',
params: mineSearchParam
})
},
// 根据企业查询所属矿山(含停产)enterpriseId
getAllMineByEnterpriseId: (mineSearchParam) => {
return request({
url: 'api/mine/underground/list',
method: 'get',
params: mineSearchParam
})
}
}
This diff is collapsed.
This diff is collapsed.
<template>
<div class="app-amap-search-point">
<el-autocomplete v-show="isSearch" v-model="mapInput" style="width: 100%;" :fetch-suggestions="querySearch" placeholder="请输入地址搜素" prefix-icon="el-icon-search" @select="handleSelect">
<template slot-scope="{ item }">
<div style="text-overflow: ellipsis; overflow: hidden;">{{ item.name }}</div>
<span style="font-size: 12px; color: #b4b4b4;">{{ item.district }}</span>
</template>
</el-autocomplete>
<div id="amap_search_point_container_add" :style="{padding: 0,margin: 0,width: '100%',height: mapHeight}" />
</div>
</template>
<script>
import AMapLoader from '@amap/amap-jsapi-loader'
export default {
name: 'AMapSearchPoint',
props: {
mapHeight: {
type: String,
default: () => { return '400px' }
},
isSearch: {
type: Boolean,
default: () => { return true }
},
point: {
type: Array,
default: () => { return null }
}
},
data() {
return {
mapInput: '',
lnglat: null,
mapMarker: null
}
},
computed: {},
watch: {
mapMarker(newValue, oldValue) {
if (oldValue) {
this.map.remove(oldValue)
}
if (newValue) {
this.map.add(newValue)
}
},
point() {
if (this.map) {
this.markPoint(this.point)
this.point && this.map.panTo(this.point)
}
}
},
created() {
this.initMap()
},
methods: {
// 输入选择
querySearch(queryString, callback) {
this.autoComplete.search(queryString, (status, result) => {
// result.tips[0].{name,district,location{lng,lat}}
if (result && result.tips) {
callback(result.tips.filter(tip => tip.location))
} else {
callback(null)
}
})
},
// 点选搜索结果
handleSelect(amapTip) {
if (amapTip.location.lng && amapTip.location.lat) {
this.$emit('choosePoint', [amapTip.location.lng, amapTip.location.lat])
} else {
this.$message({
message: '您所选的地点无法精确定位',
type: 'warning'
})
}
},
// 选中点
markPoint(lnglatArray) {
if (lnglatArray && lnglatArray.length === 2) {
this.mapMarker = new this.AMap.Marker({
position: new this.AMap.LngLat(lnglatArray[0], lnglatArray[1])
})
this.lnglat = lnglatArray
} else {
this.mapMarker = null
}
},
initMap() {
AMapLoader.load({
key: 'a0efee399e638b35211705625d786e83',
version: '2.0',
plugins: []
}).then((AMap) => {
this.AMap = AMap
// 加载地图
let center = [119.969873, 36.753901] // 平度市
if (this.defaultPoint && this.defaultPoint.length === 2) {
center = this.defaultPoint
}
this.map = new this.AMap.Map('amap_search_point_container_add', {
resizeEnable: true,
center: center,
zoom: 12
})
if (this.defaultPoint && this.defaultPoint.length === 2) {
this.markPoint(center)
}
// 点击选取
this.map.on('click', res => {
if (this.isSearch) {
if (res && res.lnglat && res.lnglat.lng && res.lnglat.lat) {
this.$emit('choosePoint', [res.lnglat.lng, res.lnglat.lat])
}
}
})
// 输入框选择位置
this.AMap.plugin(['AMap.AutoComplete'], () => {
this.autoComplete = new this.AMap.AutoComplete({
city: '全国'
})
})
// 初始化位置
if (this.point) {
this.markPoint(this.point)
this.point && this.map.panTo(this.point)
}
}).catch(e => {
console.error(e)
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>
......@@ -198,12 +198,14 @@ export default {
id: value
}
}).then((res)=>{
Message({
this.$message({
message: '操作成功,正在重新加载页面',
type: 'success',
duration: 3000 // 消息显示的时间,单位为 ms
});
// window.location.reload()
setTimeout(() => {
window.location.reload()
}, 500);
})
},
// 跳转到大屏
......
<template>
<div class="login" :style="'background-image:url(' + Background + ');'">
<div class="topTitle" >
<div class="floating-text">
中和地信有限公司欢迎您!
</div>
</div>
<div class="bottomTitle">@中和地信有限公司</div>
<div class="wrapper">
<div class="header">
<h2 @click="navTo('admin')"><i class="el-icon-setting"></i>管理后台</h2>
</div>
<div class="title">
<h1>中和地信应急平台</h1>
</div>
<div class="content">
<ul>
<li v-for="(item, index) in dataList" :key="index" @click="navTo(item.label)">
{{ item.label }}
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
import qs from "qs";
import Background from "@/assets/images/background.webp";
import { mapGetters } from "vuex";
import menuApi from '@/api/system/menu.js'
export default {
name: "Login",
data() {
return {
show: false,
userStyle: null,
Background: Background,
codeUrl: "",
cookiePass: "",
loading: false,
redirect: undefined,
dataList: []
};
},
computed: {
...mapGetters(["user"]),
},
watch: {
$route: {
handler: function (route) {
const data = route.query;
if (data && data.redirect) {
this.redirect = data.redirect;
delete data.redirect;
if (JSON.stringify(data) !== "{}") {
this.redirect =
this.redirect + "&" + qs.stringify(data, { indices: false });
}
}
},
immediate: true,
},
},
created() {
// // 按照不同域名加载不同页面样式(企业、应急局),加载完毕后再显示页面
// const host = window.location.host;
// if (host === "yingji.longxijiancai.com") {
// this.userStyle = "应急局";
// }
// if (host === "qiye.longxijiancai.com") {
// this.userStyle = "企业";
// }
menuApi.getMenusHome().then((res)=>{
this.dataList = res.body
})
},
methods: {
navTo(type) {
var host = location.protocol + '//' + window.location.host;
if (type === "admin") {
// this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" });
}else if(type === "应急管理"){
// this.$router.push({ path: "home4Center" });
// this.$router.push({ path: "/user/center" });
// location.href = 'http://192.168.3.226:8057/datav/index.html'
location.href = host + '/datav/index.html'
}else if(type === "自然资源"){
// location.href = process.env.NODE_ENV + ''
// location.href = 'http://192.168.3.226:8057/datav/natural.html'
location.href = host + '/datav/natural.html'
}else if(type === "水利系统"){
// location.href = 'http://192.168.3.226:8057/datav/watersource.html'
location.href = host + '/datav/watersource.html'
}else if(type === "电子档案馆"){
// this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" });
}
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
@keyframes floatShadow {
0% {
transform:translateX(1300px);
display:block;
}
100% {
transform:translateX(-1300px);
display:none;
}
}
.floating-text {
font-size:18px;line-height:1;
color: #FDD756;text-shadow: 0 0 5px #fff;
animation: floatShadow;
animation-name:floatShadow;
animation-duration: 20s;
animation-iteration-count: infinite;
animation-timing-function:linear;
position:absolute;top:8px;
}
.topTitle {
position: absolute;
top: 0;
background: #15181a73;
height: 32px;
width: 100%;
line-height: 32px;
color: #fff;
text-align: center;
}
.bottomTitle {
position: absolute;
bottom: 0;
background: #021d39;
height: 32px;
width: 100%;
line-height: 32px;
color: #fff;
text-align: center;
}
.wrapper {
.header {
h2 {
color: #00346b;
text-align: right;
position: absolute;
top: 20px;
right: 20px;
cursor: pointer;
}
}
h1 {
text-align: center;
color: #00346b;
}
ul {
list-style: none;
width: 900px;
overflow: hidden;
}
li {
float: left;
width: 400px;
background: #173e67;
height: 170px;
line-height: 170px;
text-align: center;
color: #fff;
font-size: 28px;
font-weight: bold;
margin: 10px;
cursor: pointer;
&:nth-child(1) {
background: #135965;
}
&:nth-child(4) {
background: #135965;
}
}
}
.login {
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-size: cover;
}
</style>
<template>
<div class="login" :style="'background-image:url(' + Background + ');'">
<div class="topTitle" >
<div class="floating-text">
中和地信有限公司欢迎您!
<div class="topTitle" :style="'background-image:url(' + Title + ');'">
中和地信应急平台
</div>
<div class="subTopTitle">
<h2 :style="'background-image:url(' + Welcome + ');'">
<img src="@/assets/home4Index/icon5.png" />中和地信有限公司欢迎您!
</h2>
<h2 @click="navTo('admin')" style="cursor: pointer;">
<img src="@/assets/home4Index/icon6.png" />管理后台
</h2>
</div>
<div class="bottomTitle">@中和地信有限公司</div>
<div class="wrapper">
<div class="header">
<h2 @click="navTo('admin')"><i class="el-icon-setting"></i>管理后台</h2>
</div>
<div class="title">
<h1>中和地信应急平台</h1>
</div>
<div class="content">
<ul>
<li v-for="(item, index) in dataList" :key="index" @click="navTo(item.label)">
{{ item.label }}
<li
v-for="(item, index) in dataList"
:key="index"
@click="navTo(item.label)"
>
<div class="itemDiv">
<img
:src="require(`@/assets/home4Index/icon${index + 1}.png`)"
alt=""
/>
<p>
<span>{{ item.label }}</span>
<img src="@/assets/home4Index/underline2.png" />
</p>
</div>
</li>
</ul>
</div>
</div>
<div class="bottomTitle">@中和地信有限公司</div>
</div>
</template>
<script>
import qs from "qs";
import Background from "@/assets/images/background.webp";
import Background from "@/assets/home4Index/bg.png";
import Title from "@/assets/home4Index/title.png";
import Welcome from "@/assets/home4Index/underline.png";
import { mapGetters } from "vuex";
import menuApi from '@/api/system/menu.js'
import menuApi from "@/api/system/menu.js";
export default {
name: "Login",
data() {
......@@ -36,11 +52,13 @@ export default {
show: false,
userStyle: null,
Background: Background,
Welcome,
Title,
codeUrl: "",
cookiePass: "",
loading: false,
redirect: undefined,
dataList: []
dataList: [],
};
},
computed: {
......@@ -63,8 +81,6 @@ export default {
},
},
created() {
// // 按照不同域名加载不同页面样式(企业、应急局),加载完毕后再显示页面
// const host = window.location.host;
// if (host === "yingji.longxijiancai.com") {
......@@ -73,30 +89,32 @@ export default {
// if (host === "qiye.longxijiancai.com") {
// this.userStyle = "企业";
// }
menuApi.getMenusHome().then((res)=>{
this.dataList = res.body
})
menuApi.getMenusHome().then((res) => {
this.dataList = res.body;
});
},
methods: {
navTo(type) {
var host = location.protocol + "//" + window.location.host;
if (type === "admin") {
// this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" });
}else if(type === "应急管理"){
} else if (type === "应急管理") {
// this.$router.push({ path: "home4Center" });
// this.$router.push({ path: "/user/center" });
location.href = 'http://192.168.3.226:8057/datav/index.html'
}else if(type === "自然资源"){
// location.href = 'http://192.168.3.226:8057/datav/index.html'
location.href = host + "/datav/index.html";
} else if (type === "自然资源") {
// location.href = process.env.NODE_ENV + ''
location.href = 'http://192.168.3.226:8057/datav/natural.html'
}else if(type === "水利系统"){
location.href = 'http://192.168.3.226:8057/datav/watersource.html'
}else if(type === "电子档案馆"){
// location.href = 'http://192.168.3.226:8057/datav/natural.html'
location.href = host + "/datav/natural.html";
} else if (type === "水利系统") {
// location.href = 'http://192.168.3.226:8057/datav/watersource.html'
location.href = host + "/datav/watersource.html";
} else if (type === "电子档案馆") {
// this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" });
}
},
},
......@@ -104,40 +122,75 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss">
@keyframes floatShadow {
0% {
transform:translateX(1300px);
display:block;
transform: translateX(1300px);
display: block;
}
100% {
transform:translateX(-1300px);
display:none;
transform: translateX(-1300px);
display: none;
}
}
.floating-text {
font-size:18px;line-height:1;
color: #FDD756;text-shadow: 0 0 5px #fff;
font-size: 18px;
line-height: 1;
color: #fdd756;
text-shadow: 0 0 5px #fff;
animation: floatShadow;
animation-name:floatShadow;
animation-name: floatShadow;
animation-duration: 20s;
animation-iteration-count: infinite;
animation-timing-function:linear;
position:absolute;top:8px;
animation-timing-function: linear;
position: absolute;
top: 8px;
}
.subTopTitle {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: distribute;
justify-content: space-between;
position: absolute;
top: 10px;
width: 100%;
/* z-index: 99999; */
height: 110px;
color: #fff;
font-size: 12px;
padding: 10px 43px;
align-items: center;
h2 {
display: inline-block;
vertical-align: middle;
letter-spacing: 2px;
font-weight: 600;
color: #fdfdfd;
&:first-child {
height: 50px;
background-repeat: no-repeat;
background-position-y: 30px;
}
}
img {
vertical-align: middle;
margin-right: 10px;
}
}
.topTitle {
position: absolute;
top: 0;
background: #15181a73;
height: 32px;
width: 100%;
line-height: 32px;
color: #fff;
text-align: center;
background-size: cover;
height: 100px;
font-size: 38px;
line-height: 100px;
font-weight: bold;
letter-spacing: 5px;
}
.bottomTitle {
position: absolute;
......@@ -166,14 +219,16 @@ export default {
}
ul {
list-style: none;
width: 900px;
// width: 1200px;
overflow: hidden;
}
li {
display: flex;
justify-content: center;
float: left;
width: 400px;
background: #173e67;
height: 170px;
width: 304px;
// background: #173e67;
height: 620px;
line-height: 170px;
text-align: center;
color: #fff;
......@@ -182,13 +237,44 @@ export default {
margin: 10px;
cursor: pointer;
&:nth-child(1) {
background: #135965;
// background: #135965;
}
&:nth-child(4) {
background: #135965;
// background: #135965;
}
&:hover {
background-image: url("../assets/home4Index/bg2.png");
}
background-image: url("../assets/home4Index/bg1.png");
background-repeat: no-repeat;
background-size: cover;
}
}
.itemDiv {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
& > img {
width: 120px;
margin-left: 30px;
}
p {
width: 180px;
margin-top: -10px;
position: relative;
span {
font-weight: 500;
letter-spacing: 3px;
}
img {
position: absolute;
bottom: 45px;
right: 15px;
}
}
}
.login {
position: relative;
display: flex;
......
This diff is collapsed.
......@@ -206,7 +206,7 @@
<el-upload
v-show="editing"
class="upload-demo"
action="/api/file/upload"
:action="`${baseApi}/api/file/upload`"
multiple
:headers="httpHeaders"
:limit="1"
......@@ -247,7 +247,7 @@
<el-upload
v-show="editing"
class="upload-demo"
action="/api/file/upload"
:action="`${baseApi}/api/file/upload`"
multiple
:headers="httpHeaders"
:limit="1"
......
......@@ -4,6 +4,8 @@
<div class="head-container">
<div>
<el-input v-model="searchParam.nameLike" clearable size="small" placeholder="测点名称" style="width: 200px;" class="filter-item" />
<el-input v-model="searchParam.enterpriseName" clearable size="small" placeholder="所属企业" style="width: 200px;" class="filter-item" />
<el-input v-model="searchParam.mineName" clearable size="small" placeholder="所属矿山" style="width: 200px;" class="filter-item" />
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="searchSubmit">搜索</el-button>
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="searchParamReset">重置</el-button>
<el-tooltip class="item" effect="dark" content="按当前查询条件导出" placement="top">
......@@ -28,6 +30,34 @@
<!--弹出框1-->
<el-dialog append-to-body :close-on-click-modal="true" :visible.sync="dialog1Show" :title="editState==1?'新增':editState==2?'修改':'查看'" width="960px">
<el-form ref="dialog1Form" :hide-required-asterisk="!dialog1Editing" :model="dialog1Data" :rules="dialog1Rules" size="mini" label-width="180px" style="margin-right: 80px;">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所属企业:" prop="enterpriseId">
<span v-show="!dialog1Editing">{{ dialog1Data.enterpriseName }}</span>
<el-select
v-model="dialog1Data.enterpriseId"
placeholder="请选择"
@change="enterpriseChange"
>
<el-option
v-for="item in options4enterpriseIdList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属矿山" prop="mineId">
<span v-show="!dialog1Editing">{{ dialog1Data.mineName }}</span>
<el-select v-model="dialog1Data.mineId" placeholder="请选择" clearable size="small" class="filter-item" style="width: 200px;">
<el-option v-for="mine in mineList" :key="mine.index" :label="mine.name" :value="mine.index" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="测点编号:" prop="code">
......@@ -227,6 +257,9 @@
<el-table ref="table" v-loading="searching" :data="tableData" row-key="id">
<el-table-column :show-overflow-tooltip="true" prop="id" label="编号" width="100px" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="code" label="测点编号" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="enterpriseName" label="所属企业" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="mineName" label="所属矿山" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="name" label="测点名称" align="center" />
<el-table-column :show-overflow-tooltip="true" prop="monitoringType" label="测点类型" align="center">
<template slot-scope="scope">
......@@ -265,6 +298,9 @@
<script>
import iotEnvironmentMachineApi from '@/api/kd/iotEnvironmentMachine'
import AMapSearchPoint from '@/components/AMap/AMapSearchPoint'
import mineApi from '@/api/kd/mine'
import {getCompanyList} from '@/api/system/user'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
import { downloadFile } from '@/utils'
......@@ -272,13 +308,18 @@ import { downloadFile } from '@/utils'
const searchParam = {// 默认搜索条件
page: 1,
count: 10,
searchCount: true
searchCount: true,
mineName: '',
enterpriseName: ''
}
export default {
name: 'EIotEnvironmentMachine', // 本页面名
components: { AMapSearchPoint },
data() {
return {
options4enterpriseIdList: [],
mineList: [],
selectedMine: {},
httpHeaders: {
'Authorization': getToken()
......@@ -296,6 +337,8 @@ export default {
dialog1Saving: false,
dialog1Data: {},
dialog1Rules: {
enterpriseId: [{ required: true, message: '请选择' }],
mineId: [{ required: true, message: '请选择' }],
code: [{ required: true, message: '请填写' }],
name: [{ required: true, message: '请填写' }],
monitoringPointDataType: [{ required: true, message: '请选择' }]
......@@ -326,26 +369,45 @@ export default {
}
},
mounted() {
const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
let noMine = false
if (!selectedMineJson) {
noMine = true
} else {
const selectedMine = JSON.parse(selectedMineJson)
if (!selectedMine || selectedMine.enterpriseId !== this.user.enterpriseId) {
noMine = true
} else {
this.selectedMine = selectedMine
}
}
// const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
// let noMine = false
// if (!selectedMineJson) {
// noMine = true
// } else {
// const selectedMine = JSON.parse(selectedMineJson)
// if (!selectedMine || selectedMine.enterpriseId !== this.user.enterpriseId) {
// noMine = true
// } else {
// this.selectedMine = selectedMine
// }
// }
// if (noMine) {
// this.$message.error('当前未选择矿山')
// this.$router.replace('/dashboard')
// }
this.searchParamReset()
this.searchSubmit()
// 获取企业公司
getCompanyList({})
.then((res) => {
this.options4enterpriseIdList = res.body;
});
},
methods: {
enterpriseChange(value){
// 矿山选项卡
this.getAllMineByEnterpriseId(value)
},
getAllMineByEnterpriseId(enterpriseId){
mineApi.getAllMineByEnterpriseId({
enterpriseId
}).then(response => {
let i = 1
response.body.forEach(x => { x.index = i++ })
this.mineList = response.body
})
},
searchParamReset() {
this.searchParam = JSON.parse(JSON.stringify(searchParam))
},
......@@ -383,9 +445,10 @@ export default {
} else {
this.dialog1Saving = true
this.removeOtherMonitoringPoint(this.dialog1Data)
this.dialog1Data.mineType = '1' // 地下矿山
if (this.editState === 1) { // 新增
this.dialog1Data.mineType = this.selectedMine.mineType
this.dialog1Data.mineId = this.selectedMine.id
// this.dialog1Data.mineType = this.selectedMine.mineType
// this.dialog1Data.mineId = this.selectedMine.id
iotEnvironmentMachineApi.add(this.dialog1Data).then(() => {
this.dialog1Show = false
this.$message.success('保存成功')
......@@ -440,6 +503,7 @@ export default {
this.dialog1Show = true
this.$nextTick(() => {
this.$refs['dialog1Form'].clearValidate()
this.getAllMineByEnterpriseId(this.dialog1Data.enterpriseId)
})
}).catch(() => {
this.searchSubmit()
......@@ -447,6 +511,7 @@ export default {
},
dialog2Submit() {
this.dialog2Saving = true
iotEnvironmentMachineApi.del(this.dialog2Data).then(() => {
this.dialog2Show = false
this.$message.success('删除成功')
......
......@@ -5,6 +5,7 @@
<div>
<el-input v-model="searchParam.code" clearable size="small" placeholder="矿山编号" style="width: 200px;" class="filter-item" />
<el-input v-model="searchParam.nameLike" clearable size="small" placeholder="矿山名称" style="width: 200px;" class="filter-item" />
<el-input v-model="searchParam.enterpriseName" clearable size="small" placeholder="所属企业" style="width: 200px;" class="filter-item" />
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="searchSubmit">搜索</el-button>
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="searchParamReset">重置</el-button>
</div>
......@@ -30,9 +31,20 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所属行政区划:" prop="_administrativeAreaCascade">
<!-- <el-form-item label="所属行政区划:" prop="_administrativeAreaCascade">
<span v-show="!editing">{{ dialog1Data.administrativeAreaName }}</span>
<el-cascader v-show="editing" v-model="dialog1Data._administrativeAreaCascade" style="width: 100%;" :options="administrativeAreaList" clearable />
</el-form-item> -->
<el-form-item label="所属企业:" prop="enterpriseId">
<span v-show="!editing">{{ dialog1Data.enterpriseName }}</span>
<el-select v-show="editing" size="mini" v-model="dialog1Data.enterpriseId" placeholder="" @change="handleChange">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -386,7 +398,10 @@
<el-table ref="table" v-loading="searching" :data="tableData" row-key="id">
<!-- <el-table-column type="selection" width="55" /> -->
<el-table-column :show-overflow-tooltip="true" label="编号" prop="id" width="100px" align="center" />
<el-table-column :show-overflow-tooltip="true" label="矿山名称" prop="name" align="center" />
<el-table-column :show-overflow-tooltip="true" label="所属企业" prop="enterpriseName" align="center" />
<el-table-column :show-overflow-tooltip="true" label="矿山编号" prop="code" align="center" />
<el-table-column :show-overflow-tooltip="true" label="矿山地址" prop="address" align="center" />
<el-table-column :show-overflow-tooltip="true" label="建矿时间" prop="buildDate" align="center" />
......@@ -429,16 +444,19 @@ import AMapSearchPoint from '@/components/AMap/AMapSearchPoint'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
import { validatePhone } from '@/utils/validate'
import {getCompanyList} from '@/api/system/user'
const searchParam = {// 默认搜索条件
page: 1,
count: 10,
searchCount: true
searchCount: true,
enterpriseName:''
}
export default {
name: 'EUnderground', // 本页面名
components: { AMapSearchPoint },
data() {
return {
companyList: [],
httpHeaders: {
'Authorization': getToken()
},
......@@ -502,8 +520,16 @@ export default {
})
this.searchParamReset()
this.searchSubmit()
this.getCompanyList()
},
methods: {
getCompanyList(){
getCompanyList({})
.then((res) => {
this.companyList = res.body;
});
},
searchParamReset() {
this.searchParam = JSON.parse(JSON.stringify(searchParam))
},
......
......@@ -146,7 +146,7 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
dateScopes: ["本级", "全部"],
dateScopes: ["全部", "本级及以下", "自定义",],
defaultProps: { children: 'children', label: 'label', isLeaf: 'leaf' },
level: 3,
currentId: 0, currentName: '', menuLoading: false, showButton: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment