| | |
| | | <el-input size="mini" v-model="scope.row.workType" placeholder="请输入工种" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="有害因素" prop="workLogs"> |
| | | <el-table-column label="有害因素" prop="harmTypeLogs"> |
| | | <template slot-scope="scope"> |
| | | <!-- <el-input v-model="scope.row.isOk" placeholder="请输入是否痊愈" /> --> |
| | | <el-select filterable size="mini" v-model="scope.row.workLogs" placeholder="请选择有害因素" clearable> |
| | | <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" |
| | | :value="dict.value" /> |
| | | <el-select filterable size="mini" v-model="scope.row.harmTypeLogs" multiple placeholder="请选择有害因素" clearable> |
| | | <el-option v-for="dict in harmTypeList" :key="dict.aid" :label="dict.harmtype" |
| | | :value="dict.aid" /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | } from "@/api/hosp/history"; |
| | | import { Message } from "element-ui"; |
| | | import { getOrderList } from "@/api/hosp/order"; |
| | | |
| | | import { |
| | | listHarmType, |
| | | } from "@/api/hosp/harmType"; |
| | | export default { |
| | | name: "History", |
| | | dicts: ["tj_smoking_pinlv", "sys_yes_no", "tj_work_status", "tj_work", "dict_ageunit", "dict_job"], |
| | | data() { |
| | | return { |
| | | selectList: [], |
| | | dataList:[], |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | |
| | | pageSize: 20, |
| | | cusName: null, |
| | | }, |
| | | harmTypeList:[], |
| | | // 表单参数 |
| | | form: {}, |
| | | chageall: [], |
| | |
| | | /** 查询体检记录列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listHarmType().then(response => { |
| | | this.harmTypeList = response.rows; |
| | | this.loading = false; |
| | | }); |
| | | getOrderList(this.queryParams).then((response) => { |
| | | this.orderList = response.data.list; |
| | | if (this.orderList) { |
| | |
| | | this.orderList[0], |
| | | true |
| | | ); |
| | | |
| | | }); |
| | | this.dataList = this.orderList[0] |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | |
| | | }, |
| | | // 单选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.dataList = [] |
| | | this.selectList = selection; |
| | | // this.ids = selection.map((item) => item.askId); |
| | | // this.single = selection.length !== 1; |
| | |
| | | this.sex = false; |
| | | } |
| | | }) |
| | | let userId = selection.map((item) => item.userId); |
| | | getInfoById(userId).then((response) => { |
| | | let tjNumber = selection.map((item) => item.tjNumber); |
| | | getInfoById(tjNumber).then((response) => { |
| | | this.form = response.data; |
| | | if (this.form.xiyan == null) { |
| | | this.form.xiyan = "1" |
| | |
| | | }, |
| | | |
| | | delemembers() { |
| | | this.form.tjAskHistorysList.forEach((item, index) => { |
| | | this.bingshiall.forEach((item1, index1) => { |
| | | if (item.id == item1.id) { |
| | | if (this.bingshiall.length == 1) { |
| | | this.form.tjAskHistorysList.splice(index, 1) |
| | | } else { |
| | | this.form.tjAskHistorysList.splice(index, index1) |
| | | let that = this |
| | | if (that.form.tjAskHistorysList.length == that.bingshiall.length) { |
| | | that.form.tjAskHistorysList = [] |
| | | } else { |
| | | that.bingshiall.forEach((item1, index1) => { |
| | | that.form.tjAskHistorysList.forEach((item, index) => { |
| | | if (item == item1) { |
| | | that.form.tjAskHistorysList.splice(index, 1) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | |
| | |
| | | if (!this.form.workLogs) { |
| | | this.form.workLogs = []; |
| | | this.form.workLogs.push({ |
| | | id: parseInt(this.form.workLogs.length + 1), |
| | | id: parseInt(length), |
| | | beginTime: "", |
| | | endTime: "", |
| | | workCompany: "", |
| | | workDept: "", |
| | | workType: "", |
| | | workLogs: "", |
| | | harmTypeLogs: "", |
| | | fangHu: "", |
| | | Selection, |
| | | }); |
| | | } else { |
| | | this.form.workLogs.push({ |
| | | id: parseInt(this.form.workLogs.length + 1), |
| | | id: parseInt(length), |
| | | beginTime: "", |
| | | endTime: "", |
| | | workCompany: "", |
| | | workDept: "", |
| | | workType: "", |
| | | workLogs: "", |
| | | harmTypeLogs: "", |
| | | fangHu: "", |
| | | Selection, |
| | | }); |
| | | } |
| | | console.log(that.form.workLogs) |
| | | } else { |
| | | Message.warning("请先填写客户名"); |
| | | } |
| | |
| | | |
| | | delememberss() { |
| | | let that = this |
| | | console.log(that.chageall) |
| | | |
| | | if (that.form.workLogs.length == that.chageall.length) { |
| | | that.form.workLogs = [] |
| | | } else { |
| | | that.chageall.forEach((item1, index1) => { |
| | | that.form.workLogs.forEach((item, index) => { |
| | | if (item.id == item1.id) { |
| | | console.log(111111) |
| | | if (item == item1) { |
| | | that.form.workLogs.splice(index, 1) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.form.tjNum = this.dataList[0].tjNumber |
| | | updateHistory(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | }); |