Browse Source

组件化

master
张泽亮 2 months ago
parent
commit
26d6c1a2c9
4 changed files with 433 additions and 247 deletions
  1. +11
    -0
      src/api/app/index.js
  2. +125
    -138
      src/components/form/CommonUpload.vue
  3. +262
    -0
      src/utils/index.js
  4. +35
    -109
      src/views/app/project/operate_edit.vue

+ 11
- 0
src/api/app/index.js View File

@@ -17,3 +17,14 @@ export function addNotice(data) {
data: data
})
}


//上传全局方法附件
export function commonUpload(data) {
return request({
url: '/common/upload',
method: 'post',
header: { "Content-Type": 'application/x-www-form-urlencoded' },
data: data
})
}

+ 125
- 138
src/components/form/CommonUpload.vue View File

@@ -1,158 +1,145 @@
<!-- 通用上传组件 zhao -->

<template>
<van-uploader
v-model="fileList"
:multiple="multiple"
:after-read="afterRead"
:show-upload="showUpload"
:deletable="deletable"
@delete="deleteFile"
:accept="accept || null"
/>
<van-uploader v-model="fileList" :multiple="multiple" :after-read="afterRead" :show-upload="showUpload"
:deletable="deletable" @delete="deleteFile" :accept="accept || null"/>
</template>

<script>

import {commonUpload} from "@/api/sunVillage_info/fixedAssets";
import {commonUpload} from "@/api/app/index";

export default {
name: "commonUpload",
props: {
name: String,
value: { // 绑定值 字符串 ,分隔 可监听
type: String,
default: null,
},
accept: { // 上传类型限制: 默认图片, * = 任意类型
type: String,
},
multiple: { // 多文件上传
type: Boolean,
default: false,
},
deletable: { // 允许删除
type: Boolean,
default: true,
},
showUpload: { // 显示上传按钮
type: Boolean,
default: true,
},
formData: { // 额外请求参数
type: Object,
default: function() {
return {};
export default {
name: "commonUpload",
props: {
name: String,
value: { // 绑定值 字符串 ,分隔 可监听
type: String,
default: null,
},
accept: { // 上传类型限制: 默认图片, * = 任意类型
type: String,
},
multiple: { // 多文件上传
type: Boolean,
default: false,
},
deletable: { // 允许删除
type: Boolean,
default: true,
},
showUpload: { // 显示上传按钮
type: Boolean,
default: true,
},
formData: { // 额外请求参数
type: Object,
default: function () {
return {};
},
},
file: { // 上传文件字段名
type: String,
default: 'file',
},
host: {
type: String, // 文件地址前缀
default: '/api',
},
},
file: { // 上传文件字段名
type: String,
default: 'file',
},
host: {
type: String, // 文件地址前缀
default: '/api',
},
},
watch: {
value: function (newVal, oldVal) {
if(newVal != this.internalValue)
this.setInternalValue(newVal);
watch: {
value: function (newVal, oldVal) {
if (newVal != this.internalValue)
this.setInternalValue(newVal);
},
},
},
created() {
this.parseValue(this.value);
},
data() {
return {
internalValue: this.value,
fileList: [],
pathList: [],
};
},
methods: {
setInternalValue(newVal) {
this.parseValue(newVal);
this.internalValue = newVal;
created() {
this.parseValue(this.value);
},
parseValue(data) {
if(data)
{
this.pathList = data.split(',');
}
else
{
this.pathList = [];
}
this.fileList = this.pathList.map((x) => {
return {
url: this.host + x,
};
});
data() {
return {
internalValue: this.value,
fileList: [],
pathList: [],
};
},
makeFormData() {
let fd = new FormData();
if(this.formData)
{
for(let k of Object.keys(this.formData))
{
fd.set(k, this.formData[k]);
methods: {
setInternalValue(newVal) {
this.parseValue(newVal);
this.internalValue = newVal;
},
parseValue(data) {
if (data) {
this.pathList = data.split(',');
} else {
this.pathList = [];
}
}
return fd;
},
upload(file) {
let params1 = this.makeFormData();
params1.append(this.file, file.file);
return commonUpload(params1).then((resp) => {
this.pathList.push(resp.fileName);
this.updateInternalValue();
this.$emit('upload', resp.fileName);
});
},
afterRead(file) {
this.$toast.loading({
message: "上传中...",
forbidClick: true,
duration: 0,
});
// 此时可以自行将文件上传至服务器
if (file instanceof Array) {//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false
if(file.length > 0)
{
let index = 0;
const f = () => {
if(index >= file.length)
return;
let up = file[index];
//console.log(up);
console.log(`上传文件: ${index} -> ${up.file.name}`);
this.upload(up).then(() => {
index++;
if(index < file.length)
f();
});
this.fileList = this.pathList.map((x) => {
return {
url: this.host + x,
};
f();
});
},
makeFormData() {
let fd = new FormData();
if (this.formData) {
for (let k of Object.keys(this.formData)) {
fd.set(k, this.formData[k]);
}
}
} else {
this.upload(file);
}
},
deleteFile(detail){
this.pathList.splice(detail.index,1);
this.updateInternalValue();
this.$emit('remove', detail.index);
},
updateInternalValue() {
let files = this.pathList.join(',');
console.log(files);
this.internalValue = files;
if(this.internalValue != this.value)
this.$emit('input', this.internalValue);
return fd;
},
upload(file) {
let params1 = this.makeFormData();
params1.append(this.file, file.file);
return commonUpload(params1).then((resp) => {
this.pathList.push(resp.fileName);
this.updateInternalValue();
this.$emit('upload', resp.fileName);
});
},
afterRead(file) {
this.$toast.loading({
message: "上传中...",
forbidClick: true,
duration: 0,
});
// 此时可以自行将文件上传至服务器
if (file instanceof Array) {//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false
if (file.length > 0) {
let index = 0;
const f = () => {
if (index >= file.length)
return;
let up = file[index];
//console.log(up);
//console.log(`上传文件: ${index} -> ${up.file.name}`);
this.upload(up).then(() => {
index++;
if (index < file.length)
f();
});
};
f();
}
} else {
this.upload(file);
}
},
deleteFile(detail) {
this.pathList.splice(detail.index, 1);
this.updateInternalValue();
this.$emit('remove', detail.index);
},
updateInternalValue() {
let files = this.pathList.join(',');
//console.log(files);
this.internalValue = files;
if (this.internalValue != this.value)
this.$emit('input', this.internalValue);
},
},
},
}
}
</script>

<style scoped>


+ 262
- 0
src/utils/index.js View File

@@ -416,3 +416,265 @@ export function save(name, src) {
}
}

/**
* 解析日期时间
* @param date 日期时间字符串 字符串
* @param format 格式化字符串 字符串 默认 yyyy-MM-dd HH:mm:ss
* @param initNow 缺省部分是否使用当前日期时间部分代替 bool 默认不使用当前
* @returns {Date} 解析日期时间出来的Date对象
*/
export function strtotime(date, format, initNow)
{
if (!date)
return null;
let expect = function(target, str) {
if(Array.isArray(target))
{
let res = 0;
if(typeof(target[0]) === 'number')
{
for(let t of target)
{
if(str.length >= t)
{
if(t > res && new RegExp(`^\\d{${t}}`).test(str))
res = t;
}
}
}
else
{
for(let t of target)
{
if(str.length < t.length)
continue;
if(str.startsWith(t))
{
res = t.length;
break;
}
}
}
return res;
}
else
{
if(typeof(target) === 'number')
{
if(str.length < target)
return 0;
if(!new RegExp(`^\\d{${target}}`).test(str))
return null;
return target;
}
else if(typeof(target) === 'object')
{
let res = 0;
let min = target.min || 0;
let max = target.max;
for(let m = min; m <= max; m++)
{
let t = '' + m;
if(str.length >= t.length)
{
if(str.startsWith(t))
res = t.length;
}
}
return res;
}
else
{
if(str.length < target.length)
return 0;
if(!str.startsWith(target))
return 0;
return target.length;
}
}
};
format = format || 'yyyy-MM-dd HH:mm:ss';
let arr = parseDateTimeFormatter(format);
let i = 0;
let _y = undefined;
let _m = undefined;
let _d = undefined;
let _h = undefined;
let _i = undefined;
let _s = undefined;
let _z = undefined;
let _h_12 = undefined;
let _ap = undefined;
let get_token = function(str, target) {
let r = expect(target, date.substr(i));
if(r <= 0)
return null;
let nstr = date.substr(i, r);
i += r;
return nstr;
};
//console.log(arr);
for(let part of arr)
{
if(part.type === DATE_TIME_FORMAT_TYPE_RAW || part.type === DATE_TIME_FORMAT_TYPE_IGNORE)
{
let r = expect(part.str, date.substr(i));
if(!r)
return null;
i += r;
}
else
{
let p = null;
switch(part.str)
{
case 'yyyy':
case '%Y':
p = get_token(part.str, 4);
if(p)
_y = parseInt(p);
break;
case 'yy':
case '%y':
p = get_token(part.str, 2);
if(p)
_y = Math.floor((date.getFullYear()) / 100) * 100 + parseInt(p);
break;
case 'MM':
case '%m':
p = get_token(part.str, 2);
if(p)
_m = parseInt(p);
break;
case 'M':
case '%c':
p = get_token(part.str, {min: 1, max: 12});
if(p)
_m = parseInt(p);
break;
case 'MMMM':
case '%M':
p = get_token(part.str, MONTHS);
if(p)
_m = MONTHS.indexOf(p) + 1;
break;
case 'MMM':
case '%b':
p = get_token(part.str, MONTHS_SIMPLE);
if(p)
_m = MONTHS_SIMPLE.indexOf(p) + 1;
break;
case 'dd':
case '%d':
p = get_token(part.str, 2);
if(p)
_d = parseInt(p);
break;
case 'HH':
case '%H':
p = get_token(part.str, 2);
if(p)
_h = parseInt(p);
break;
case 'H':
case '%k':
p = get_token(part.str, {max: 23});
if(p)
_h = parseInt(p);
break;
case 'hh':
case '%I':
case '%h':
p = get_token(part.str, 2);
if(p)
_h_12 = parseInt(p);
break;
case 'h':
case '%l':
p = get_token(part.str, {max: 12});
if(p)
_h_12 = parseInt(p);
break;
case 'mm':
case 'ii':
case '%i':
p = get_token(part.str, 2);
if(p)
_i = parseInt(p);
break;
case 'm':
case 'i':
p = get_token(part.str, {max: 59});
if(p)
_i = parseInt(p);
break;
case 'ss':
case '%s':
case '%S':
p = get_token(part.str, 2);
if(p)
_s = parseInt(p);
break;
case 's':
p = get_token(part.str, {max: 59});
if(p)
_s = parseInt(p);
break;
case 'sss':
p = get_token(part.str, {max: 999});
if(p)
_z = parseInt(p);
break;
case 'A':
case 'p': {
const AP = ['AM', 'PM'];
p = get_token(part.str, AP);
if(p)
_ap = p.toLowerCase();
}
break;
case 'a':
case 'P':
case '%p':{
const AP = ['am', 'pm'];
p = get_token(part.str, AP);
if(p)
_ap = p;
}
break;
case 'u':
case '%w':
case '%W':
case 'dddd':
case 'ddd':
throw new Error('不支持星期几解析: ' + part.str); // not ignore and throw
//break;
case '%%':
//TODO: ignore 最好不解析出来
break;
default:
throw new Error('不支持的格式解析: ' + part.str);
break;
}
if(!p)
return null;
}
}
if(_h_12 !== undefined && _ap !== undefined)
{
_h = (_ap === 'pm' ? _h_12 + 12 : _h_12) % 24;
}
let res = new Date;
//console.log('1111111111',_y, _m, _d, _h, _i, _s, _z);
if(_y === undefined) _y = initNow ? res.getFullYear() : 0;
if(_m === undefined) _m = initNow ? res.getMonth() + 1 : 1;
if(_d === undefined) _d = initNow ? res.getDate() : 1;
if(_h === undefined) _h = initNow ? res.getHours() : 0;
if(_i === undefined) _i = initNow ? res.getMinutes() : 0;
if(_s === undefined) _s = initNow ? res.getSeconds() : 0;
if(_z === undefined) _z = initNow ? res.getMilliseconds() : 0;
//console.log('2222222222',_y, _m, _d, _h, _i, _s, _z);
res.setFullYear(_y, _m - 1, _d);
res.setHours(_h, _i, _s, _z);
return res;
}

+ 35
- 109
src/views/app/project/operate_edit.vue View File

@@ -3,70 +3,49 @@
<van-nav-bar title="经营信息维护" left-arrow placeholder safe-area-inset-top @click-left="onClickLeft"/>

<van-form @submit="onSubmit">
<div class="main">
<p class="title"><i></i>经营信息</p>
<van-field readonly v-model="form.deptName" label="区域位置名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly required :rules="[{ required: true }]" v-model="form.dkbm" label="地块编码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly :rules="[{ required: true }]" v-model="form.dkmc" label="地块名称" placeholder="请输入" input-align="right" label-width="auto" required />
<van-field readonly v-model="form.dkdz" label="地块东至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkxz" label="地块西至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dknz" label="地块南至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkbz" label="地块北至" placeholder="请输入" input-align="right" label-width="auto" />
<div class="main">
<p class="title"><i></i>经营信息</p>
<van-field readonly v-model="form.deptName" label="区域位置名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly required :rules="[{ required: true }]" v-model="form.dkbm" label="地块编码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly :rules="[{ required: true }]" v-model="form.dkmc" label="地块名称" placeholder="请输入" input-align="right" label-width="auto" required />
<van-field readonly v-model="form.dkdz" label="地块东至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkxz" label="地块西至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dknz" label="地块南至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkbz" label="地块北至" placeholder="请输入" input-align="right" label-width="auto" />

<van-field required :rules="[{ required: true }]" v-model="form.jymj" label="经营面积" placeholder="请输入" input-align="right" label-width="auto" />
<van-field required :rules="[{ required: true }]" v-model="form.jymj" label="经营面积" placeholder="请输入" input-align="right" label-width="auto" />

<van-field required :rules="[{ required: true }]" readonly @click="showJyfsPicker = true" v-model="form.jyfsText" label="经营方式" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJyfsPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.jyfs" value-key="label" @cancel="showJyfsPicker = false" @confirm="onConfirmJyfs"/>
</van-popup>
<field-select v-model="form.jyfs" label="经营方式" value-key="dictLabel" data-key="dictValue" placeholder="请选择" requiredx remote-url="/system/dict/data/type/jyfs" :on-remote-response="'data'" required/>

<van-field readonly @click="showJydxlxPicker = true" v-model="form.jydxlxText" label="经营对象类型" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJydxlxPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.jydxlx" value-key="label" @cancel="showJydxlxPicker = false" @confirm="onConfirmJydxlx"/>
</van-popup>
<field-select v-model="form.jydxlx" label="经营对象类型" value-key="dictLabel" data-key="dictValue" placeholder="请选择" requiredx remote-url="/system/dict/data/type/jydxlx" :on-remote-response="'data'" required/>

<van-field required :rules="[{ required: true }]" v-model="form.jydxmc" label="经营对象名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field required :rules="[{ required: true }]" v-model="form.jydxmc" label="经营对象名称" placeholder="请输入" input-align="right" label-width="auto" />

<van-field readonly @click="showJydxzjlxPicker = true" v-model="form.jydxzjlxText" label="经营对象证件类型" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJydxzjlxPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.zjlx" value-key="label" @cancel="showJydxzjlxPicker = false" @confirm="onConfirmJydxzjlx"/>
</van-popup>
<field-select v-model="form.jydxlx" label="经营对象证件类型" value-key="dictLabel" data-key="dictValue" placeholder="请选择" requiredx remote-url="/system/dict/data/type/zjlx" :on-remote-response="'data'"/>

<van-field v-model="form.jydxzjhm" label="经营对象证件号码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.jydxzjhm" label="经营对象证件号码" placeholder="请输入" input-align="right" label-width="auto" />

<van-field readonly @click="showSfqdhtPicker = true" v-model="form.sfqdhtText" label="是否签订合同" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showSfqdhtPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.is_common" value-key="label" @cancel="showSfqdhtPicker = false" @confirm="onConfirmSfqdht"/>
</van-popup>
<field-radio v-model="form.sfqdht" label="是否签订合同" value-key="dictLabel" data-key="dictValue" remote-url="/system/dict/data/type/is_common" :on-remote-response="'data'" required/>

<van-field required :rules="[{ required: true }]" readonly @click="showJykssjPicker = true" v-model="form.jykssj" label="经营开始时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJykssjPicker" round position="bottom">
<van-datetime-picker v-model="jykssj" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @cancel="showJykssjPicker = false" @confirm="onConfirmJykssj"/>
</van-popup>
<field-date-picker name="jykssj" class="field_no-label" v-model="form.jykssj" label="经营开始时间" placeholder="请选择" formatter="yyyy-MM-dd" input-align="right" type="date" :required="true" size="large"/>

<van-field required :rules="[{ required: true }]" readonly @click="showJyjssjPicker = true" v-model="form.jyjssj" label="经营结束时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJyjssjPicker" round position="bottom">
<van-datetime-picker v-model="jyjssj" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @cancel="showJyjssjPicker = false" @confirm="onConfirmJyjssj"/>
</van-popup>
<field-date-picker name="jyjssj" class="field_no-label" v-model="form.jyjssj" label="经营结束时间" placeholder="请选择" formatter="yyyy-MM-dd" input-align="right" type="date" :required="true" size="large"/>

<van-field required :rules="[{ required: true }]" v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.dxje" label="兑现金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.sqje" label="尚欠金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.nsy" label="年收益(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
<van-field required :rules="[{ required: true }]" v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.dxje" label="兑现金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.sqje" label="尚欠金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.nsy" label="年收益(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />

<!--<van-field readonly required :rules="[{ required: true }]" @click="showSurveyStatusPicker = true" v-model="form.surveyStatusText" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showSurveyStatusPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.survey_status" value-key="label" @cancel="showSurveyStatusPicker = false" @confirm="onConfirmSurveyStatus"/>
</van-popup>-->
<field-select v-model="form.surveyStatusText" label="调查状态" value-key="dictLabel" data-key="dictValue" placeholder="请选择" requiredx remote-url="/system/dict/data/type/survey_status" :on-remote-response="'data'"/>
<field-radio v-model="form.surveyStatus" label="调查状态" value-key="dictLabel" data-key="dictValue" remote-url="/system/dict/data/type/survey_status" :on-remote-response="'data'" required/>

<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<image-upload v-model="form.dkImg"/>
<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<!--<image-upload v-model="form.dkImg"/>-->
<CommonUpload name="dkImg" v-model="form.dkImg" accept="image/*" multiple :deletable="true" :show-upload="true"/>

</div>
</div>

<van-button round block type="primary" native-type="submit" class="subClass">提交</van-button>
<van-button round block type="primary" native-type="submit" class="subClass">提交</van-button>
</van-form>

</div>
@@ -76,23 +55,18 @@
import { getLandDetail } from "@/api/resource/land"
import { getOperationDetail, updateOperation, addOperation } from "@/api/resource/operation"
import { getInfoByImportCode } from "@/api/system/dept";

import FieldSelect from "@/components/form/FieldSelect.vue";
import FieldRadio from "@/components/form/FieldRadio.vue";
import FieldDatePicker from "@/components/form/FieldDatePicker.vue";
import CommonUpload from "@/components/form/CommonUpload.vue";

export default {
dicts: ['zjlx', 'survey_status', 'is_common', 'jydxlx', 'jyfs'],
name: "appEdit",
components: {FieldSelect},
components: {FieldSelect, FieldRadio, FieldDatePicker, CommonUpload},
data() {
return {
showJyfsPicker: false,
showSfqdhtPicker: false,
showJydxlxPicker: false,
showJydxzjlxPicker: false,
showJykssjPicker: false,
showJyjssjPicker: false,
showSurveyStatusPicker: false,
minDate: new Date(2020, 0, 1),
maxDate: new Date(2025, 10, 1),
importCode: null,
form: {
dkbm: null,
@@ -120,10 +94,6 @@
importCode: null,
deptName: null,
},
jykssj:new Date(),
jyjssj:new Date(),
openPic: [],
openPic2: [],
};
},
created() {
@@ -136,13 +106,6 @@
getDetail(){
getOperationDetail(this.$route.query.dkbm).then(response => {
if (response.data){
response.data.jyfsText = this.selectDictLabel(this.dict.type.jyfs,response.data.jyfs);
response.data.jydxlxText = this.selectDictLabel(this.dict.type.jydxlx,response.data.jydxlx);
response.data.jydxzjlxText = this.selectDictLabel(this.dict.type.zjlx,response.data.jydxzjlx);
response.data.sfqdhtText = this.selectDictLabel(this.dict.type.is_common,response.data.sfqdht);
response.data.surveyStatusText = this.selectDictLabel(this.dict.type.survey_status,response.data.surveyStatus);
this.jykssj = new Date(response.data.jykssj);
this.jyjssj = new Date(response.data.jyjssj);
this.form = response.data
}else{
getLandDetail(this.$route.query.dkbm).then(response => {
@@ -157,15 +120,11 @@
this.form.dknz = response.data.dknz;
this.form.dkbz = response.data.dkbz;
this.form.jymj = response.data.scmjm;
this.form.jyfsText = '家庭承包';
this.form.jyfs = '110';
this.form.jydxlxText = '农户';
this.form.jydxlx = '1';
this.form.jydxzjlxText = '居民身份证';
this.form.jydxzjlx = '1';
this.form.sfqdhtText = '是';
this.form.sfqdht = '1';
this.form.surveyStatusText = '已调查';
this.form.surveyStatus = '2';

getInfoByImportCode(response.data.importCode).then((res) => {
@@ -175,39 +134,6 @@
}
});
},
onConfirmJydxlx(value) {
this.form.jydxlxText = value.label;
this.form.jydxlx = value.value;
this.showJydxlxPicker = false;
},
onConfirmJyfs(value) {
this.form.jyfsText = value.label;
this.form.jyfs = value.value;
this.showJyfsPicker = false;
},
onConfirmJydxzjlx(value) {
this.form.jydxzjlxText = value.label;
this.form.jydxzjlx = value.value;
this.showJydxzjlxPicker = false;
},
onConfirmSfqdht(value) {
this.form.sfqdhtText = value.label;
this.form.sfqdht = value.value;
this.showSfqdhtPicker = false;
},
onConfirmJykssj(data) {
this.form.jykssj = this.format(data, 'yyyy-MM-dd');
this.showJykssjPicker = false;
},
onConfirmJyjssj(data) {
this.form.jyjssj = this.format(data, 'yyyy-MM-dd');
this.showJyjssjPicker = false;
},
onConfirmSurveyStatus(value) {
this.form.surveyStatusText = value.label;
this.form.surveyStatus = value.value;
this.showSurveyStatusPicker = false;
},
/** 提交按钮 */
onSubmit() {
if (!this.form.id){


Loading…
Cancel
Save