Commit a06c7146 authored by 高宇's avatar 高宇

1.测试按钮

parent 12f77bd4
...@@ -66,3 +66,12 @@ export function exportIncomeWmsLabel(query) { ...@@ -66,3 +66,12 @@ export function exportIncomeWmsLabel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 7.测试接口
export function test(query) {
return request({
url: '/incomewmslabel/test',
method: 'get',
params: query,
})
}
...@@ -180,6 +180,15 @@ ...@@ -180,6 +180,15 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button
style="margin-left: 107px;float: left;"
class="commonField.exportClass"
:type="commonField.typeSuccess"
:icon="commonField.exportIcon"
:size="commonField.smallSize"
@click="test"
:loading="testLoading"
>测试</el-button>
<el-button class="cancelBtn" @click="cancel">取 消</el-button> <el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button :loading="addLoading" class="submitBtn" type="primary" @click="submitForm">确 定</el-button> <el-button :loading="addLoading" class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
</div> </div>
...@@ -194,12 +203,15 @@ import { ...@@ -194,12 +203,15 @@ import {
delIncomeWmsLabel, delIncomeWmsLabel,
addIncomeWmsLabel, addIncomeWmsLabel,
updateIncomeWmsLabel, updateIncomeWmsLabel,
exportIncomeWmsLabel } from '@/api/incomeWmsLabel' exportIncomeWmsLabel, test
} from '@/api/incomeWmsLabel'
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
export default { export default {
name: 'IncomeWmsLabel', name: 'IncomeWmsLabel',
data() { data() {
return { return {
// 测试按钮loading
testLoading: false,
// 新增确认按钮loading // 新增确认按钮loading
addLoading: false, addLoading: false,
// 遮罩层 // 遮罩层
...@@ -260,6 +272,34 @@ export default { ...@@ -260,6 +272,34 @@ export default {
this.getList() // 列表查询 this.getList() // 列表查询
}, },
methods: { methods: {
/**
* @description: 测试接口
* @author: gaoyu
* @param:
* @return:
**/
test() {
if (this.form.mac && this.form.mac !== undefined && this.form.mac !== '') {
this.testLoading = true
// 调接口
const obj = {
mac: this.form.mac
}
test(obj).then(res => {
if (res.data) {
this.testLoading = false
this.$message.success("成功")
} else {
this.testLoading = false
this.$message.error("失败")
}
}).catch(() => {
this.testLoading = false
})
} else {
this.$refs.form.validateField("mac")
}
},
/** /**
* @description: 提交时校验parms中的数据 * @description: 提交时校验parms中的数据
* @author: gaoyu * @author: gaoyu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment