|
@@ -0,0 +1,849 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="addEdit-block">
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ class="add-update-preview"
|
|
|
|
|
+ ref="ruleForm"
|
|
|
|
|
+ :model="ruleForm"
|
|
|
|
|
+ :rules="rules"
|
|
|
|
|
+ label-width="180px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template >
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="地区" prop="region" >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ v-model="ruleForm.regionId"
|
|
|
|
|
+ placeholder="请选择县旗"
|
|
|
|
|
+ :disabled="type == 'view'"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ :readonly="ro.region"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in regionList"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="地区" prop="region" >
|
|
|
|
|
+ <el-input v-model="ruleForm.region" placeholder="地区" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="变电站" prop="substation" >
|
|
|
|
|
+ <el-input v-model="ruleForm.substation" placeholder="变电站" :disabled="ro.substation"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="变电站" prop="substation" >
|
|
|
|
|
+ <el-input v-model="ruleForm.substation" placeholder="变电站" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="电压等级" prop="voltageLevel" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.voltageLevel" placeholder="电压等级" :disabled="ro.voltageLevel"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="电压等级" prop="voltageLevel" >
|
|
|
|
|
+ <el-input v-model="ruleForm.voltageLevel" placeholder="电压等级" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="主变台数" prop="mainNum" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.mainNum" placeholder="主变台数" :disabled="ro.mainNum"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="主变台数" prop="mainNum" >
|
|
|
|
|
+ <el-input v-model="ruleForm.mainNum" placeholder="主变台数" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="主变容量(MVA)" prop="capacity" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.capacity" placeholder="主变容量(MVA)" :disabled="ro.capacity"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="主变容量(MVA)" prop="capacity" >
|
|
|
|
|
+ <el-input v-model="ruleForm.capacity" placeholder="主变容量(MVA)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="户均电采暖容量(kw)" prop="averagePower" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.averagePower" placeholder="户均电采暖容量(kw)" clearable :readonly="ro.averagePower"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="户均电采暖容量(kw)" prop="averagePower" >
|
|
|
|
|
+ <el-input v-model="ruleForm.averagePower" placeholder="户均电采暖容量(kw)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2025)" prop="joinElectricHeatingNum25" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum25" placeholder="新增电采暖户数(2025)" :disabled="ro.joinElectricHeatingNum25"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2025)" prop="joinElectricHeatingNum25" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum25" placeholder="新增电采暖户数(2025)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2026)" prop="joinElectricHeatingNum26" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum26" placeholder="新增电采暖户数(2025)" :disabled="ro.joinElectricHeatingNum26"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2026)" prop="joinElectricHeatingNum26" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum26" placeholder="新增电采暖户数(2026)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2027)" prop="joinElectricHeatingNum27" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum27" placeholder="新增电采暖户数(2027)" :disabled="ro.joinElectricHeatingNum27"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2027)" prop="joinElectricHeatingNum27" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum27" placeholder="新增电采暖户数(2027)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2028)" prop="joinElectricHeatingNum28" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum28" placeholder="新增电采暖户数(2028)" :disabled="ro.joinElectricHeatingNum28"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2028)" prop="joinElectricHeatingNum28" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum28" placeholder="新增电采暖户数(2028)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2029)" prop="joinElectricHeatingNum29" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum29" placeholder="新增电采暖户数(2029)" :disabled="ro.joinElectricHeatingNum29"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2029)" prop="joinElectricHeatingNum29" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum29" placeholder="新增电采暖户数(2029)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="input" v-if="type!='info'" label="新增电采暖户数(2030)" prop="joinElectricHeatingNum30" >
|
|
|
|
|
+ <el-input-number v-model="ruleForm.joinElectricHeatingNum30" placeholder="新增电采暖户数(2030)" :disabled="ro.joinElectricHeatingNum30"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item v-else class="input" label="新增电采暖户数(2030)" prop="joinElectricHeatingNum30" >
|
|
|
|
|
+ <el-input v-model="ruleForm.joinElectricHeatingNum30" placeholder="新增电采暖户数(2030)" readonly></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-form-item class="btn">
|
|
|
|
|
+ <el-button class="btn3" v-if="type!='info'" type="success" @click="onSubmit">
|
|
|
|
|
+ <span class="icon iconfont icon-xihuan"></span>
|
|
|
|
|
+ 提交
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button class="btn4" v-if="type!='info'" type="success" @click="back()">
|
|
|
|
|
+ <span class="icon iconfont icon-xihuan"></span>
|
|
|
|
|
+ 取消
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button class="btn5" v-if="type=='info'" type="success" @click="back()">
|
|
|
|
|
+ <span class="icon iconfont icon-xihuan"></span>
|
|
|
|
|
+ 返回
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+ import {
|
|
|
|
|
+ isNumber,
|
|
|
|
|
+ isIntNumer,
|
|
|
|
|
+ } from "@/utils/validate";
|
|
|
|
|
+ export default {
|
|
|
|
|
+ data() {
|
|
|
|
|
+ var validateNumber = (rule, value, callback) => {
|
|
|
|
|
+ if(!value){
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else if (!isNumber(value)) {
|
|
|
|
|
+ callback(new Error("请输入数字"));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ var validateIntNumber = (rule, value, callback) => {
|
|
|
|
|
+ if(!value){
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else if (!isIntNumer(value)) {
|
|
|
|
|
+ callback(new Error("请输入整数"));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ type: '',
|
|
|
|
|
+ regionList: [],
|
|
|
|
|
+
|
|
|
|
|
+ ro:{
|
|
|
|
|
+ region : false,
|
|
|
|
|
+ substation : false,
|
|
|
|
|
+ voltageLevel : false,
|
|
|
|
|
+ mainNum : false,
|
|
|
|
|
+ capacity : false,
|
|
|
|
|
+ peakLoad : false,
|
|
|
|
|
+ averagePower : false,
|
|
|
|
|
+ joinElectricHeatingNum25 : false,
|
|
|
|
|
+ joinElectricHeatingNum26 : false,
|
|
|
|
|
+ joinElectricHeatingNum27 : false,
|
|
|
|
|
+ joinElectricHeatingNum28 : false,
|
|
|
|
|
+ joinElectricHeatingNum29 : false,
|
|
|
|
|
+ joinElectricHeatingNum30 : false,
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ ruleForm: {
|
|
|
|
|
+ region: '',
|
|
|
|
|
+ substation: '',
|
|
|
|
|
+ voltageLevel: '',
|
|
|
|
|
+ mainNum: '',
|
|
|
|
|
+ capacity: '',
|
|
|
|
|
+ peakLoad: '',
|
|
|
|
|
+ averagePower: 0,
|
|
|
|
|
+ joinElectricHeatingNum25 : 0,
|
|
|
|
|
+ joinElectricHeatingNum26 : 0,
|
|
|
|
|
+ joinElectricHeatingNum27 : 0,
|
|
|
|
|
+ joinElectricHeatingNum28 : 0,
|
|
|
|
|
+ joinElectricHeatingNum29 : 0,
|
|
|
|
|
+ joinElectricHeatingNum30 : 0
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ rules: {
|
|
|
|
|
+
|
|
|
|
|
+ region: [
|
|
|
|
|
+ ],
|
|
|
|
|
+ substation: [
|
|
|
|
|
+ ],
|
|
|
|
|
+ voltageLevel: [
|
|
|
|
|
+ { validator: validateNumber, trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ mainNum: [
|
|
|
|
|
+ { validator: validateNumber, trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ capacity: [
|
|
|
|
|
+ { validator: validateNumber, trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ peakLoad: [
|
|
|
|
|
+ { validator: validateNumber, trigger: 'blur' },
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ props: ["parent"],
|
|
|
|
|
+ computed: {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ components: {
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getRegionList();
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ // 获取公司列表
|
|
|
|
|
+ async getRegionList() {
|
|
|
|
|
+ this.regionList = [];
|
|
|
|
|
+ const { data } = await this.$http({
|
|
|
|
|
+ url: `/company/lists`,
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ params: {
|
|
|
|
|
+ cityId: this.ruleForm.cityId,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ this.regionList = data.data.map(item => ({
|
|
|
|
|
+ label: item.compName,
|
|
|
|
|
+ value: item.id,
|
|
|
|
|
+ }));
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 下载
|
|
|
|
|
+ download(file){
|
|
|
|
|
+ window.open(`${file}`)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 初始化
|
|
|
|
|
+ init(id,type) {
|
|
|
|
|
+ if (id) {
|
|
|
|
|
+ this.id = id;
|
|
|
|
|
+ this.type = type;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.type=='info'||this.type=='else'||this.type=='msg'){
|
|
|
|
|
+ this.info(id);
|
|
|
|
|
+ }else if(this.type=='logistics'){
|
|
|
|
|
+ for(let x in this.ro) {
|
|
|
|
|
+ this.ro[x] = true
|
|
|
|
|
+ }
|
|
|
|
|
+ this.logistics=false;
|
|
|
|
|
+ this.info(id);
|
|
|
|
|
+ }else if(this.type=='cross'){
|
|
|
|
|
+ var obj = this.$storage.getObj('crossObj');
|
|
|
|
|
+ for (var o in obj){
|
|
|
|
|
+
|
|
|
|
|
+ if(o=='region'){
|
|
|
|
|
+ this.ruleForm.region = obj[o];
|
|
|
|
|
+ this.ro.region = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='substation'){
|
|
|
|
|
+ this.ruleForm.substation = obj[o];
|
|
|
|
|
+ this.ro.substation = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='voltageLevel'){
|
|
|
|
|
+ this.ruleForm.voltageLevel = obj[o];
|
|
|
|
|
+ this.ro.voltageLevel = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='mainNum'){
|
|
|
|
|
+ this.ruleForm.mainNum = obj[o];
|
|
|
|
|
+ this.ro.mainNum = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='capacity'){
|
|
|
|
|
+ this.ruleForm.capacity = obj[o];
|
|
|
|
|
+ this.ro.capacity = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='peakLoad'){
|
|
|
|
|
+ this.ruleForm.peakLoad = obj[o];
|
|
|
|
|
+ this.ro.peakLoad = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='averagePower'){
|
|
|
|
|
+ this.ruleForm.averagePower = obj[o];
|
|
|
|
|
+ this.ro.averagePower = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum25'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum25 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum25 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum25'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum25 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum25 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum26'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum26 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum26 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum27'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum27 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum27 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum28'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum28 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum28 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum29'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum29 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum29 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(o=='joinElectricHeatingNum30'){
|
|
|
|
|
+ this.ruleForm.joinElectricHeatingNum30 = obj[o];
|
|
|
|
|
+ this.ro.joinElectricHeatingNum30 = true;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 获取用户信息
|
|
|
|
|
+ this.$http({
|
|
|
|
|
+ url: `${this.$storage.get('sessionTable')}/session`,
|
|
|
|
|
+ method: "get"
|
|
|
|
|
+ }).then(({ data }) => {
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ var json = data.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(data.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ // 多级联动参数
|
|
|
|
|
+
|
|
|
|
|
+ info(id) {
|
|
|
|
|
+ this.$http({
|
|
|
|
|
+ url: `substation/info/${id}`,
|
|
|
|
|
+ method: "get"
|
|
|
|
|
+ }).then(({ data }) => {
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ this.ruleForm = data.data;
|
|
|
|
|
+ //解决前台上传图片后台不显示的问题
|
|
|
|
|
+ let reg=new RegExp('../../../upload','g')//g代表全部
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(data.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 提交
|
|
|
|
|
+ async onSubmit() {
|
|
|
|
|
+ var objcross = this.$storage.getObj('crossObj');
|
|
|
|
|
+ if(!this.ruleForm.id) {
|
|
|
|
|
+ delete this.ruleForm.userid
|
|
|
|
|
+ }
|
|
|
|
|
+ await this.$refs["ruleForm"].validate(async valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ if(this.type=='cross'){
|
|
|
|
|
+ var statusColumnName = this.$storage.get('statusColumnName');
|
|
|
|
|
+ var statusColumnValue = this.$storage.get('statusColumnValue');
|
|
|
|
|
+ if(statusColumnName!='') {
|
|
|
|
|
+ var obj = this.$storage.getObj('crossObj');
|
|
|
|
|
+ if(statusColumnName && !statusColumnName.startsWith("[")) {
|
|
|
|
|
+ for (var o in obj){
|
|
|
|
|
+ if(o==statusColumnName){
|
|
|
|
|
+ obj[o] = statusColumnValue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ var table = this.$storage.get('crossTable');
|
|
|
|
|
+ await this.$http({
|
|
|
|
|
+ url: `${table}/update`,
|
|
|
|
|
+ method: "post",
|
|
|
|
|
+ data: obj
|
|
|
|
|
+ }).then(({ data }) => {});
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ await this.$http({
|
|
|
|
|
+ url: `substation/${!this.ruleForm.id ? "save" : "update"}`,
|
|
|
|
|
+ method: "post",
|
|
|
|
|
+ data: this.ruleForm
|
|
|
|
|
+ }).then(async ({ data }) => {
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "操作成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ duration: 1500,
|
|
|
|
|
+ onClose: () => {
|
|
|
|
|
+ this.parent.showFlag = true;
|
|
|
|
|
+ this.parent.addOrUpdateFlag = false;
|
|
|
|
|
+ this.parent.rainfalldataCrossAddOrUpdateFlag = false;
|
|
|
|
|
+ this.parent.search();
|
|
|
|
|
+ this.parent.contentStyleChange();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(data.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取uuid
|
|
|
|
|
+ getUUID () {
|
|
|
|
|
+ return new Date().getTime();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 返回
|
|
|
|
|
+ back() {
|
|
|
|
|
+ this.parent.showFlag = true;
|
|
|
|
|
+ this.parent.addOrUpdateFlag = false;
|
|
|
|
|
+ this.parent.rainfalldataCrossAddOrUpdateFlag = false;
|
|
|
|
|
+ this.parent.contentStyleChange();
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ .addEdit-block {
|
|
|
|
|
+ padding: 30px;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview {
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+ padding: 40px 25% 40px 18%;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-color: #eee;
|
|
|
|
|
+ border-width: 1px;
|
|
|
|
|
+ border-style: solid;
|
|
|
|
|
+ }
|
|
|
|
|
+ .amap-wrapper {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 500px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .search-box {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-date-editor.el-input {
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview ::v-deep .el-form-item {
|
|
|
|
|
+ border: 0px solid #eee;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 0 0 22px 0;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-form-item ::v-deep .el-form-item__label {
|
|
|
|
|
+ padding: 0 10px 0 0;
|
|
|
|
|
+ color: #6e6e6e;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ width: 180px;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 40px;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview .el-form-item ::v-deep .el-form-item__content {
|
|
|
|
|
+ margin-left: 180px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-form-item span.text {
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 40px;
|
|
|
|
|
+ min-width: 50%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview .el-input {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input ::v-deep .el-input__inner {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ min-width: 50%;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input ::v-deep .el-input__inner[readonly="readonly"] {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input-number {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input-number ::v-deep .el-input__inner {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ min-width: 50%;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input-number ::v-deep .is-disabled .el-input__inner {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input-number ::v-deep .el-input-number__decrease {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-input-number ::v-deep .el-input-number__increase {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-select {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-select ::v-deep .el-input__inner {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-select ::v-deep .is-disabled .el-input__inner {
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-date-editor {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-date-editor ::v-deep .el-input__inner {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 10px 0 30px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-date-editor ::v-deep .el-input__inner[readonly="readonly"] {
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 10px 0 30px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .viewBtn {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 15px;
|
|
|
|
|
+ margin: 0 20px 0 0;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 34px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .viewBtn:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .downBtn {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 0 15px;
|
|
|
|
|
+ margin: 0 20px 0 0;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 34px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .downBtn:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .unBtn {
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 0 0px;
|
|
|
|
|
+ margin: 0 20px 0 0;
|
|
|
|
|
+ outline: none;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ line-height: 40px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .unBtn:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview ::v-deep .el-upload--picture-card {
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ border-radius: 0;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ line-height: initial;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview ::v-deep .upload .upload-img {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 90px;
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ line-height: 60px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview ::v-deep .el-upload-list .el-upload-list__item {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 90px;
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ line-height: 60px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview ::v-deep .el-upload .el-icon-plus {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 90px;
|
|
|
|
|
+ font-size: 24px;
|
|
|
|
|
+ line-height: 60px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview ::v-deep .el-upload__tip {
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .add-update-preview .el-textarea ::v-deep .el-textarea__inner {
|
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ min-height: 150px;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-textarea ::v-deep .el-textarea__inner[readonly="readonly"] {
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+ border-radius: 0px;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ min-width: 400px;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .add-update-preview .el-form-item.btn {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 20px 0 0;
|
|
|
|
|
+ .btn1 {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #0356bb;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ min-width: 110px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn1:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn2 {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #39c9ee;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ min-width: 110px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn2:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn3 {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #6ea0dc;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ min-width: 110px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn3:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn4 {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #4abcff;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ min-width: 110px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn4:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn5 {
|
|
|
|
|
+ border: 0px solid #ccc;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ margin: 0 10px 0 0;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #0977fd;
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ min-width: 110px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .iconfont {
|
|
|
|
|
+ margin: 0 2px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn5:hover {
|
|
|
|
|
+ opacity: 0.8;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|