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

入口编辑api对接

上级 64d4716f
[1112/102746.726:ERROR:process_info.cc(329)] VirtualQueryEx: 拒绝访问。 (0x5)
[1112/102746.728:ERROR:process_info.cc(556)] ReadMemoryInfo failed
[1112/102746.728:ERROR:scoped_process_suspend.cc(40)] NtResumeProcess: 已尝试访问正在退出的过程。 (0xc000010a)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<div class="header-title">{{ title }}</div> <div class="header-title">{{ title }}</div>
<div class="button-group"> <div class="button-group">
<el-button size="small" @click="complete(1)">暂存</el-button> <el-button v-show="showStorage" size="small" @click="complete(1)">暂存</el-button>
<el-button type="primary" size="small" @click="complete(2)">完成</el-button> <el-button type="primary" size="small" @click="complete(2)">完成</el-button>
</div> </div>
<el-form <el-form
...@@ -235,6 +235,14 @@ ...@@ -235,6 +235,14 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-dialog title="确认上架" :visible.sync="dialogUp" width="30%" center>
<p class="dialog_p">该项目已关联<span> 0 </span>个子项目</p>
<p class="dialog_p">继续上架,将在APP端无法显示该项目</p>
<span slot="footer" class="dialog-footer">
<el-button @click="insertOrUpdate(2)">确认上架</el-button>
<el-button type="primary" @click="dialogUp = false">取消</el-button>
</span>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
...@@ -266,6 +274,7 @@ export default { ...@@ -266,6 +274,7 @@ export default {
curmbSecond: "项目组件", curmbSecond: "项目组件",
curmbThird: "新建入口", curmbThird: "新建入口",
title: "", title: "",
showStorage: false,
entryId: null, entryId: null,
peopleLevel: null, peopleLevel: null,
uploadImgMessage: false, uploadImgMessage: false,
...@@ -273,6 +282,8 @@ export default { ...@@ -273,6 +282,8 @@ export default {
imgMouseOver: false, imgMouseOver: false,
imgMouseOver2: false, imgMouseOver2: false,
organizationContent: "云鹊医", organizationContent: "云鹊医",
statusValue: 0,
dialogUp: false,
formData: { formData: {
entryName: "", entryName: "",
entryBegintime: "", entryBegintime: "",
...@@ -383,26 +394,34 @@ export default { ...@@ -383,26 +394,34 @@ export default {
if (vm.entryId == null) { if (vm.entryId == null) {
vm.title = "新建入口"; vm.title = "新建入口";
vm.curmbThird = "新建入口"; vm.curmbThird = "新建入口";
vm.showStorage = true;
} else { } else {
vm.title = "编辑入口"; vm.title = "编辑入口";
vm.curmbThird = "编辑入口"; vm.curmbThird = "编辑入口";
vm.showStorage = false;
} }
}, },
initOption() { setOption(data) {
vm.optionsProject = [ let list = [];
{ for(let i = 0; i<data.length ; i++) {
value: 1, let obj = {
label: "项目A" value: data[i].projectId,
}, label: data[i].projectName,
{ }
value: 2, list.push(obj);
label: "项目B" }
return list;
}, },
{ initOption() {
value: 3, vm.optionsProject = [];
label: "项目C" let req = {};
openLoading(vm);
vm.GET("portal/entryInfo/getProjectList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.optionsProject = vm.setOption(res.data);
} }
]; });
}, },
submitForm(formName) { submitForm(formName) {
let flag = null; let flag = null;
...@@ -601,6 +620,20 @@ export default { ...@@ -601,6 +620,20 @@ export default {
} }
vm.tagDrop(); vm.tagDrop();
}, },
initTags(value) {
vm.tagsProject = [];
let len = 0;
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < vm.optionsProject.length; j++) {
if (value[i] == vm.optionsProject[j].value) {
vm.tagsProject[len] = {};
vm.tagsProject[len].value = vm.optionsProject[j].value;
vm.tagsProject[len].name = vm.optionsProject[j].label;
len++;
}
}
}
},
handleCloseProject(tag) { handleCloseProject(tag) {
if (tag.disabled == true) { if (tag.disabled == true) {
return; return;
...@@ -624,13 +657,24 @@ export default { ...@@ -624,13 +657,24 @@ export default {
if (res.code == "000000") { if (res.code == "000000") {
vm.setEditData(res.data); vm.setEditData(res.data);
vm.entryOptionData = res.data; vm.entryOptionData = res.data;
console.log("portalEntryUniInfo", vm.entryOptionData); vm.statusValue = res.data.portalEntry.entryStatus;
// console.log("portalEntryUniInfo", vm.entryOptionData);
} else { } else {
vm.$message(res.message); vm.$message(res.message);
} }
}); });
}, },
setProject(data) {
let list = [];
for(let i = 0; i<data.length; i++) {
list.push(data[i].projectId);
}
return list;
},
setEditData(data) { setEditData(data) {
if(data.portalEntry.entryStatus === 1) {
vm.showStorage = true;
}
vm.formData = { vm.formData = {
entryName: data.portalEntry.entryName, entryName: data.portalEntry.entryName,
organizationName: data.portalEntry.organizationName, organizationName: data.portalEntry.organizationName,
...@@ -648,8 +692,11 @@ export default { ...@@ -648,8 +692,11 @@ export default {
}, },
attachmentMore2: { attachmentMore2: {
attachmentName: data.attachments[1].attachmentName, attachmentName: data.attachments[1].attachmentName,
} },
project: vm.setProject(data.subprojects),
}; };
let projectEdit = vm.setProject(data.subprojects);
vm.initTags(projectEdit);
}, },
complete(type) { complete(type) {
//1是暂存,2是完成 //1是暂存,2是完成
...@@ -670,11 +717,16 @@ export default { ...@@ -670,11 +717,16 @@ export default {
vm.formData.attachmentUrl1 != "" && vm.formData.attachmentUrl1 != "" &&
vm.formData.attachmentUrl2 != "" vm.formData.attachmentUrl2 != ""
) { ) {
if(vm.statusValue === 3 && vm.formData.project.length == 0) {
vm.dialogUp = true;
} else {
vm.insertOrUpdate(type); vm.insertOrUpdate(type);
} }
}
//完成 //完成
} else { } else {
//暂存 //暂存
vm.insertOrUpdate(type);
} }
}, },
insertOrUpdate(isCompleted) { insertOrUpdate(isCompleted) {
...@@ -711,6 +763,14 @@ export default { ...@@ -711,6 +763,14 @@ export default {
], ],
subprojects: [] subprojects: []
}; };
for(let i = 0;i < vm.tagsProject.length ; i++) {
portalEntryUniInfo.subprojects[i] = {
// entryId: vm.entryOptionData.portalEntry.id,
// id: vm.entryOptionData.portalEntry.id,
projectId: vm.tagsProject[i].value,
projectName: vm.tagsProject[i].label,
}
}
} else { } else {
portalEntryUniInfo = { portalEntryUniInfo = {
portalEntry: { portalEntry: {
...@@ -724,9 +784,7 @@ export default { ...@@ -724,9 +784,7 @@ export default {
entryName: vm.formData.entryName, entryName: vm.formData.entryName,
entryStatus: vm.entryOptionData.portalEntry.entryStatus, entryStatus: vm.entryOptionData.portalEntry.entryStatus,
id: vm.entryOptionData.portalEntry.id, id: vm.entryOptionData.portalEntry.id,
// modifiedId: 0, organizationId: 0,
// modifiedTime: "2019-11-11T05:51:12.811Z",
organizationId: vm.entryOptionData.portalEntry.createdId,
organizationName: vm.formData.organizationName organizationName: vm.formData.organizationName
}, },
attachments: [ attachments: [
...@@ -751,6 +809,16 @@ export default { ...@@ -751,6 +809,16 @@ export default {
], ],
subprojects: [] subprojects: []
}; };
for(let i = 0;i < vm.tagsProject.length ; i++) {
portalEntryUniInfo.subprojects[i] = {
// entryId: vm.entryOptionData.portalEntry.id,
// id: vm.entryOptionData.portalEntry.id,
projectId: vm.tagsProject[i].value,
projectName: vm.tagsProject[i].label,
}
}
console.log('tagsProject',vm.tagsProject);
// debugger;
} }
console.log("portalEntryUniInfo", portalEntryUniInfo); console.log("portalEntryUniInfo", portalEntryUniInfo);
openLoading(vm); openLoading(vm);
...@@ -775,6 +843,12 @@ export default { ...@@ -775,6 +843,12 @@ export default {
position: relative; position: relative;
padding: 10px; padding: 10px;
background: #fff; background: #fff;
.dialog_p {
text-align: center;
span{
font-weight: 700;
}
}
.header-title { .header-title {
padding: 10px 12px; padding: 10px 12px;
font-size: 12px; font-size: 12px;
...@@ -788,6 +862,15 @@ export default { ...@@ -788,6 +862,15 @@ export default {
z-index: 999; z-index: 999;
} }
.basic-form { .basic-form {
::-webkit-scrollbar
{
width: 4px;
height: 20px;
background-color: #D8D8D8;
}
::-webkit-scrollbar-thumb {
background-color: #D8D8D8;
}
position: relative; position: relative;
margin-top: 10px; margin-top: 10px;
.basic-item-icon { .basic-item-icon {
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog title="确认上架" :visible.sync="dialogUp" width="30%" center> <el-dialog title="确认上架" :visible.sync="dialogUp" width="30%" center>
<p v-if="childrenNum > 0" class="dialog_p">该项目已关联{{ childrenNum }}个子项目</p> <p v-if="childrenNum > 0" class="dialog_p">该项目已关联<span> {{ childrenNum }} </span>个子项目</p>
<p v-if="childrenNum > 0" class="dialog_p">确认要继续上架吗?</p> <p v-if="childrenNum > 0" class="dialog_p">确认要继续上架吗?</p>
<p v-if="childrenNum == 0" class="dialog_p">该项目已关联0个子项目</p> <p v-if="childrenNum == 0" class="dialog_p">该项目已关联<span> 0 </span>个子项目</p>
<p v-if="childrenNum == 0" class="dialog_p">继续上架,将在APP端无法显示该项目</p> <p v-if="childrenNum == 0" class="dialog_p">继续上架,将在APP端无法显示该项目</p>
<span v-if="childrenNum > 0" slot="footer" class="dialog-footer"> <span v-if="childrenNum > 0" slot="footer" class="dialog-footer">
<el-button @click="dialogUp = false">取消</el-button> <el-button @click="dialogUp = false">取消</el-button>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<p class="dialog_p">删除后,该项目将不存在</p> <p class="dialog_p">删除后,该项目将不存在</p>
<p class="dialog_p">同时释放该项目关联的所有子项目</p> <p class="dialog_p">同时释放该项目关联的所有子项目</p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="changeStatus(null,5)">确认上架</el-button> <el-button @click="changeStatus(null,5)">确认删除</el-button>
<el-button type="primary" @click="dialogDel = false">取消</el-button> <el-button type="primary" @click="dialogDel = false">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
tableData: [], tableData: [],
dialogUp: false, dialogUp: false,
dialogDel: false, dialogDel: false,
childrenNum: 1, childrenNum: 0,
scopeRow: {} scopeRow: {}
}; };
}, },
...@@ -170,13 +170,14 @@ export default { ...@@ -170,13 +170,14 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.formInline.pageSize = val; this.formInline.pageSize = val;
vm.searchData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.formInline.pageNo = val; this.formInline.pageNo = val;
vm.search();
}, },
toPage(id) { toPage(id) {
console.log(id);
if (id === undefined) { if (id === undefined) {
this.$router.push("edit-entry"); this.$router.push("edit-entry");
} else { } else {
...@@ -185,10 +186,12 @@ export default { ...@@ -185,10 +186,12 @@ export default {
}, },
openDialog(type, row) { openDialog(type, row) {
vm.scopeRow = row; vm.scopeRow = row;
vm.childrenNum = row.subprojectNum;
vm.dialogUp = true; vm.dialogUp = true;
}, },
changeStatus(id, changeTo) { changeStatus(id, changeTo) {
vm.dialogUp = false; vm.dialogUp = false;
vm.dialogDel = false;
let req = {}; let req = {};
let entryId = id; let entryId = id;
if (entryId == null) { if (entryId == null) {
...@@ -204,10 +207,22 @@ export default { ...@@ -204,10 +207,22 @@ export default {
).then(res => { ).then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
if(changeTo === 3) {
vm.$message({
message: '发布成功',
type: 'success'
});
} else {
vm.$message(res.message); vm.$message(res.message);
}
} else {
//失败
if(changeTo === 3) {
vm.$message.error('发布失败');
} else { } else {
vm.$message(res.message); vm.$message(res.message);
} }
}
vm.search(); vm.search();
}); });
}, },
...@@ -231,6 +246,9 @@ export default { ...@@ -231,6 +246,9 @@ export default {
background: #fff; background: #fff;
.dialog_p { .dialog_p {
text-align: center; text-align: center;
span{
font-weight: 700;
}
} }
.button-jump { .button-jump {
margin-right: 10px; margin-right: 10px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册