提交 7d9cec23 编写于 作者: zhentian.jia's avatar zhentian.jia

拖拽排序实现

上级 4cec5577
......@@ -572,3 +572,10 @@ export function getAvgTime(data) {
}
return list;
}
export function getComponent(data) {
let list = [];
for(let i=0;i<data.length;i++) {
list.push(data[i].value);
}
return list;
}
\ No newline at end of file
......@@ -593,7 +593,7 @@
:rules="rulesComponent"
>
<el-form-item label="选择组件:" prop="component">
<el-col :span="20">
<el-col :span="10">
<el-select
v-model="formComponent.component"
multiple
......@@ -626,10 +626,12 @@
</el-col>
</el-form-item>
<el-form-item label="配置证书:">
<el-radio-group v-model="formComponent.configure" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6">
<el-col :span="10">
<el-radio-group class="el-configure" v-model="formComponent.configure" :disabled="projectStatus == 3 || projectStatus == 4 || projectStatus == 5 || projectStatus == 6">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-col>
</el-form-item>
<!-- <el-form-item v-show="formComponent.configure == 1" label="选择证书:">
<el-col :span="20">
......@@ -765,7 +767,7 @@ export default {
curmbSecond: "新建项目",
//页面展示位置
stepData: [true, false, false],
active: 2,
active: 0,
activeName: "first",
//基层信息 数据
uploadImgMessage: false,
......@@ -1318,6 +1320,7 @@ export default {
}
this.optionsComponent = optionsComponent;
this.optionsCertificate = optionsCertificate;
this.organizationContent = res.data.creatorOrganizationName;
}
this.editManager();
});
......@@ -1325,7 +1328,8 @@ export default {
//项目组件信息 暂存/完成
componentDraft(type) {
let param = {
componentIds: this.formComponent.component,
// componentIds: this.formComponent.component,
componentIds: operationData.getComponent(vm.tagsComponent),
// certificateId: this.formComponent.certificate,
certificateId: [],
projectId: this.projectId,
......@@ -1334,6 +1338,7 @@ export default {
certificateType: this.formExam.certificateType,
getCertificateRule: [],
};
// console.log('排序后',vm.tagsComponent,'param',param);
if(this.formComponent.configure == 1) {
// 2.多证书有规
if(this.formExam.certificateType == 2) {
......@@ -3365,9 +3370,9 @@ export default {
vm.visibleName = false;
},
tagDrop() {
const ele = document.querySelector('.el-form-item__content .el-col-20')
console.log('ele',ele);
const _this = this
const ele = document.querySelector('.check-component .el-col-20');
// console.log('ele',ele);
// Sortable.create(ele,{});
Sortable.create(ele, {
onEnd({ newIndex, oldIndex }) {
const currRow = vm.tagsComponent.splice(oldIndex, 1)[0]
......@@ -3605,11 +3610,15 @@ export default {
top: 0px;
left: 550px;
position: absolute;
z-index: 999;
}
.el-tag {
margin-top: 5px;
display: table;
}
.el-configure {
width: 200px;
}
}
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册