|
@@ -22,12 +22,7 @@
|
|
|
<el-input v-model="form.address" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注信息" prop="description">
|
|
|
- <el-input type="textarea" v-model="form.description" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="安装人员" prop="setter">
|
|
|
- <el-select v-model="form.setter" placeholder="请选择安装人员">
|
|
|
- <el-option v-for="item in modifierData" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
+ <el-input v-model="form.description" type="textarea" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="安装日期" prop="activateTime">
|
|
|
<el-col :span="11">
|
|
@@ -75,24 +70,25 @@
|
|
|
<el-radio label="是" />
|
|
|
<el-radio label="否" />
|
|
|
</el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<el-button style="margin-top: 12px;" @click="next('ruleForm')">下一步</el-button>
|
|
|
</div>
|
|
|
<el-form v-show="active === 2" ref="formLog" :model="formLog" :rules="rulesLog" label-width="120px" class="demo-ruleForm">
|
|
|
<el-form-item label="测试报告" prop="description">
|
|
|
- <el-input type="textarea" v-model="formLog.description" />
|
|
|
+ <el-input v-model="formLog.description" type="textarea" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="onSubmitLog('formLog')">确定</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmitLog('formLog')">完成调试</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <div v-show="active === 3">设备安装完成</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
export default {
|
|
|
name: 'Install',
|
|
|
data() {
|
|
@@ -128,9 +124,6 @@ export default {
|
|
|
description: [
|
|
|
{ required: true, message: '请输入备注信息', trigger: 'blur' }
|
|
|
],
|
|
|
- setter: [
|
|
|
- { required: true, message: '请选择安装人员', trigger: 'change' }
|
|
|
- ],
|
|
|
activateTime: [
|
|
|
{ required: true, message: '请选择日期', trigger: 'change' }
|
|
|
]
|
|
@@ -172,7 +165,7 @@ export default {
|
|
|
],
|
|
|
resource5: [
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
- ]
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -185,12 +178,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onSubmit(formName) {
|
|
|
+ this.form.setter = getToken()
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$store.dispatch('install/addDeviceData', this.form).then((data) => {
|
|
|
this.formLog.deviceId = data.id
|
|
|
this.formLog.deviceCode = data.deviceCode
|
|
|
- this.formLog.description = data.description
|
|
|
this.active++
|
|
|
})
|
|
|
} else {
|
|
@@ -204,7 +197,7 @@ export default {
|
|
|
if (valid) {
|
|
|
for (let i = 1; i <= 5; i++) {
|
|
|
if (this.ruleForm[`resource${i}`] === '否') {
|
|
|
- this.$message.error('请先解决问题在安装')
|
|
|
+ this.$message.error('请先解决问题再安装')
|
|
|
return false
|
|
|
}
|
|
|
}
|