Commit e396f8dc authored by zhangyichen's avatar zhangyichen

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

parent 4c6414bf
...@@ -2,7 +2,7 @@ import request from '@/utils/request' ...@@ -2,7 +2,7 @@ import request from '@/utils/request'
// 查询角色列表 // 查询角色列表
export function getTableData(params) { export function getTableData(params) {
return request({ return request({
url: '坐等接口', url: '/datamonitor/monitor',
method: 'get', method: 'get',
params params
}) })
......
...@@ -73,114 +73,28 @@ export default { ...@@ -73,114 +73,28 @@ export default {
lineNo: '' lineNo: ''
}, },
monitoringData: [], monitoringData: [],
lineNoList: [] lineNoList: [],
interval: undefined
} }
}, },
created() { created() {
this.getStaTable() 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'
},
{
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'
}
]
}
]
}, },
mounted() { mounted() {
}, },
beforeDestroy() {
clearInterval(this.intercal)
},
destroyed() {
clearInterval(this.intercal)
},
methods: { methods: {
/** 查询按钮方法 **/ /** 查询按钮方法 **/
handleQuery() { handleQuery() {
this.getStaTable() clearInterval(this.intercal)
this.intercal = setInterval(_ => {
this.getStaTable()
}, 2000)
}, },
/** 重置按钮方法 **/ /** 重置按钮方法 **/
resetQuery() { resetQuery() {
...@@ -190,11 +104,12 @@ export default { ...@@ -190,11 +104,12 @@ export default {
// 获取表数据 // 获取表数据
getStaTable() { getStaTable() {
const params = {} const params = {}
getTableData(params).then(res => { this.intercal = setInterval(_ => {
this.monitoringData = res.data getTableData(params).then(res => {
}).catch(_ => { this.monitoringData = res.data
console.log('¿¿¿¿') }).catch(_ => {
}) })
}, 2000)
} }
} }
} }
......
...@@ -626,7 +626,7 @@ export default { ...@@ -626,7 +626,7 @@ export default {
}, },
totalDigitsRule(rule, value, callback) { totalDigitsRule(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error('请输入正整数')) callback(new Error('请输入总位数'))
} else { } else {
const reg = /(^[1-9][0-9]$)|(^100&)|(^[1-9]$)$/ const reg = /(^[1-9][0-9]$)|(^100&)|(^[1-9]$)$/
if (reg.test(value)) { if (reg.test(value)) {
...@@ -638,7 +638,7 @@ export default { ...@@ -638,7 +638,7 @@ export default {
}, },
ruleByteRule(rule, value, callback, data, index) { ruleByteRule(rule, value, callback, data, index) {
if (!value) { if (!value) {
callback(new Error('请输入正整数')) callback(new Error('请输入SN码位数'))
} else { } else {
if (parseInt(value) > parseInt(data.totalDigits)) { if (parseInt(value) > parseInt(data.totalDigits)) {
callback(new Error('规则设置应小于总位数')) callback(new Error('规则设置应小于总位数'))
...@@ -661,7 +661,7 @@ export default { ...@@ -661,7 +661,7 @@ export default {
}, },
rulesRule(rule, value, callback) { rulesRule(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error('请输入规则')) callback(new Error('请输入规则设置'))
} else { } else {
const reg = /[\u4E00-\u9FA5]/g const reg = /[\u4E00-\u9FA5]/g
if (!reg.test(value)) { 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