|
@@ -79,8 +79,57 @@
|
|
|
|
|
|
<el-tab-pane label="机构与地域" name="second">
|
|
|
<!-- 头部搜索栏 -->
|
|
|
- <el-row style="margin-right: 0px;">
|
|
|
- <el-form style="display: flex; flex-direction: row; margin-left: 5px;">
|
|
|
+ <el-form ref="form" :model="form" style="display: flex; flex-direction: column; margin-left: 5px; width: 100%; label-width: auto;">
|
|
|
+ <el-row style="width: 75%;">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item prop="bear_unit" label="抽样机构" class="select" size="mini">
|
|
|
+ <el-input v-model="form.bear_unit" @focus="getTestListShow = true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item prop="check_unit" label="检测机构" class="select" size="mini">
|
|
|
+ <el-input v-model="form.check_unit" @focus="getTestListShow2 = true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item prop="sample_number" label="抽样数量" class="select" size="mini">
|
|
|
+ <el-input v-model="form.sample_number" style="width: 110px;"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item prop="report_unit" label="报告上传单位" class="select" size="mini">
|
|
|
+ <el-input v-model="form.report_unit" @focus="getTestListShow1 = true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row style="width: 100%; margin-top: 10px;">
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item prop="address" label="抽样地区" class="select" size="mini">
|
|
|
+ <el-cascader :options="region" v-model="selectedOptions"
|
|
|
+ @change="handleChange">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item prop="uploadtime" label="报告上传时间:" class="select" size="mini">
|
|
|
+ <el-date-picker v-model="form.uploadtime" type="date" value-format="yyyy-MM-dd">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" >
|
|
|
+ <el-button type="primary" size="mini" plain @click="save('form')">保存
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="resetForm('form')">
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="mini" plain @click="back()">上一步</el-button>
|
|
|
+ <el-button type="primary" size="mini" plain @click="nexto()">下一步</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <!-- <el-row style="margin-right: 0px;">
|
|
|
+ <el-form ref="form" style="display: flex; flex-direction: row; margin-left: 5px;">
|
|
|
<el-form-item label="抽样机构" class="select" size="mini">
|
|
|
<el-input v-model="form.bear_unit" @focus="getTestListShow = true"></el-input>
|
|
|
</el-form-item>
|
|
@@ -94,8 +143,8 @@
|
|
|
<el-input v-model="form.report_unit" @focus="getTestListShow1 = true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-right: 0px;">
|
|
|
+ </el-row> -->
|
|
|
+ <!-- <el-row style="margin-right: 0px;">
|
|
|
<el-col :span="11">
|
|
|
<el-form style="display: flex; flex-direction: row; margin-left: 5px; margin-top: 10px;" size="mini">
|
|
|
<el-form-item label="抽样地区" class="select">
|
|
@@ -110,15 +159,15 @@
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
<el-col :span="5" style="margin-top: 10px;">
|
|
|
- <el-button type="primary" size="mini" plain @click="save()">保存
|
|
|
+ <el-button type="primary" size="mini" plain @click="save('form')">保存
|
|
|
</el-button>
|
|
|
<!-- <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="appear">
|
|
|
重置
|
|
|
</el-button> -->
|
|
|
- <el-button type="primary" size="mini" plain @click="back()">上一步</el-button>
|
|
|
+ <!-- <el-button type="primary" size="mini" plain @click="back()">上一步</el-button>
|
|
|
<el-button type="primary" size="mini" plain @click="nexto()">下一步</el-button>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
|
|
|
|
|
|
<!-- 表格数据区域-->
|
|
@@ -274,7 +323,8 @@
|
|
|
readForm: {},
|
|
|
queryInfo: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10
|
|
|
+ pageSize: 10,
|
|
|
+ task_id: ''
|
|
|
},
|
|
|
queryInfos: {
|
|
|
pageNum: 1,
|
|
@@ -356,9 +406,12 @@
|
|
|
totals: 0,
|
|
|
|
|
|
form: {
|
|
|
- bear_unit_name: '',
|
|
|
- report_unit_name: '',
|
|
|
- check_unit_name: ''
|
|
|
+ bear_unit: '',
|
|
|
+ report_unit: '',
|
|
|
+ check_unit: '',
|
|
|
+ sample_number: '',
|
|
|
+ address: '',
|
|
|
+ uploadtime: ''
|
|
|
},
|
|
|
currentRow: null,
|
|
|
currentRow1: null,
|
|
@@ -403,8 +456,9 @@
|
|
|
this.activeName = 'first'
|
|
|
},
|
|
|
// 机构与地域---保存
|
|
|
- async save() {
|
|
|
+ async save(formName) {
|
|
|
this.form['task_id'] = this.task_id
|
|
|
+ console.log(this.form)
|
|
|
const {
|
|
|
data: res
|
|
|
} = await this.$http.post("AddUnderTask", this.form);
|
|
@@ -413,9 +467,15 @@
|
|
|
type: 'success',
|
|
|
message: '保存成功!'
|
|
|
});
|
|
|
+ this.resetForm(formName)
|
|
|
this.getUnderTask()
|
|
|
}
|
|
|
},
|
|
|
+ //重置
|
|
|
+ async resetForm(formName) {
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
+ this.selectedOptions = '';
|
|
|
+ },
|
|
|
// 机构与地域---删除
|
|
|
async sampleDetail(id) {
|
|
|
console.log(id)
|