修改任务管理按钮逻辑,修复任务时间复写bug,添加索引字段选择功能
This commit is contained in:
parent
2d00c98d1f
commit
5a2b48346d
|
@ -20,15 +20,6 @@
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
}]" ></a-input>
|
}]" ></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="字段" :labelCol="labelCol" >
|
|
||||||
<a-input v-decorator="['columns',{
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '字段名称不能为空' },
|
|
||||||
{ min: 1, max: 60, message: '长度1-60位' },
|
|
||||||
],
|
|
||||||
validateTrigger: 'change'
|
|
||||||
}]" ></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="索引类型" >
|
<a-form-item label="索引类型" >
|
||||||
<a-select placeholder="选择索引类型" option-filter-prop="children" size="large" v-decorator="['indexTypeCode', {
|
<a-select placeholder="选择索引类型" option-filter-prop="children" size="large" v-decorator="['indexTypeCode', {
|
||||||
rules: [
|
rules: [
|
||||||
|
@ -47,6 +38,11 @@
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="字段" :labelCol="labelCol" >
|
||||||
|
<a-tree-select style="width: 100%"
|
||||||
|
:tree-data="treeData" multiple search-placeholder="请选项"
|
||||||
|
:dropdownStyle="{ maxHeight: '400px', overflowY: 'auto'}" v-decorator="['columns',{}]"/>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
@ -56,9 +52,8 @@
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "dataIndexingModal",
|
name: "dataIndexingModal",
|
||||||
components: {
|
components: {
|
||||||
|
@ -87,6 +82,7 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||||
},
|
},
|
||||||
shipNum:{},
|
shipNum:{},
|
||||||
rangeTime:[],
|
rangeTime:[],
|
||||||
|
treeData: [],
|
||||||
schemaMass:"",
|
schemaMass:"",
|
||||||
tableName:""
|
tableName:""
|
||||||
}
|
}
|
||||||
|
@ -94,10 +90,27 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getQuerytableColumns() {
|
||||||
|
getAction("/dataManager/getTableColumnNames?schemaMass="+this.schemaMass+"&tableName="+this.tableName, {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.treeData = []
|
||||||
|
res.result.forEach(element => {
|
||||||
|
this.treeData.push({
|
||||||
|
title: element,
|
||||||
|
value: element,
|
||||||
|
key: element,
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
add () {
|
add () {
|
||||||
this.edit({});
|
this.edit({});
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
|
this.getQuerytableColumns()
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.resetFields();
|
that.form.resetFields();
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click="handleDistribute(record.id)" >下发任务</a>
|
<a @click="handleDistribute(record)" >下发任务</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||||
<a>删除</a>
|
<a>删除</a>
|
||||||
|
@ -213,12 +213,20 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleEdit: function (record) {
|
handleEdit: function (record) {
|
||||||
|
if(record.issuingTime != null){
|
||||||
|
this.$message.warning("任务已下发禁止编辑");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(record);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "编辑";
|
||||||
},
|
},
|
||||||
handleDistribute:function (id) {
|
handleDistribute:function (record) {
|
||||||
|
if(record.issuingTime != null){
|
||||||
|
this.$message.warning("任务已下发禁止重复下发");
|
||||||
|
return;
|
||||||
|
}
|
||||||
var that = this;
|
var that = this;
|
||||||
taskDistributeTask({id: id}).then((res) => {
|
taskDistributeTask({id: record.id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message);
|
||||||
that.loadData();
|
that.loadData();
|
||||||
|
|
|
@ -165,11 +165,12 @@ import { taskCreate,
|
||||||
this.visible =true;
|
this.visible =true;
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.resetFields();
|
that.form.resetFields();
|
||||||
|
this.rangeTime=[];
|
||||||
this.model = Object.assign({},record);
|
this.model = Object.assign({},record);
|
||||||
this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime))
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'name','describe','shipModelId','shipNumId'));
|
this.form.setFieldsValue(pick(this.model,'name','describe','shipModelId','shipNumId'));
|
||||||
});
|
});
|
||||||
|
this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime))
|
||||||
},
|
},
|
||||||
onChange(value, dateString) {
|
onChange(value, dateString) {
|
||||||
this.model.startTime = dateString[0];
|
this.model.startTime = dateString[0];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user