提交修改文件2:1、2、13文件1:2、3、4

This commit is contained in:
RenCheng 2025-06-03 00:01:09 +08:00
parent 31d5cf81d9
commit d0a2e3d94b
5 changed files with 52 additions and 5 deletions

View File

@ -285,6 +285,10 @@ import { datasyncqueryPage,
this.form.validateFields((err, values) => {
console.log('values',values)
this.datamodel = values;
if(this.datamodel.database==null){
this.$message.warning("源数据库未选择");
return false;
}
var that = this;
if (!err) {
that.confirmLoading = true;
@ -349,6 +353,22 @@ import { datasyncqueryPage,
this.form.validateFields((err, values) => {
console.log('values',values)
this.datamodel = values;
if(this.datamodel.shipModel==null){
this.$message.warning("型号必须选择");
return false;
}
if(this.datamodel.shipNum==null){
this.$message.warning("舷号必须选择");
return false;
}
if(this.datamodel.dataType==null){
this.$message.warning("数据类型必须选择");
return false;
}
if(this.datamodel.dbType==null){
this.$message.warning("数据类型必须选择");
return false;
}
var that = this;
if (!err) {
that.confirmLoading = true;

View File

@ -134,6 +134,13 @@ export default {
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
if(this.form.maxVal < this.form.minVal){
this.$notification.error({
message: '系统提示',
description: '最大值不可小于最小值'
})
return false;
}
this.confirmLoading = true;
if (!this.form.id) {
createRules(this.form).then(res => {

View File

@ -182,11 +182,12 @@
deleteAllFile({}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.ipagination.total = 0;
this.ipagination.current = 1;
} else {
this.$message.warning(res.message);
}
});
this.loadData()
this.$refs.modalForm.open();
},
initWebSocket: function () {

View File

@ -15,7 +15,8 @@
<a-input v-decorator="['name',{
rules: [
{ required: true, message: '任务名称不能为空' },
{ min: 0, max: 30, message: '长度0-30位' }
{ min: 0, max: 30, message: '长度0-30位' },
{ pattern:new RegExp('^[\u4e00-\u9fa5a-zA-Z0-9]+$','g'),message:'只允许包含数字、字母、中文'},
],
validateTrigger: 'blur'
}]" ></a-input>

View File

@ -19,7 +19,9 @@
</a-row>
</a-form>
</div>
<a-table ref="table" size="middle" style="height:calc(100vh - 343px);background:#e6e9f1;padding: 10px;" bordered rowKey="id" :columns="columns" :dataSource="dataSource" @change="handleTableChange">
<a-table ref="table" size="middle" style="height:calc(100vh - 343px);background:#e6e9f1;padding: 10px;" bordered rowKey="id"
:custom-row="handleCustomRow"
:columns="columns" :dataSource="dataSource" @change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">选中</a>
</span>
@ -164,7 +166,8 @@ export default {
fileLinkCount: 0
},
cleaningVariancesource: [],
totalNumberCataloguesData: []
totalNumberCataloguesData: [],
selectedRowId :null
}
},
mounted() {
@ -179,6 +182,17 @@ export default {
},
methods: {
handleCustomRow(record) {
return {
onClick: () => {
console.log(record.id)
this.selectedRowId = record.id;
},
class: {
'row-highlight': this.selectedRowId === record.id
}
};
},
handleTableChange(pagination, filters, sorter) {
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
@ -189,6 +203,7 @@ export default {
},
handleEdit(value) {
this.cleaningVariancesource = [];
this.selectedRowId = value.id;
getDataAnalysis({ taskId: value.id, startDate: value.startTime, endDate: value.endTime }).then((res) => {
if (res.success) {
res.result.schemaNames.forEach(row => {
@ -326,7 +341,10 @@ export default {
.quarter-div .datanum {
font-size: 26px;
}
/* 高亮样式 */
/deep/.row-highlight {
background-color: #ffffff !important;
}
.quarter-div .ant-col-8,
.quarter-div .ant-col-10 {
text-align: center;