| | |
| | | <el-select v-model="form.operatorUids" multiple> |
| | | <el-option |
| | | v-for="item in workerList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :key="item.uid" |
| | | :label="item.username" |
| | | :value="item.uid" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业时间" prop="workTimeLine"> |
| | | <el-date-picker |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="危害辨识" prop="hazardIdentification"> |
| | | <el-input |
| | | v-model="form.hazardIdentification" |
| | | placeholder="请输入危害辨识" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider border-style="dashed" /> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="受限空间所属单位" prop="workDetail.csDepId"> |
| | | <el-select v-model="form.workDetail.csDepId"> |
| | | <el-option |
| | | v-for="item in csDepList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select v-model="form.workDetail.csDepId">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in csDepList"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <el-cascader v-model="form.workDetail.csDepId" :options="departList" :props="casProps" :show-all-levels="false" @change="handleChange" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | |
| | | interface stateType { |
| | | form: Object, |
| | | workerList: Array<any>, |
| | | csDepList: Array<any>, |
| | | otherWorkList: Array<any> |
| | | otherWorkList: Array<any>, |
| | | casProps: {} |
| | | } |
| | | export default defineComponent({ |
| | | name: 'spaceForm', |
| | | components: {}, |
| | | props:['workerList','departList'], |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | csDepId: null, |
| | | csName: '', |
| | |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | | }, |
| | | workerList:[ |
| | | { |
| | | label: "张三", |
| | | value: 53 |
| | | }, |
| | | { |
| | | label: "李四", |
| | | value: 54 |
| | | }, |
| | | { |
| | | label: "测试一", |
| | | value: 55 |
| | | }, |
| | | { |
| | | label: "测试二", |
| | | value: 56 |
| | | } |
| | | ], |
| | | csDepList: [ |
| | | { |
| | | label: "单位一", |
| | |
| | | value: 6 |
| | | } |
| | | ], |
| | | casProps: { |
| | | emitPath: false, |
| | | value: 'depId', |
| | | label: 'depName', |
| | | multiple: false, |
| | | expandTrigger: 'hover', |
| | | checkStrictly: true |
| | | }, |
| | | otherWorkList: [ |
| | | { |
| | | label: '动火作业', |
| | |
| | | workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | hazardIdentification: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.csDepId": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.csName": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | |
| | | .applyBtn{ |
| | | width: 100%; |
| | | background: #fff; |
| | | height: 80px; |
| | | padding-top: 15px; |
| | | z-index: 5; |
| | | box-shadow: 0 -3px 8px rgba(150,150,150,.1); |
| | | display: flex; |
| | |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | .el-cascader{ |
| | | :deep(.el-cascader){ |
| | | width: 100% !important; |
| | | } |
| | | } |