Commit e396f8dc authored by zhangyichen's avatar zhangyichen

修改bug 55773 配置页面,建议修改必填提示

parent 4c6414bf
......@@ -2,7 +2,7 @@ import request from '@/utils/request'
// 查询角色列表
export function getTableData(params) {
return request({
url: '坐等接口',
url: '/datamonitor/monitor',
method: 'get',
params
})
......
......@@ -73,114 +73,28 @@ export default {
lineNo: ''
},
monitoringData: [],
lineNoList: []
lineNoList: [],
interval: undefined
}
},
created() {
this.getStaTable()
this.monitoringData = [
{
orderNo: '123456',
orderQty: '654321',
column: [
{
label: '产线号',
prop: 'lineNo',
width: '100px' // 0 或 1 代表是动态表头还是固定的 或者给写死个宽度也好
},
{
label: '线别号',
prop: 'lineNumber',
width: '100px'
},
{
label: '开工时间',
prop: 'timeDate',
width: '160px'
},
{
label: 'Scan1',
prop: 'Scan1',
width: '60px'
},
{
label: 'Scan2',
prop: 'Scan2',
width: '60px'
},
{
label: 'Scan3',
prop: 'Scan3',
width: '60px'
},
{
label: 'Scan4',
prop: 'Scan4',
width: '60px'
},
{
label: 'Test1',
prop: 'Test1',
width: '60px'
},
{
label: 'Test2',
prop: 'Test2',
width: '60px'
},
{
label: 'Test3',
prop: 'Test3',
width: '60px'
},
{
label: 'Test4',
prop: 'Test4',
width: '60px'
},
{
label: 'Test5',
prop: 'Test5',
width: '60px'
},
{
label: 'Test6',
prop: 'Test6',
width: '60px'
mounted() {
},
{
label: 'Test7',
prop: 'Test7',
width: '60px'
}
],
tableData: [
{
lineNo: 'Device Line 1',
lineNumber: 'J2E02MAKC',
timeDate: '2022-05-01 07:08:19',
Scan1: '1234',
Scan2: '1234',
Scan3: '1234',
Scan4: '1234',
Test1: '1234',
Test2: '1234',
Test3: '1234',
Test4: '1234',
Test5: '1234',
Test6: '1234',
Test7: '1234'
}
]
}
]
beforeDestroy() {
clearInterval(this.intercal)
},
mounted() {
destroyed() {
clearInterval(this.intercal)
},
methods: {
/** 查询按钮方法 **/
handleQuery() {
clearInterval(this.intercal)
this.intercal = setInterval(_ => {
this.getStaTable()
}, 2000)
},
/** 重置按钮方法 **/
resetQuery() {
......@@ -190,11 +104,12 @@ export default {
// 获取表数据
getStaTable() {
const params = {}
this.intercal = setInterval(_ => {
getTableData(params).then(res => {
this.monitoringData = res.data
}).catch(_ => {
console.log('¿¿¿¿')
})
}, 2000)
}
}
}
......
......@@ -626,7 +626,7 @@ export default {
},
totalDigitsRule(rule, value, callback) {
if (!value) {
callback(new Error('请输入正整数'))
callback(new Error('请输入总位数'))
} else {
const reg = /(^[1-9][0-9]$)|(^100&)|(^[1-9]$)$/
if (reg.test(value)) {
......@@ -638,7 +638,7 @@ export default {
},
ruleByteRule(rule, value, callback, data, index) {
if (!value) {
callback(new Error('请输入正整数'))
callback(new Error('请输入SN码位数'))
} else {
if (parseInt(value) > parseInt(data.totalDigits)) {
callback(new Error('规则设置应小于总位数'))
......@@ -661,7 +661,7 @@ export default {
},
rulesRule(rule, value, callback) {
if (!value) {
callback(new Error('请输入规则'))
callback(new Error('请输入规则设置'))
} else {
const reg = /[\u4E00-\u9FA5]/g
if (!reg.test(value)) {
......
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