123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- import { memberListPageV2 } from "@/api/masterManagement";
- import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
- export default {
- data() {
- return {
- workerList_cz: []
- }
- },
- computed: {
- czpandanxinxi() {
- return [
- {
- name: 'el-input',
- md: 6,
- attributes: { placeholder: '请输入' },
- formItemAttributes: {
- label: '处罚工单号',
- prop: 'disposeOrderBaseId',
- rules: [...required],
- }
- },
- {
- name: 'el-select',
- md: 6,
- options: this.orderSmallTypeData,
- attributes: {
- placeholder: '请选择',
- clearable: true,
- filterable: true
- },
- formItemAttributes: {
- label: '工单类型',
- prop: 'disposeOrderSmallType',
- rules: [...required],
- },
- events: {
- change: (val) => {
- if (val) {
- this.formData.disposeOrderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
- } else {
- this.formData.disposeOrderSmallTypeText = ''
- }
- }
- }
- },
- {
- name: 'el-select-add',
- options: this.websitList,
- md: 6,
- attributes: {
- placeholder: '请选择',
- clearable: true,
- filterable: true,
- },
- formItemAttributes: {
- label: '网点名称',
- prop: 'disposeWebsitId',
- rules: [...required],
- },
- events: {
- change: (val) => {
- this.formData.disposeWorkerId = ""
- this.formData.disposeWorkerName = ""
- this.formData.disposeWorkerMobile = ""
- this.getdisposeWebsitIds()
- if (val) {
- this.formData['disposeWebsitName'] = this.websitList.find(item => item.value == val)?.label || val
- } else {
- this.formData['disposeWebsitName'] = ''
- }
- }
- }
- },
- {
- name: 'el-select-add',
- options: this.workerList_cz,
- md: 6,
- attributes: {
- placeholder: '请选择',
- clearable: true,
- filterable: true,
- },
- formItemAttributes: {
- label: '处置工程师',
- prop: 'disposeWorkerId',
- rules: [...required],
- },
- events: {
- change: (val) => {
- if (val) {
- this.formData['disposeWorkerName'] = this.workerList_cz.find(item => item.value == val)?.label || val
- this.formData['disposeWorkerMobile'] = this.workerList_cz.find(item => item.value == val)?.data?.workerMobile || ""
- } else {
- this.formData['disposeWorkerMobile'] = ''
- this.formData['disposeWorkerName'] = ''
- }
- }
- }
- },
- ]
- }
- },
- methods: {
- getdisposeWebsitIds() {
- if (this.formData.disposeWebsitId) {
- memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.formData.disposeWebsitId }] }).then(res => {
- this.workerList_cz = res.data.records.map(item => {
- var { id, userId, ...data } = item
- return {
- value: userId,
- label: data.nickName,
- data: {
- workerId: userId,
- workerName: data.nickName,
- workerIdcard: data.idCard,
- workerMobile: data.mobile,
- ...data
- }
- }
- })
- })
- } else {
- this.workerList_cz = []
- }
- }
- },
- }
|