修改任务管理按钮逻辑,修复任务时间复写bug,添加索引字段选择功能
This commit is contained in:
parent
2d00c98d1f
commit
5a2b48346d
|
@ -20,15 +20,6 @@
|
|||
validateTrigger: 'change'
|
||||
}]" ></a-input>
|
||||
</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-select placeholder="选择索引类型" option-filter-prop="children" size="large" v-decorator="['indexTypeCode', {
|
||||
rules: [
|
||||
|
@ -47,6 +38,11 @@
|
|||
</a-select-option>
|
||||
</a-select>
|
||||
</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-spin>
|
||||
</a-modal>
|
||||
|
@ -58,7 +54,6 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
|||
|
||||
import pick from 'lodash.pick'
|
||||
|
||||
|
||||
export default {
|
||||
name: "dataIndexingModal",
|
||||
components: {
|
||||
|
@ -87,6 +82,7 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
|||
},
|
||||
shipNum:{},
|
||||
rangeTime:[],
|
||||
treeData: [],
|
||||
schemaMass:"",
|
||||
tableName:""
|
||||
}
|
||||
|
@ -94,10 +90,27 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
|||
created () {
|
||||
},
|
||||
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 () {
|
||||
this.edit({});
|
||||
},
|
||||
edit (record) {
|
||||
this.getQuerytableColumns()
|
||||
this.visible =true;
|
||||
let that = this;
|
||||
that.form.resetFields();
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical"/>
|
||||
<a @click="handleDistribute(record.id)" >下发任务</a>
|
||||
<a @click="handleDistribute(record)" >下发任务</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
|
@ -213,12 +213,20 @@
|
|||
});
|
||||
},
|
||||
handleEdit: function (record) {
|
||||
if(record.issuingTime != null){
|
||||
this.$message.warning("任务已下发禁止编辑");
|
||||
return;
|
||||
}
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleDistribute:function (id) {
|
||||
handleDistribute:function (record) {
|
||||
if(record.issuingTime != null){
|
||||
this.$message.warning("任务已下发禁止重复下发");
|
||||
return;
|
||||
}
|
||||
var that = this;
|
||||
taskDistributeTask({id: id}).then((res) => {
|
||||
taskDistributeTask({id: record.id}).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.loadData();
|
||||
|
|
|
@ -165,11 +165,12 @@ import { taskCreate,
|
|||
this.visible =true;
|
||||
let that = this;
|
||||
that.form.resetFields();
|
||||
this.rangeTime=[];
|
||||
this.model = Object.assign({},record);
|
||||
this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime))
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'name','describe','shipModelId','shipNumId'));
|
||||
});
|
||||
this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime))
|
||||
},
|
||||
onChange(value, dateString) {
|
||||
this.model.startTime = dateString[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user