| | |
| | | <el-option
|
| | | v-for="item in machineList"
|
| | | :key="item.id"
|
| | | :label="item.name"
|
| | | :label="item.machineName"
|
| | | :value="item.id">
|
| | | </el-option>
|
| | | </el-select>
|
| | |
| | | import { getMachineList, maintainCreate, maintainUpdate, userList, departmentGet } from '@/api/MdcApi'
|
| | | import { getRequest } from '@/api/Api'
|
| | | export default {
|
| | | props: ['styles', 'departmentlist','machineList','userList'],
|
| | | props: ['styleName','styles','styleValue', 'departmentlist','machineList','userList'],
|
| | | data() {
|
| | | return {
|
| | | dataForm: {
|
| | |
| | | maintainPerson: '',
|
| | | isQualified: '',
|
| | | detail: '',
|
| | | style: '',
|
| | | },
|
| | | dialogVisibleAdd: false,
|
| | | // 下拉框
|
| | |
| | | init(n, data) {
|
| | | this.data = data
|
| | | this.no = n
|
| | | |
| | | if (n === 1) {
|
| | | this.title = '新增' + this.style
|
| | | this.title = '新增' + this.styleName
|
| | | Object.keys(this.dataForm).forEach(key => {
|
| | | this.dataForm[key] = ''
|
| | | })
|
| | | this.dataForm['style'] = ''
|
| | | } else {
|
| | | this.title = '修改' + this.style
|
| | | Object.keys(this.dataForm).forEach(key => {
|
| | |
| | | completeDateFrom,
|
| | | completeDateTo,
|
| | | isQualified,
|
| | | styles: this.style
|
| | | style: this.styleValue
|
| | | }).then(res => {
|
| | | if (res.result === 'SUCCESS') {
|
| | | this.$message({
|
| | |
| | | completeDateFrom,
|
| | | completeDateTo,
|
| | | isQualified,
|
| | | styles: this.style
|
| | | style: this.styleValue
|
| | | }).then(res => {
|
| | | if (res.result === 'SUCCESS') {
|
| | | this.$message({
|
| | |
| | | <div class="item"> |
| | | <span>设备名称</span> |
| | | <el-select class="item-value" v-model="queryInfo.machineName" placeholder="请选择"> |
| | | <el-option v-for="item in machineList" :key="item.id" :label="item.name" :value="item.id"> |
| | | <el-option v-for="item in machineList" :key="item.id" :label="item.machineName" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </List> |
| | | <DailyMAddD ref="dailyMAddD" @reflash="submitForm" :style="navName" :departmentlist="departmentlist" :machineList="machineList" :userList="userList"></DailyMAddD> |
| | | <DailyMAddD ref="dailyMAddD" @reflash="submitForm" :styleValue="getStyle" :styleName="navName" :departmentlist="departmentlist" :machineList="machineList" :userList="userList"></DailyMAddD> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | }, |
| | | computed: { |
| | | navName () { |
| | | let names = ['日常保养','一级','二级','三级'] |
| | | return names[this.$route.params.style-1] |
| | | let names = ['日常保养','一级保养','二级保养','三级保养'] |
| | | return names[this.$route.params.style-1] |
| | | }, |
| | | |
| | | getStyle () { |
| | | return this.$route.params.style; |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | queryInfo: { |
| | | uuid: '', |
| | | machineName: '', |
| | | style: this.$route.params.style, |
| | | type: '', |
| | | specification: '', |
| | | department: '', |
| | |
| | | this.userList = res.data.list |
| | | }) |
| | | }, |
| | | |
| | | query() { |
| | | this.$refs.list.pageQuery(this.queryInfo) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | addDevice(n, row, event) { |
| | | if (n === 1) { |
| | | if (n === 1) {//添加 |
| | | this.$nextTick(() => { |
| | | this.$refs.dailyMAddD.init(n) |
| | | }) |
| | |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }) |
| | | this.submitForm() |
| | | this.query(); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |