master
jevononlie 5 months ago
parent 3894e9eb30
commit 40bf1116d6

@ -1,8 +1,8 @@
/* /*
* @Author: 王文杰 * @Author: 王文杰
* @Date: 2024-02-02 14:19:40 * @Date: 2024-02-02 14:19:40
* @LastEditors: 王文杰 * @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-02-29 14:40:37 * @LastEditTime: 2024-05-17 17:43:12
* @FilePath: /jnpf-web/src/utils/apiUrl.js * @FilePath: /jnpf-web/src/utils/apiUrl.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@ -10,5 +10,5 @@ module.exports = {
// 开发环境接口配置 // 开发环境接口配置
// APIURl: 'http://127.0.0.1:30000' // APIURl: 'http://127.0.0.1:30000'
// 测试环境接口配置 // 测试环境接口配置
APIURl: 'http://222.71.165.187:30000' APIURl: 'http://192.168.0.23:30000'
} }

@ -0,0 +1,43 @@
<template>
<el-dialog title="电子围栏" :visible="true" top="20vh" width="50%" append-to-body modal-append-to-body
:before-close="handleClose" class="my-dialog">
<div class="cont">112</div>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
export default {
components: {
},
props: [],
data() {
return {
visible: true,
loading: false,
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
},
mounted() { },
methods: {
handleClose() {
this.$emit('areaVisibleChange', false)
}
},
}
</script>
<style lang="scss" scoped>
.my-dialog {
.cont {
min-height: 600px;
}
}
</style>

@ -1,68 +1,68 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' :'编辑'" <el-dialog :title="!dataForm.id ? '新建' :'编辑'" modal-append-to-body="false" :close-on-click-modal="false"
:close-on-click-modal="false" append-to-body append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" > <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading"> <template v-if="!loading">
{{ areaVisible }}
<!-- 具体表单 --> <!-- 具体表单 -->
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="区域名称" tipLabel="围栏区域名称" prop="areaName">
label="区域名称" tipLabel="围栏区域名称" prop="areaName" > <JnpfInput v-model="dataForm.areaName" @change="changeData('areaName',-1)" placeholder="电子围栏名称" clearable
<JnpfInput v-model="dataForm.areaName" @change="changeData('areaName',-1)" :style='{"width":"100%"}'>
placeholder="电子围栏名称" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="区域类型" tipLabel="请选择围栏类型" prop="areaType">
label="区域类型" tipLabel="请选择围栏类型" prop="areaType" > <JnpfSelect v-model="dataForm.areaType" @change="changeData('areaType',-1)" placeholder="请选择围栏类型"
<JnpfSelect v-model="dataForm.areaType" @change="changeData('areaType',-1)" clearable :style='{"width":"100%"}' :options="areaTypeOptions" :props="areaTypeProps">
placeholder="请选择围栏类型" clearable :style='{"width":"100%"}' :options="areaTypeOptions" :props="areaTypeProps" >
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="是否启用" prop="status">
label="是否启用" prop="status" > <JnpfRadio v-model="dataForm.status" @change="changeData('status',-1)" optionType="default"
<JnpfRadio v-model="dataForm.status" @change="changeData('status',-1)" direction="horizontal" size="small" :options="statusOptions" :props="statusProps">
optionType="default" direction="horizontal" size="small" :options="statusOptions" :props="statusProps" >
</JnpfRadio> </JnpfRadio>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="所属回收站" prop="stationCode">
label="所属回收站" prop="stationCode" >
<JnpfSelect v-model="dataForm.stationCode" @change="changeData('stationCode',-1)" <JnpfSelect v-model="dataForm.stationCode" @change="changeData('stationCode',-1)"
placeholder="选择本组织回收站进行绑定" clearable :style='{"width":"100%"}' :options="stationCodeOptions" :props="stationCodeProps" > placeholder="选择本组织回收站进行绑定" clearable :style='{"width":"100%"}' :options="stationCodeOptions"
:props="stationCodeProps">
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="地图信息" tipLabel="在地图上绘制电子围栏" prop="areaMapInfo">
label="地图信息" tipLabel="在地图上绘制电子围栏" prop="areaMapInfo" > <JnpfInput @focus="handLeArea" v-model="dataForm.areaMapInfo" placeholder="绘制电子围栏区域" :maxlength="65539"
<JnpfInput v-model="dataForm.areaMapInfo" @change="changeData('areaMapInfo',-1)" readonly prefix-icon='ym-custom ym-custom-google-maps' :style='{"width":"100%"}'>
placeholder="绘制电子围栏区域" disabled :maxlength="65539" clearable prefix-icon='ym-custom ym-custom-google-maps' :style='{"width":"100%"}' show-password >
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="区域描述" tipLabel="请输入区域描述" prop="areaDesc">
label="区域描述" tipLabel="请输入区域描述" prop="areaDesc" > <JnpfTextarea v-model="dataForm.areaDesc" @change="changeData('areaDesc',-1)" placeholder="请输入不超过两百字的标题描述"
<JnpfTextarea v-model="dataForm.areaDesc" @change="changeData('areaDesc',-1)" :style='{"width":"100%"}' true type="textarea" :autosize='{"minRows":4,"maxRows":4}'>
placeholder="请输入不超过两百字的标题描述" :style='{"width":"100%"}' true type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
</JnpfTextarea> </JnpfTextarea>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<!-- <el-dialog title="登录" v-if="areaVisible" :visible="true" top="20vh" width="30%" append-to-body
modal-append-to-body>
</el-dialog> -->
<area-dialog v-if="areaVisible" @areaVisibleChange="handleAreaVisibleChange" ref="JNPFForm" />
<!-- 表单结束 --> <!-- 表单结束 -->
</template> </template>
</el-form> </el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" <SelectDialog v-if="1" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/> @close="selectDialogVisible=false" />
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id"> <div class="upAndDown-button" v-if="dataForm.id">
@ -79,20 +79,23 @@
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button> <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import areaDialog from './areaDialog'
import {mapGetters} from "vuex"; import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDefaultCurrentValueUserId } from '@/api/permission/user' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize' import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js' import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { thousandsFormat } from "@/components/Generator/utils/index" import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
export default { import { thousandsFormat } from "@/components/Generator/utils/index"
components: { },
export default {
components: {
areaDialog
},
props: [], props: [],
data() { data() {
return { return {
@ -106,84 +109,71 @@
loading: false, loading: false,
btnLoading: false, btnLoading: false,
formRef: 'formRef', formRef: 'formRef',
setting:{}, setting: {},
eventType: '', eventType: '',
userBoxVisible:false, userBoxVisible: false,
selectDialogVisible: false, selectDialogVisible: false,
currTableConf:{}, currTableConf: {},
dataValueAll:{}, dataValueAll: {},
addTableConf:{ addTableConf: {},
},
// //
ableAll:{ ableAll: {},
}, tableRows: {},
tableRows:{ Vmodel: "",
}, currVmodel: "",
Vmodel:"",
currVmodel:"",
dataForm: { dataForm: {
areaName : undefined, areaName: undefined,
areaType : "1", areaType: "1",
status : "1", status: "1",
stationCode : undefined, stationCode: undefined,
areaMapInfo : undefined, areaMapInfo: undefined,
areaDesc : undefined, areaDesc: undefined,
}, },
tableRequiredData: {}, tableRequiredData: {},
dataRule: dataRule: {
{ areaName: [{
areaName: [
{
required: true, required: true,
message: '电子围栏名称', message: '电子围栏名称',
trigger: 'blur' trigger: 'blur'
}, }, ],
], areaType: [{
areaType: [
{
required: true, required: true,
message: '请至少选择一个', message: '请至少选择一个',
trigger: 'change' trigger: 'change'
}, }, ],
], status: [{
status: [
{
required: true, required: true,
message: '请至少选择一个', message: '请至少选择一个',
trigger: 'change' trigger: 'change'
}, }, ],
], stationCode: [{
stationCode: [
{
required: true, required: true,
message: '选择本组织回收站进行绑定', message: '选择本组织回收站进行绑定',
trigger: 'change' trigger: 'change'
}, }, ],
], areaMapInfo: [{
areaMapInfo: [
{
required: true, required: true,
message: '绘制电子围栏区域', message: '绘制电子围栏区域',
trigger: 'blur' trigger: 'blur'
}, }, ],
], },
}, areaTypeOptions: [],
areaTypeOptions:[], areaTypeProps: { "label": "fullName", "value": "enCode" },
areaTypeProps:{"label":"fullName","value":"enCode" }, statusOptions: [],
statusOptions:[], statusProps: { "label": "fullName", "value": "enCode" },
statusProps:{"label":"fullName","value":"enCode" }, stationCodeOptions: [],
stationCodeOptions:[], stationCodeProps: { "label": "fullName", "value": "id" },
stationCodeProps:{"label":"fullName","value":"id" }, childIndex: -1,
childIndex:-1, isEdit: false,
isEdit:false,
interfaceRes: { interfaceRes: {
areaName:[] , areaName: [],
areaType:[] , areaType: [],
status:[] , status: [],
stationCode:[] , stationCode: [],
areaMapInfo:[] , areaMapInfo: [],
areaDesc:[] , areaDesc: [],
}, },
areaVisible: false
} }
}, },
computed: { computed: {
@ -225,7 +215,7 @@
}, },
getInfo(id) { getInfo(id) {
request({ request({
url: '/api/scm/StationArea/'+ id, url: '/api/scm/StationArea/' + id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
@ -235,6 +225,9 @@
this.visible = false this.visible = false
this.$emit('refreshDataList', true) this.$emit('refreshDataList', true)
}, },
handLeArea() {
this.areaVisible = true
},
changeData(model, index) { changeData(model, index) {
this.isEdit = false this.isEdit = false
this.childIndex = index this.childIndex = index
@ -249,7 +242,7 @@
for (let i = 0; i < faceReList.length; i++) { for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) { if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options'; let options = 'get' + key + 'Options';
if(this[options]){ if (this[options]) {
this[options]() this[options]()
} }
this.changeData(key, index) this.changeData(key, index)
@ -258,8 +251,8 @@
} }
} }
}, },
changeDataFormData(type, data, model,index,defaultValue) { changeDataFormData(type, data, model, index, defaultValue) {
if(!this.isEdit) { if (!this.isEdit) {
if (type == 2) { if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) { for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) { if (index == -1) {
@ -273,7 +266,7 @@
} }
} }
}, },
dataAll(){ dataAll() {
this.getareaTypeOptions(); this.getareaTypeOptions();
this.getstatusOptions(); this.getstatusOptions();
this.getstationCodeOptions(); this.getstationCodeOptions();
@ -293,30 +286,30 @@
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.stationCode)) let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.stationCode))
for (let i = 0; i < templateJsonList.length; i++) { for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i]; let json = templateJsonList[i];
if(json.relationField){ if (json.relationField) {
let relationFieldAll = json.relationField.split("-"); let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue; let val = json.defaultValue;
if(relationFieldAll.length>1 && index>-1){ if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0]+'List']&&this.dataForm[relationFieldAll[0]+'List'].length?this.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:'' val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
}else { } else {
val = this.dataForm[relationFieldAll] val = this.dataForm[relationFieldAll]
} }
json.defaultValue = val json.defaultValue = val
} }
} }
let template ={ let template = {
paramList:templateJsonList paramList: templateJsonList
} }
getDataInterfaceRes('520259300875047493',template).then(res => { getDataInterfaceRes('520259300875047493', template).then(res => {
let data = res.data let data = res.data
this.stationCodeOptions = data this.stationCodeOptions = data
this.changeDataFormData(1,'stationCode','stationCode',index,'') this.changeDataFormData(1, 'stationCode', 'stationCode', index, '')
}) })
}, },
clearData(){ clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll)) this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
}, },
init(id,isDetail,allList) { init(id, isDetail, allList) {
this.prevDis = false this.prevDis = false
this.nextDis = false this.nextDis = false
this.allList = allList || [] this.allList = allList || []
@ -335,16 +328,16 @@
this.dataForm.id = id || 0; this.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/scm/StationArea/'+this.dataForm.id, url: '/api/scm/StationArea/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); });
}else{ } else {
this.clearData() this.clearData()
this.initDefaultData() this.initDefaultData()
} }
@ -365,7 +358,7 @@
}) })
}, },
request() { request() {
let _data =this.dataList() let _data = this.dataList()
if (this.dataFormSubmitType == 2) { if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true this.continueBtnLoading = true
} else { } else {
@ -395,13 +388,13 @@
this.$emit('refresh', true) this.$emit('refresh', true)
} }
}) })
}).catch(()=>{ }).catch(() => {
this.btnLoading = false this.btnLoading = false
this.continueBtnLoading = false this.continueBtnLoading = false
}) })
}else{ } else {
request({ request({
url: '/api/scm/StationArea/'+this.dataForm.id, url: '/api/scm/StationArea/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -416,15 +409,15 @@
this.$emit('refresh', true) this.$emit('refresh', true)
} }
}) })
}).catch(()=>{ }).catch(() => {
this.btnLoading = false this.btnLoading = false
this.continueBtnLoading = false this.continueBtnLoading = false
}) })
} }
}, },
openSelectDialog(key) { openSelectDialog(key) {
this.currTableConf=this.addTableConf[key] this.currTableConf = this.addTableConf[key]
this.currVmodel=key this.currVmodel = key
this.selectDialogVisible = true this.selectDialogVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.selectDialog.init() this.$refs.selectDialog.init()
@ -433,8 +426,8 @@
addForSelect(data) { addForSelect(data) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
let t = data[i] let t = data[i]
if(this['get'+this.currVmodel]){ if (this['get' + this.currVmodel]) {
this['get'+this.currVmodel](t) this['get' + this.currVmodel](t)
} }
} }
}, },
@ -501,18 +494,20 @@
} }
return timeDataValue; return timeDataValue;
}, },
dataList(){ dataList() {
var _data = this.dataForm; var _data = this.dataForm;
return _data; return _data;
}, },
dataInfo(dataAll){ dataInfo(dataAll) {
let _dataAll =dataAll let _dataAll = dataAll
this.dataForm = _dataAll this.dataForm = _dataAll
this.isEdit = true this.isEdit = true
this.dataAll() this.dataAll()
this.childIndex=-1 this.childIndex = -1
},
}, },
handleAreaVisibleChange(flag) {
this.areaVisible = flag
} }
},
}
</script> </script>

@ -1,10 +1,3 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
@ -12,17 +5,15 @@
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="所属回收站"> <el-form-item label="所属回收站">
<JnpfSelect v-model="query.stationCode" placeholder="选择本组织回收站进行绑定" clearable <JnpfSelect v-model="query.stationCode" placeholder="选择本组织回收站进行绑定" clearable :options="stationCodeOptions"
:options="stationCodeOptions" :props="stationCodeProps" multiple>
:props="stationCodeProps" multiple >
</JnpfSelect> </JnpfSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="区域类型"> <el-form-item label="区域类型">
<JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable <JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable :options="areaTypeOptions"
:options="areaTypeOptions" :props="areaTypeProps" multiple>
:props="areaTypeProps" multiple >
</JnpfSelect> </JnpfSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -34,21 +25,20 @@
<template v-if="showAll"> <template v-if="showAll">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="是否启用"> <el-form-item label="是否启用">
<JnpfSelect v-model="query.status" placeholder="请选择" clearable <JnpfSelect v-model="query.status" placeholder="请选择" clearable :options="statusOptions"
:options="statusOptions" :props="statusProps">
:props="statusProps" >
</JnpfSelect> </JnpfSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()">{{ areaVisible }}</el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll"> <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开 展开
</el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
收起 收起
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -67,111 +57,85 @@
@click="openSuperQuery()" /> @click="openSuperQuery()" />
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
@click="initData()" />
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod">
:span-method="arraySpanMethod" <el-table-column prop="areaName" label="区域名称" align="left">
>
<el-table-column
prop="areaName"
label="区域名称" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="areaType" label="区域类型" align="left">
prop="areaType"
label="区域类型" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="stationCode" label="所属回收站" align="left">
prop="stationCode"
label="所属回收站" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="status" label="是否启用" align="left">
prop="status"
label="是否启用" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="areaMapInfo" label="地图信息" align="left">
prop="areaMapInfo"
label="地图信息" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="areaDesc" label="区域描述" align="left">
prop="areaDesc"
label="区域描述" align="left"
>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" fixed="right" width="150">
fixed="right" width="150" > <template slot-scope="scope">
<template slot-scope="scope" > <el-button type="text" @click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'">
<el-button type="text"
@click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'" >编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text" v-has="'btn_detail'" <el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
@click="goDetail(scope.row.id)">详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" /> <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" /> <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
@superQuery="superQuery" />
</div> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './form' import JNPFForm from './form'
import Detail from './Detail' import Detail from './Detail'
import ExportBox from '@/components/ExportBox' import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail' import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev' import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user' import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize' import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList' import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index" import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery' import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson' import superQueryJson from './superQueryJson'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
Detail, Detail,
ExportBox,ToFormDetail , SuperQuery ExportBox, ToFormDetail, SuperQuery
}, },
data() { data() {
return { return {
keyword:'', keyword: '',
expandsTree: true, expandsTree: true,
refreshTree: true, refreshTree: true,
toFormDetailVisible:false, toFormDetailVisible: false,
expandObj:{}, expandObj: {},
columnOptions: [], columnOptions: [],
mergeList: [], mergeList: [],
exportList:[], exportList: [],
columnList, columnList,
showAll: false, showAll: false,
@ -180,10 +144,10 @@
uploadBoxVisible: false, uploadBoxVisible: false,
detailVisible: false, detailVisible: false,
query: { query: {
stationCode:undefined, stationCode: undefined,
areaType:undefined, areaType: undefined,
areaName:undefined, areaName: undefined,
status:undefined, status: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -207,12 +171,12 @@
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
exportBoxVisible: false, exportBoxVisible: false,
areaTypeOptions:[], areaTypeOptions: [],
areaTypeProps:{"label":"fullName","value":"enCode" }, areaTypeProps: { "label": "fullName", "value": "enCode" },
statusOptions:[], statusOptions: [],
statusProps:{"label":"fullName","value":"enCode" }, statusProps: { "label": "fullName", "value": "enCode" },
stationCodeOptions:[], stationCodeOptions: [],
stationCodeProps:{"label":"fullName","value":"id" }, stationCodeProps: { "label": "fullName", "value": "id" },
interfaceRes: { interfaceRes: {
}, },
} }
@ -260,9 +224,9 @@
}, },
loadNode(node, resolve) { loadNode(node, resolve) {
const nodeData = node.data const nodeData = node.data
const config ={ const config = {
treeInterfaceId:"", treeInterfaceId: "",
treeTemplateJson:[] treeTemplateJson: []
} }
if (config.treeInterfaceId) { if (config.treeInterfaceId) {
// //
@ -341,7 +305,7 @@
} }
}) })
newList.forEach(item => { newList.forEach(item => {
if (item.children && item.children.length ) { if (item.children && item.children.length) {
item.children.forEach((child, index) => { item.children.forEach((child, index) => {
if (index == 0) { if (index == 0) {
this.mergeList.push({ this.mergeList.push({
@ -395,13 +359,13 @@
this.statusOptions = res.data.list this.statusOptions = res.data.list
}) })
}, },
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
@ -420,16 +384,16 @@
...this.query, ...this.query,
keyword: this.keyword, keyword: this.keyword,
dataType: 0, dataType: 0,
menuId:this.menuId, menuId: this.menuId,
moduleId:'560427626187981125', moduleId: '560427626187981125',
type:1, type: 1,
}; };
request({ request({
url: `/api/scm/StationArea/getList`, url: `/api/scm/StationArea/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list =res.data.list; var _list = res.data.list;
this.list = _list.map(o => ({ this.list = _list.map(o => ({
...o, ...o,
...this.expandObj, ...this.expandObj,
@ -457,10 +421,10 @@
}).catch(() => { }).catch(() => {
}); });
}, },
handelUpload(){ handelUpload() {
this.uploadBoxVisible = true this.uploadBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.UploadBox.init("","scm/StationArea") this.$refs.UploadBox.init("", "scm/StationArea")
}) })
}, },
openSuperQuery() { openSuperQuery() {
@ -475,10 +439,10 @@
this.initData() this.initData()
}, },
addOrUpdateHandle(row, isDetail) { addOrUpdateHandle(row, isDetail) {
let id = row?row.id:"" let id = row ? row.id : ""
this.formVisible = true this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail,this.list) this.$refs.JNPFForm.init(id, isDetail, this.list)
}) })
}, },
exportData() { exportData() {
@ -488,7 +452,7 @@
}) })
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({ request({
url: `/api/scm/StationArea/Actions/Export`, url: `/api/scm/StationArea/Actions/Export`,
method: 'post', method: 'post',
@ -501,10 +465,10 @@
}) })
}, },
search() { search() {
this.listQuery.currentPage=1 this.listQuery.currentPage = 1
this.listQuery.pageSize=20 this.listQuery.pageSize = 20
this.listQuery.sort="desc" this.listQuery.sort = "desc"
this.listQuery.sidx="" this.listQuery.sidx = ""
this.initData() this.initData()
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
@ -518,7 +482,7 @@
colseFlow(isrRefresh) { colseFlow(isrRefresh) {
this.flowVisible = false this.flowVisible = false
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
},
} }
} }
}
</script> </script>

Loading…
Cancel
Save