|
|
|
@ -194,6 +194,7 @@ import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
|
|
|
|
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
|
|
|
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
|
|
|
|
import recycleSaffDeviceBox from "@/views/publicPopup/recycleSaffDevice";
|
|
|
|
|
import { getRecycleStationList } from "@/api/device";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {recycleSaffDeviceBox},
|
|
|
|
@ -272,7 +273,7 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
stationIdOptions: [],
|
|
|
|
|
stationIdProps: { "label": "station_name", "value": "id" },
|
|
|
|
|
stationIdProps: { "label": "stationName", "value": "id" },
|
|
|
|
|
genderOptions: [{ "fullName": "男", "id": "1" }, { "fullName": "女", "id": "2" }],
|
|
|
|
|
genderProps: { "label": "fullName", "value": "id" },
|
|
|
|
|
recyclestaffdevicedeviceCodecolumnOptions: [{ "label": "设备编码", "value": "device_code" }, { "label": "设备名称", "value": "device_name" }, { "label": "地址", "value": "address" },],
|
|
|
|
@ -420,28 +421,32 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getstationIdOptions() {
|
|
|
|
|
const index = this.childIndex
|
|
|
|
|
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.stationId))
|
|
|
|
|
for (let i = 0; i < templateJsonList.length; i++) {
|
|
|
|
|
let json = templateJsonList[i];
|
|
|
|
|
if (json.relationField) {
|
|
|
|
|
let relationFieldAll = json.relationField.split("-");
|
|
|
|
|
let val = json.defaultValue;
|
|
|
|
|
if (relationFieldAll.length > 1 && index > -1) {
|
|
|
|
|
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
|
|
|
|
|
} else {
|
|
|
|
|
val = this.dataForm[relationFieldAll]
|
|
|
|
|
}
|
|
|
|
|
json.defaultValue = val
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let template = {
|
|
|
|
|
paramList: templateJsonList
|
|
|
|
|
}
|
|
|
|
|
getDataInterfaceRes('520259300875047493', template).then(res => {
|
|
|
|
|
let data = res.data
|
|
|
|
|
this.stationIdOptions = data
|
|
|
|
|
this.changeDataFormData(1, 'stationId', 'stationId', index, '')
|
|
|
|
|
})
|
|
|
|
|
// let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.stationId))
|
|
|
|
|
// for (let i = 0; i < templateJsonList.length; i++) {
|
|
|
|
|
// let json = templateJsonList[i];
|
|
|
|
|
// if (json.relationField) {
|
|
|
|
|
// let relationFieldAll = json.relationField.split("-");
|
|
|
|
|
// let val = json.defaultValue;
|
|
|
|
|
// if (relationFieldAll.length > 1 && index > -1) {
|
|
|
|
|
// val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
|
|
|
|
|
// } else {
|
|
|
|
|
// val = this.dataForm[relationFieldAll]
|
|
|
|
|
// }
|
|
|
|
|
// json.defaultValue = val
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// let template = {
|
|
|
|
|
// paramList: templateJsonList
|
|
|
|
|
// }
|
|
|
|
|
// getDataInterfaceRes('520259300875047493', template).then(res => {
|
|
|
|
|
// let data = res.data
|
|
|
|
|
// this.stationIdOptions = data
|
|
|
|
|
// this.changeDataFormData(1, 'stationId', 'stationId', index, '')
|
|
|
|
|
// })
|
|
|
|
|
getRecycleStationList().then(res => {
|
|
|
|
|
this.stationIdOptions = res.data;
|
|
|
|
|
this.changeDataFormData(1, "stationId", "stationId", index, []);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|