Commit c311c010 authored by xinzhedeai's avatar xinzhedeai

新增公司 大屏地址跳转 角色范围

parent 971c40f9
...@@ -79,6 +79,7 @@ export default { ...@@ -79,6 +79,7 @@ export default {
}, },
methods: { methods: {
navTo(type) { navTo(type) {
var host = location.protocol + '//' + window.location.host;
if (type === "admin") { if (type === "admin") {
// this.$router.push({ path: "home4Center" }); // this.$router.push({ path: "home4Center" });
...@@ -87,12 +88,15 @@ export default { ...@@ -87,12 +88,15 @@ export default {
}else if(type === "应急管理"){ }else if(type === "应急管理"){
// this.$router.push({ path: "home4Center" }); // this.$router.push({ path: "home4Center" });
// this.$router.push({ path: "/user/center" }); // this.$router.push({ path: "/user/center" });
location.href = 'http://192.168.3.226:8057/datav/index.html' // location.href = 'http://192.168.3.226:8057/datav/index.html'
location.href = host + '/datav/index.html'
}else if(type === "自然资源"){ }else if(type === "自然资源"){
// location.href = process.env.NODE_ENV + '' // location.href = process.env.NODE_ENV + ''
location.href = 'http://192.168.3.226:8057/datav/natural.html' // location.href = 'http://192.168.3.226:8057/datav/natural.html'
location.href = host + '/datav/natural.html'
}else if(type === "水利系统"){ }else if(type === "水利系统"){
location.href = 'http://192.168.3.226:8057/datav/watersource.html' // location.href = 'http://192.168.3.226:8057/datav/watersource.html'
location.href = host + '/datav/watersource.html'
}else if(type === "电子档案馆"){ }else if(type === "电子档案馆"){
// this.$router.push({ path: "home4Center" }); // this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" }); this.$router.push({ path: "/user/center" });
......
...@@ -9,11 +9,284 @@ ...@@ -9,11 +9,284 @@
</el-select> </el-select>
<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="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-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="searchParamReset">重置</el-button>
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="add">新增</el-button>
<el-tooltip class="item" effect="dark" content="按当前查询条件导出" placement="top"> <el-tooltip class="item" effect="dark" content="按当前查询条件导出" placement="top">
<el-button :loading="exporting" class="filter-item" size="mini" type="info" plain icon="el-icon-download" @click="exportSubmit">导出</el-button> <el-button :loading="exporting" class="filter-item" size="mini" type="info" plain icon="el-icon-download" @click="exportSubmit">导出</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<el-dialog append-to-body :close-on-click-modal="true" :visible.sync="addCompanyShow" :title="'企业信息'" width="1160px">
<el-form ref="addCompanyForm" :model="mainDataEditing" :rules="mainFormRules" size="mini" label-width="170px" style="margin-right: 100px;">
<el-row :gutter="10">
<el-divider content-position="center">基础信息</el-divider>
<el-col :span="12">
<el-form-item label="企业名称:" prop="name">
<el-input v-model="mainDataEditing.name"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司地址:" prop="address">
<el-input v-model="mainDataEditing.address" maxlength="500" show-word-limit />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="所属区域:" prop="_administrativeAreaCascade">
<!-- <el-cascader v-model="mainDataEditing._administrativeAreaCascade" style="width: 100%;" :options="administrativeAreaList" clearable /> -->
<el-cascader
v-model="mainDataEditing._administrativeAreaCascade"
:options="administrativeAreaList"
:props="{ checkStrictly: true, value: 'id' }"
:show-all-levels="false"
></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属集团:" prop="">
<!-- <el-select v-model="mainDataEditing.dict41" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict41List" :key="item.id" :label="item.value" :value="item.id" />
</el-select> -->
<el-select
v-model="mainDataEditing.pid"
placeholder="请输入企业"
clearable
>
<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-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="单位性质:" prop="dict1">
<el-select v-model="mainDataEditing.dict1" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict1List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="经济类型:" prop="dict2">
<el-select v-model="mainDataEditing.dict2" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict2List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="行业类别:" prop="dict3">
<el-select v-model="mainDataEditing.dict3" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict3List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="统一社会信用代码:" prop="idCode">
<el-input v-model="mainDataEditing.idCode" maxlength="100" show-word-limit />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="是否有注册资本:" prop="hasRegisteredCapital">
<el-radio-group v-model="mainDataEditing.hasRegisteredCapital" size="mini">
<el-radio-button :label="true"></el-radio-button>
<el-radio-button :label="false"></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="mainDataEditing.hasRegisteredCapital" label="注册资本(万元):" prop="registeredCapital">
<el-input-number v-model="mainDataEditing.registeredCapital" :precision="2" :controls="false" style="width: 100%;" :min="0" :max="999999" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="18">
<el-form-item label="经营范围:" prop="businessScope">
<el-input v-model="mainDataEditing.businessScope" type="textarea" :rows="3" maxlength="1000" show-word-limit />
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">企业资质</el-divider>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="成立日期:" prop="setupDate">
<el-date-picker v-model="mainDataEditing.setupDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="经营期限(起):" prop="beginLimitDate">
<el-date-picker v-model="mainDataEditing.beginLimitDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="经营期限(止):" prop="endLimitDate">
<el-date-picker v-model="mainDataEditing.endLimitDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="生产经营方式:" prop="dict4">
<el-select v-model="mainDataEditing.dict4" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict4List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="企业规模:" prop="dict5">
<el-select v-model="mainDataEditing.dict5" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict5List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否规模以上企业:" prop="dict6">
<el-select v-model="mainDataEditing.dict6" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict6List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="隶属层级:" prop="dict7">
<el-select v-model="mainDataEditing.dict7" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in dict7List" :key="item.id" :label="item.value" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="责任人:" prop="liablePerson">
<el-input v-model="mainDataEditing.liablePerson" maxlength="30" show-word-limit />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任人电话:" prop="liablePersonPhone">
<el-input v-model="mainDataEditing.liablePersonPhone" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="生产经营地址:" prop="businessAddress">
<el-input v-model="mainDataEditing.businessAddress" maxlength="500" show-word-limit />
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">证书</el-divider>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="采矿许可证:" prop="_workLicenseFileList">
<el-upload
class="upload-demo"
:action="`${baseApi}/api/file/upload`"
multiple
:headers="httpHeaders"
:limit="1"
:on-success="upFileSuccessWork"
:on-remove="upFileRemoveWork"
:on-error="upFileError"
:on-exceed="upFileExceed"
:before-upload="upFileBefore"
:on-preview="openFile"
:file-list="mainDataEditing._workLicenseFileListShow"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">图片不要超过20M,仅支持jpeg、png格式</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<div>
<el-form-item label="采矿许可有效期:" prop="workLicenseBeginDate">
<el-date-picker v-model="mainDataEditing.workLicenseBeginDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</div>
<div>
<el-form-item label="至:" prop="workLicenseEndDate">
<el-date-picker v-model="mainDataEditing.workLicenseEndDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="安全生产许可证:" prop="_safetyLicenseFileList">
<el-upload
class="upload-demo"
:action="`${baseApi}/api/file/upload`"
multiple
:headers="httpHeaders"
:limit="1"
:on-success="upFileSuccessSafety"
:on-remove="upFileRemoveSafety"
:on-error="upFileError"
:on-exceed="upFileExceed"
:before-upload="upFileBefore"
:on-preview="openFile"
:file-list="mainDataEditing._safetyLicenseFileListShow"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">图片不要超过20M,仅支持jpeg、png格式</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<div>
<el-form-item label="安全许可有效期:" prop="safetyLicenseBeginDate">
<el-date-picker v-model="mainDataEditing.safetyLicenseBeginDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</div>
<div>
<el-form-item label="至:" prop="safetyLicenseEndDate">
<el-date-picker v-model="mainDataEditing.safetyLicenseEndDate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" style="width: 100%;" />
</el-form-item>
</div>
</el-col>
</el-row>
<el-divider content-position="center">位置</el-divider>
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="经度:" prop="longitude">
<el-input-number v-model="mainDataEditing.longitude" :precision="6" :controls="false" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="纬度:" prop="latitude">
<el-input-number v-model="mainDataEditing.latitude" :precision="6" :controls="false" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="100">
<el-col :span="18">
<el-form-item label="位置地图:">
<AMapSearchPointAdd :is-search="true" :point="mapPoint4add" @choosePoint="choosePoint" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="addCompanyShow=false">取消</el-button>
<el-button type="primary" @click="confirmAdd">确认</el-button>
</div>
</el-dialog>
<!--企业信息窗--> <!--企业信息窗-->
<el-dialog append-to-body :close-on-click-modal="true" :visible.sync="dialog1Show" :title="'企业信息'" width="1160px"> <el-dialog append-to-body :close-on-click-modal="true" :visible.sync="dialog1Show" :title="'企业信息'" width="1160px">
<el-form ref="mainForm" :model="dialog1Data" size="mini" label-width="170px"> <el-form ref="mainForm" :model="dialog1Data" size="mini" label-width="170px">
...@@ -25,20 +298,20 @@ ...@@ -25,20 +298,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="统一社会信用代码:" prop="idCode"> <el-form-item label="公司地址:" prop="address">
<span>{{ dialog1Data.idCode }}</span> <span>{{ dialog1Data.address }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="行政区域:" prop="administrativeAreaCode"> <el-form-item label="所属区域:">
<span>{{ dialog1Data.administrativeAreaName }}</span> <span>{{ dialog1Data.deptName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公司地址:" prop="address"> <el-form-item label="所属集团:">
<span>{{ dialog1Data.address }}</span> <span>{{ dialog1Data.pName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -147,6 +420,11 @@ ...@@ -147,6 +420,11 @@
<span>{{ dialog1Data.businessAddress }}</span> <span>{{ dialog1Data.businessAddress }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="统一社会信用代码:" prop="idCode">
<span>{{ dialog1Data.idCode }}</span>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-divider content-position="left">证书</el-divider> <el-divider content-position="left">证书</el-divider>
<el-row :gutter="20"> <el-row :gutter="20">
...@@ -279,24 +557,96 @@ ...@@ -279,24 +557,96 @@
<script> <script>
import enterpriseApi from '@/api/kd/enterprise' import enterpriseApi from '@/api/kd/enterprise'
import dictionaryApi from '@/api/kd/dictionary'
import AMapSearchPoint from '@/components/AMap/AMapSearchPoint' import AMapSearchPoint from '@/components/AMap/AMapSearchPoint'
import AMapSearchPointAdd from '@/components/AMap/AMapSearchPointAdd'
import { getDeptList } from '@/api/system/dept'
import {getCompanyList} from '@/api/system/user'
import request from '@/utils/request'
import administrativeAreaApi from '@/api/kd/administrativeArea'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { downloadFile } from '@/utils' import { downloadFile } from '@/utils'
import { getToken } from '@/utils/auth'
import { validatePhone } from '@/utils/validate'
const searchParam = {// 默认搜索条件 const searchParam = {// 默认搜索条件
page: 1, page: 1,
count: 10, count: 10,
searchCount: true searchCount: true,
nameLike: '',
auditState: ''
} }
export default { export default {
name: 'CEnterprise', // 本页面名 name: 'CEnterprise', // 本页面名
components: { AMapSearchPoint }, components: { AMapSearchPoint, AMapSearchPointAdd },
data() { data() {
return { return {
/**
* 新增字段
*/
httpHeaders: {
'Authorization': getToken()
},
addCompanyShow: false,
mainDataEditing: {},
dict1List: [],
dict2List: [],
dict3List: [],
dict4List: [],
dict5List: [],
dict6List: [],
dict7List: [],
dict41List: [], // 企业类型
administrativeAreaList: [],
options4enterpriseIdList: [],
dialog1FormRules: {
code: [{ required: true, message: '请输入' }]
},
mainFormRules: {
name: [{ required: true, message: '请输入' }],
idCode: [{ required: true, message: '请输入' }],
_administrativeAreaCascade: [{ required: true, message: '请选择' }],
address: [{ required: true, message: '请输入' }],
dict1: [{ required: true, message: '请选择' }],
dict2: [{ required: true, message: '请选择' }],
dict3: [{ required: true, message: '请选择' }],
hasRegisteredCapital: [{ required: true, message: '请选择' }],
registeredCapital: [{ required: true, message: '请输入' }],
businessScope: [{ required: true, message: '请输入' }],
setupDate: [{ required: true, message: '请选择' }],
beginLimitDate: [{ required: true, message: '请选择' }],
endLimitDate: [{ required: true, message: '请选择' }],
dict4: [{ required: true, message: '请选择' }],
dict5: [{ required: true, message: '请选择' }],
dict6: [{ required: true, message: '请选择' }],
dict7: [{ required: true, message: '请选择' }],
dict41: [{ required: true, message: '请选择' }],
liablePerson: [{ required: true, message: '请输入' }],
liablePersonPhone: [{ required: true, trigger: 'blur', validator: validatePhone }],
businessAddress: [{ required: true, message: '请输入' }],
longitude: [{ required: true, message: '请选择位置' }],
latitude: [{ required: true, message: '请选择位置' }],
_workLicenseFileList: [{ required: true, message: '请选择' }],
workLicenseBeginDate: [{ required: true, message: '请选择' }],
workLicenseEndDate: [{ required: true, message: '请选择' }],
_safetyLicenseFileList: [{ required: true, message: '请选择' }],
safetyLicenseBeginDate: [{ required: true, message: '请选择' }],
safetyLicenseEndDate: [{ required: true, message: '请选择' }]
},
searching: false, searching: false,
exporting: false, exporting: false,
enterpriseApi: enterpriseApi, enterpriseApi: enterpriseApi,
searchParam: {}, searchParam: {
nameLike: '',
auditState: ''
},
searchResult: { searchResult: {
total: 0, total: 0,
results: [] // 搜索结果 results: [] // 搜索结果
...@@ -321,13 +671,172 @@ export default { ...@@ -321,13 +671,172 @@ export default {
return [this.dialog1Data.longitude * 1, this.dialog1Data.latitude * 1] return [this.dialog1Data.longitude * 1, this.dialog1Data.latitude * 1]
} }
return null return null
},
mapPoint4add() {
if (this.mainDataEditing.longitude && this.mainDataEditing.latitude) {
return [this.mainDataEditing.longitude * 1, this.mainDataEditing.latitude * 1]
}
return null
} }
}, },
mounted() { mounted() {
// administrativeAreaApi.cascadeElementUI().then(response => {
// this.administrativeAreaList = response.results
// })
getDeptList({
}).then((res) => {
this.administrativeAreaList = res.body.content;
});
getCompanyList({
// deptId
})
.then((res) => {
this.options4enterpriseIdList = res.body;
});
const dictGroups = [1, 2, 3, 4, 5, 6, 7]
dictGroups.forEach(i => {
dictionaryApi.getList({ 'groupCode': i }).then(response => {
this['dict' + i + 'List'] = response.results
})
})
this.searchParamReset() this.searchParamReset()
this.searchSubmit() this.searchSubmit()
}, },
methods: { methods: {
/**
* 企业新增
*/
confirmAdd(){
this.$refs.addCompanyForm.validate((valid) => {
if (valid) {
if (this.mainDataEditing.beginLimitDate >= this.mainDataEditing.endLimitDate) {
this.$message.error('经营期限(起)应小于经营期限(止)')
} else if (this.mainDataEditing.workLicenseBeginDate >= this.mainDataEditing.workLicenseEndDate) {
this.$message.error('采矿许可有效期(起)应小于采矿许可有效期(止)')
} else if (this.mainDataEditing.safetyLicenseBeginDate >= this.mainDataEditing.safetyLicenseEndDate) {
this.$message.error('安全许可有效期(起)应小于安全许可有效期(止)')
}else{
this.addCompanyLoading = true
this.mainDataEditing.deptId = this.mainDataEditing._administrativeAreaCascade[this.mainDataEditing._administrativeAreaCascade.length - 1]
delete this.mainDataEditing._administrativeAreaCascade
if (this.mainDataEditing._workLicenseFileList) {
this.mainDataEditing.workLicenseFilePath = JSON.stringify(this.mainDataEditing._workLicenseFileList)
}
if (this.mainDataEditing._safetyLicenseFileList) {
this.mainDataEditing.safetyLicenseFilePath = JSON.stringify(this.mainDataEditing._safetyLicenseFileList)
}
request({
url: 'api/enterprise/add/enterpriseList',
method: 'post',
data: this.mainDataEditing
}).then(() => {
this.addCompanyLoading = false
this.addCompanyShow = false
this.$message({
message: '操作完成',
type: 'success'
})
this.searchSubmit()
}).catch(() => {
this.addCompanyLoading = false
this.addCompanyShow = false
})
}
}else{
this.$message({
message: '填写不满足要求,请检查',
type: 'error'
})
}
});
},
add(){
this.addCompanyShow = true
},
elementuiUpListFormat(fileList) {
const filePathArray = []
fileList.forEach(f => {
if (f.response && f.response.result) {
filePathArray.push({
name: f.name,
url: f.response.result
})
} else if (f.name && f.url) {
filePathArray.push({
name: f.name,
url: f.url
})
}
})
return filePathArray
},
upFileSuccessWork(response, file, fileList) {
if (!this.mainDataEditing._workLicenseFileList) {
this.mainDataEditing._workLicenseFileList = []
}
this.mainDataEditing._workLicenseFileList.push({
name: file.name,
url: response.result
})
this.$set(this.mainDataEditing, '_workLicenseFileList', this.mainDataEditing._workLicenseFileList)
},
upFileRemoveWork(file, fileList) {
this.mainDataEditing._workLicenseFileList = this.elementuiUpListFormat(fileList)
},
upFileSuccessSafety(response, file, fileList) {
if (!this.mainDataEditing._safetyLicenseFileList) {
this.mainDataEditing._safetyLicenseFileList = []
}
this.mainDataEditing._safetyLicenseFileList.push({
name: file.name,
url: response.result
})
this.$set(this.mainDataEditing, '_safetyLicenseFileList', this.mainDataEditing._safetyLicenseFileList)
},
upFileRemoveSafety(file, fileList) {
this.mainDataEditing._safetyLicenseFileList = this.elementuiUpListFormat(fileList)
},
upFileError() {
this.$message.error('上传失败,请稍后再试')
},
upFileExceed() {
this.$message.error('只可以上传一张照片')
},
upFileBefore(file) {
const isIMG = file.type === 'image/jpeg' || file.type === 'image/png'
const isLtSize = file.size / 1024 / 1024 < 20
if (!isIMG) {
this.$message.error('上传图片只能是 JPG/JPEG/PNG 格式')
return false
}
if (!isLtSize) {
this.$message.error('上传图片大小不能超过 20MB')
return false
}
return true
},
openFile(file) {
if (file.url) {
window.open(this.baseApi + '/file' + file.url)
} else if (file.response && file.response.result) {
window.open(this.baseApi + '/file' + file.response.result)
}
},
choosePoint(lnglat) {
console.log(lnglat)
if (lnglat) {
this.$set(this.mainDataEditing, 'longitude', lnglat[0])
this.$set(this.mainDataEditing, 'latitude', lnglat[1])
} else {
this.$set(this.mainDataEditing, 'longitude', null)
this.$set(this.mainDataEditing, 'latitude', null)
}
},
searchParamReset() { searchParamReset() {
this.searchParam = JSON.parse(JSON.stringify(searchParam)) this.searchParam = JSON.parse(JSON.stringify(searchParam))
}, },
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
<el-upload <el-upload
v-show="editing" v-show="editing"
class="upload-demo" class="upload-demo"
action="/api/file/upload" :action="`${baseApi}/api/file/upload`"
multiple multiple
:headers="httpHeaders" :headers="httpHeaders"
:limit="1" :limit="1"
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<el-upload <el-upload
v-show="editing" v-show="editing"
class="upload-demo" class="upload-demo"
action="/api/file/upload" :action="`${baseApi}/api/file/upload`"
multiple multiple
:headers="httpHeaders" :headers="httpHeaders"
:limit="1" :limit="1"
......
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
data() { data() {
return { return {
dateScopes: ["本级", "全部"], dateScopes: ["全部", "本级及以下", "自定义",],
defaultProps: { children: 'children', label: 'label', isLeaf: 'leaf' }, defaultProps: { children: 'children', label: 'label', isLeaf: 'leaf' },
level: 3, level: 3,
currentId: 0, currentName: '', menuLoading: false, showButton: false, 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