|
|
@@ -14,13 +14,14 @@
|
|
|
<u--input v-model="baseForm.sample_area" border="none" suffixIcon="亩"></u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="经度:" labelWidth="100" prop="lng" borderBottom>
|
|
|
- <u--input v-model="baseForm.lng" border="none"></u--input>
|
|
|
+ <u--input v-model="baseForm.lng" border="none" type="digit" :maxlength="10"></u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="纬度:" labelWidth="100" prop="lat" borderBottom>
|
|
|
- <u--input v-model="baseForm.lat" border="none"></u--input>
|
|
|
+ <u--input v-model="baseForm.lat" border="none" type="digit" :maxlength="10"></u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="海拔:" labelWidth="100" prop="height" borderBottom>
|
|
|
- <u--input v-model="baseForm.height" border="none" suffixIcon="米"></u--input>
|
|
|
+ <u--input v-model="baseForm.height" border="none" type="digit" suffixIcon="米" :maxlength="10">
|
|
|
+ </u--input>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="发生境:" labelWidth="100" prop="occurs_name" borderBottom @click="handleOccursClick">
|
|
|
<u--input v-model="baseForm.occurs_name" placeholder="请选择" disabled disabledColor="#ffffff"
|
|
|
@@ -31,12 +32,12 @@
|
|
|
<u-form-item label="物种名称:" labelWidth="100" prop="pest_name" borderBottom>
|
|
|
<u--input v-model="baseForm.pest_name" border="none"></u--input>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="拉丁学名:" labelWidth="100" prop="pest_name_1" borderBottom>
|
|
|
- <u--input v-model="baseForm.pest_name_1" border="none"></u--input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="当地俗名:" labelWidth="100" prop="pest_name_2" borderBottom>
|
|
|
+ <u-form-item label="拉丁学名:" labelWidth="100" prop="pest_name_2" borderBottom>
|
|
|
<u--input v-model="baseForm.pest_name_2" border="none"></u--input>
|
|
|
</u-form-item>
|
|
|
+ <u-form-item label="当地俗名:" labelWidth="100" prop="pest_name_3" borderBottom>
|
|
|
+ <u--input v-model="baseForm.pest_name_3" border="none"></u--input>
|
|
|
+ </u-form-item>
|
|
|
<u-form-item label="是否需要协助调查:" labelWidth="140" prop="is_check" borderBottom>
|
|
|
<u-switch v-model="baseForm.is_check" activeValue="是" inactiveValue="否"></u-switch>
|
|
|
</u-form-item>
|
|
|
@@ -157,7 +158,7 @@
|
|
|
height: '', // 海拔
|
|
|
sample_area: '', //标准样地面积
|
|
|
occurs: '', // 发生境
|
|
|
- occurs_name:'',
|
|
|
+ occurs_name: '',
|
|
|
pest_name: '', //物种名称
|
|
|
pest_name_2: '', //拉丁学名
|
|
|
pest_name_3: '', //当地俗名
|
|
|
@@ -192,12 +193,45 @@
|
|
|
is_gather: '是', // 是否采集标本 是/否
|
|
|
},
|
|
|
rules: {
|
|
|
- 'sample_addr': {
|
|
|
- type: 'string',
|
|
|
- required: true,
|
|
|
- message: '请填写标准样地地点名称',
|
|
|
- trigger: ['blur', 'change']
|
|
|
- },
|
|
|
+ 'sample_addr': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写标准样地地点名称',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 50,
|
|
|
+ message: '长度为1-50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'sample_num': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写标准样地编号',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 50,
|
|
|
+ message: '长度为1-50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'sample_area': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写标准样地面积',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 50,
|
|
|
+ message: '长度为1-50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
'lng': {
|
|
|
type: 'string',
|
|
|
required: true,
|
|
|
@@ -216,12 +250,268 @@
|
|
|
message: '请填写海拔',
|
|
|
trigger: ['blur', 'change']
|
|
|
},
|
|
|
- 'sample_area': {
|
|
|
+ 'occurs_name': {
|
|
|
type: 'string',
|
|
|
required: true,
|
|
|
- message: '请填写标准样地面积',
|
|
|
+ message: '请选择',
|
|
|
trigger: ['blur', 'change']
|
|
|
},
|
|
|
+ 'pest_name': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写物种名称',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 50,
|
|
|
+ message: '长度为1-50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_crop': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害作物',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 50,
|
|
|
+ message: '长度为1-50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'pest_name_2': [{
|
|
|
+ max: 50,
|
|
|
+ message: '长度不能超过50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }],
|
|
|
+ 'pest_name_3': [{
|
|
|
+ max: 50,
|
|
|
+ message: '长度不能超过50',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }],
|
|
|
+ // 1
|
|
|
+ 'check_num_1': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_num_1': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_rate_1': [{
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害率',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ max: 100,
|
|
|
+ transform(value) {
|
|
|
+ return Number(value);
|
|
|
+ },
|
|
|
+ message: '0-100之间',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ //2
|
|
|
+ 'check_num_2': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_num_2': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_rate_2': [{
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害率',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ max: 100,
|
|
|
+ transform(value) {
|
|
|
+ return Number(value);
|
|
|
+ },
|
|
|
+ message: '0-100之间',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 3
|
|
|
+ 'check_num_3': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_num_3': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_rate_3': [{
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害率',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ max: 100,
|
|
|
+ transform(value) {
|
|
|
+ return Number(value);
|
|
|
+ },
|
|
|
+ message: '0-100之间',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 4
|
|
|
+ 'check_num_4': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_num_4': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_rate_4': [{
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害率',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ max: 100,
|
|
|
+ transform(value) {
|
|
|
+ return Number(value);
|
|
|
+ },
|
|
|
+ message: '0-100之间',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ //5
|
|
|
+ 'check_num_5': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_num_5': [{
|
|
|
+ type: 'string',
|
|
|
+ required: true,
|
|
|
+ message: '请填写',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 9,
|
|
|
+ message: '长度为1-9',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'harm_rate_5': [{
|
|
|
+ type: 'number',
|
|
|
+ required: true,
|
|
|
+ message: '请填写危害率',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'number',
|
|
|
+ min: 0,
|
|
|
+ max: 100,
|
|
|
+ transform(value) {
|
|
|
+ return Number(value);
|
|
|
+ },
|
|
|
+ message: '0-100之间',
|
|
|
+ trigger: ['blur', 'change']
|
|
|
+ }
|
|
|
+ ],
|
|
|
},
|
|
|
habitatList: [{
|
|
|
label: '公共绿地',
|
|
|
@@ -279,20 +569,20 @@
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '水库道路周边地块',
|
|
|
+ label: '水库道路周边地块、荒地(待建地、城乡失管地等)',
|
|
|
value: '4'
|
|
|
},
|
|
|
- {
|
|
|
- label: '荒地',
|
|
|
- value: '5',
|
|
|
- children: [{
|
|
|
- label: '待建地',
|
|
|
- value: '5-1'
|
|
|
- }, {
|
|
|
- label: '城乡失管地',
|
|
|
- value: '5-2'
|
|
|
- }, ]
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // label: '荒地',
|
|
|
+ // value: '5',
|
|
|
+ // children: [{
|
|
|
+ // label: '待建地',
|
|
|
+ // value: '5-1'
|
|
|
+ // }, {
|
|
|
+ // label: '城乡失管地',
|
|
|
+ // value: '5-2'
|
|
|
+ // }, ]
|
|
|
+ // }
|
|
|
],
|
|
|
harmObjectList: [{
|
|
|
label: '农作物',
|
|
|
@@ -329,27 +619,27 @@
|
|
|
],
|
|
|
submitLoading: false,
|
|
|
columnData: [],
|
|
|
- show:false
|
|
|
+ show: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
occurs_columns() {
|
|
|
const level1DataList = [];
|
|
|
-
|
|
|
+
|
|
|
forEach(this.habitatList, item => {
|
|
|
level1DataList.push({
|
|
|
label: item.label,
|
|
|
value: item.value
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
if (isEmpty(item.children)) {
|
|
|
this.columnData.push([])
|
|
|
} else {
|
|
|
this.columnData.push(item.children)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
return [
|
|
|
level1DataList,
|
|
|
this.columnData[0]
|
|
|
@@ -367,10 +657,12 @@
|
|
|
console.log('before confirm --------------14', value)
|
|
|
const firstInfo = first(value);
|
|
|
const lastInfo = last(value);
|
|
|
-
|
|
|
+
|
|
|
this.baseForm.occurs = lastInfo ? lastInfo.value : firstInfo.value;
|
|
|
this.baseForm.occurs_name = lastInfo ? firstInfo.label + '/' + lastInfo.label : firstInfo.label;
|
|
|
this.show = false;
|
|
|
+
|
|
|
+ this.$refs.uForm.validate()
|
|
|
},
|
|
|
changeHandler(e) {
|
|
|
const {
|