|
@ -28,15 +28,16 @@ |
|
|
class="demo-select-base" |
|
|
class="demo-select-base" |
|
|
clearable |
|
|
clearable |
|
|
filterable |
|
|
filterable |
|
|
|
|
|
@change="handleStationChange" |
|
|
placeholder="请选择所在核电站" |
|
|
placeholder="请选择所在核电站" |
|
|
> |
|
|
> |
|
|
<t-option |
|
|
<t-option |
|
|
v-for="(item, index) in stationList" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
|
v-for="item in stationList" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:key="item.id" |
|
|
> |
|
|
> |
|
|
{{ item.label }} |
|
|
|
|
|
|
|
|
{{ item.name }} |
|
|
</t-option> |
|
|
</t-option> |
|
|
</t-select> |
|
|
</t-select> |
|
|
</t-form-item> |
|
|
</t-form-item> |
|
@ -49,12 +50,12 @@ |
|
|
placeholder="请选择所在核芯堆" |
|
|
placeholder="请选择所在核芯堆" |
|
|
> |
|
|
> |
|
|
<t-option |
|
|
<t-option |
|
|
v-for="(item, index) in coreList" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
|
v-for="item in coreList" |
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
:key="item.id" |
|
|
> |
|
|
> |
|
|
{{ item.label }} |
|
|
|
|
|
|
|
|
{{ item.name }} |
|
|
</t-option> |
|
|
</t-option> |
|
|
</t-select> |
|
|
</t-select> |
|
|
</t-form-item> |
|
|
</t-form-item> |
|
@ -88,6 +89,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { allOperatorApi } from '@/api/publish' |
|
|
import { allOperatorApi } from '@/api/publish' |
|
|
|
|
|
import { stationListApi, coreListByStationIdApi } from '@/api/info' |
|
|
const INITIAL_DATA = { |
|
|
const INITIAL_DATA = { |
|
|
taskname: '', |
|
|
taskname: '', |
|
|
order: '', |
|
|
order: '', |
|
@ -99,11 +101,7 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
formData: { ...INITIAL_DATA }, |
|
|
formData: { ...INITIAL_DATA }, |
|
|
stationList: [ |
|
|
|
|
|
{ label: '计算机学院', value: '1' }, |
|
|
|
|
|
{ label: '软件学院', value: '2' }, |
|
|
|
|
|
{ label: '物联网学院', value: '3' }, |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
stationList: [], |
|
|
userList: [], |
|
|
userList: [], |
|
|
coreList: [], |
|
|
coreList: [], |
|
|
rules: { |
|
|
rules: { |
|
@ -132,6 +130,18 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
async handleStationChange(value, context) { |
|
|
|
|
|
const res = await coreListByStationIdApi(value) |
|
|
|
|
|
if (res?.code == 200) { |
|
|
|
|
|
this.coreList = res?.data.list |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
async getStationList() { |
|
|
|
|
|
const res = await stationListApi() |
|
|
|
|
|
if (res?.code == 200) { |
|
|
|
|
|
this.stationList = res?.data?.list |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
async getAllOperator() { |
|
|
async getAllOperator() { |
|
|
const res = await allOperatorApi() |
|
|
const res = await allOperatorApi() |
|
|
if (res?.code == 200) { |
|
|
if (res?.code == 200) { |
|
@ -140,13 +150,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
onReset() { |
|
|
onReset() { |
|
|
this.$message.success('重置成功') |
|
|
this.$message.success('重置成功') |
|
|
console.log('formData', this.formData) |
|
|
|
|
|
}, |
|
|
}, |
|
|
onSubmit({ validateResult, firstError }) { |
|
|
onSubmit({ validateResult, firstError }) { |
|
|
if (validateResult === true) { |
|
|
if (validateResult === true) { |
|
|
this.$message.success('提交成功') |
|
|
this.$message.success('提交成功') |
|
|
} else { |
|
|
} else { |
|
|
console.log('Errors: ', validateResult) |
|
|
|
|
|
this.$message.warning(firstError) |
|
|
this.$message.warning(firstError) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -154,6 +162,7 @@ export default { |
|
|
|
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
|
this.getAllOperator() |
|
|
this.getAllOperator() |
|
|
|
|
|
this.getStationList() |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|