提交 6b0a5cdc 编写于 作者: haochangdi's avatar haochangdi

增加模板项目预览和上架后的禁止选择

上级 a920a302
...@@ -62,6 +62,10 @@ export default { ...@@ -62,6 +62,10 @@ export default {
projectId: { projectId: {
type: String | Number, type: String | Number,
default: '' default: ''
},
status4Flag: {
type: String | Number,
default: 0
} }
}, },
data() { data() {
...@@ -75,12 +79,14 @@ export default { ...@@ -75,12 +79,14 @@ export default {
isLeaf: "isLeaf" isLeaf: "isLeaf"
}, },
treeData: [], treeData: [],
tagsRegion: [] tagsRegion: [],
isPreview:1 // 是否预览
} }
}, },
created() { created() {
vm = this; vm = this;
vm.initRange(); vm.initRange();
vm.isPreview = vm.$route.query.isPreview ? vm.$route.query.isPreview : 0;
}, },
methods: { methods: {
//选择范围 初始化 //选择范围 初始化
...@@ -108,7 +114,13 @@ export default { ...@@ -108,7 +114,13 @@ export default {
let administrativeAll = res.data.administrativeAll; let administrativeAll = res.data.administrativeAll;
let administrative = res.data.administrative; let administrative = res.data.administrative;
vm.treeData = []; vm.treeData = [];
if (vm.isPreview ==1 ){
vm.setDisable(administrativeAll)
}
vm.treeData[0] = administrativeAll; vm.treeData[0] = administrativeAll;
console.log('================== administrativeAll==================');
console.log( administrativeAll);
console.log('====================================');
vm.setTreeData(administrative); vm.setTreeData(administrative);
// vm.getCheckedTree(); // vm.getCheckedTree();
} }
...@@ -198,8 +210,6 @@ export default { ...@@ -198,8 +210,6 @@ export default {
//添加子节点 //添加子节点
append(data, node) { append(data, node) {
console.log('=========================append') console.log('=========================append')
console.log("data:", data);
console.log("node:", node);
if (data.children.length == 0) { if (data.children.length == 0) {
//let id = data.id + "add"; //let id = data.id + "add";
let statusValue = 0; let statusValue = 0;
...@@ -239,8 +249,10 @@ export default { ...@@ -239,8 +249,10 @@ export default {
}, },
//删除label节点 同步树结构 //删除label节点 同步树结构
handleCloseTree(tag) { handleCloseTree(tag) {
console.log('=========================handleCloseTree') console.log('===============status4Flag=====================');
if (vm.status4Flag != 1) { console.log(vm.status4Flag);
console.log('====================================');
if (vm.status4Flag != 1 || vm.isPreview == 1) {
vm.tagsRegion.splice(vm.tagsRegion.indexOf(tag), 1); vm.tagsRegion.splice(vm.tagsRegion.indexOf(tag), 1);
vm.setCheckedKeys(vm.tagsRegion); vm.setCheckedKeys(vm.tagsRegion);
} }
...@@ -315,6 +327,15 @@ export default { ...@@ -315,6 +327,15 @@ export default {
//重构内容 //重构内容
return allSelectedKeys; return allSelectedKeys;
}, },
// 预览时设置全部不可以选
setDisable(r) {
r.disabled = true;
if (r.children.length) {
for(let i = 0; i < r.children.length; i++) {
vm.setDisable(r.children[i])
}
}
}
} }
} }
</script> </script>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</el-form-item> </el-form-item>
<el-form-item style="float:right;"> <el-form-item style="float:right;">
<el-upload <el-upload
v-if="idType == 1 && status4Flag != 1" v-if="status4Flag != 1"
class="upload-excel" class="upload-excel"
action="#" action="#"
accept=".xlsx" accept=".xlsx"
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
:limit="1" :limit="1"
:before-upload="uploadOrganization" :before-upload="uploadOrganization"
> >
<el-button size="small">导入机构名单</el-button> <el-button size="small" :disabled="isPreview==1">导入机构名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button> <el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button>
</el-upload> </el-upload>
<div v-if="idType == 1 && status4Flag == 1"> <div v-if="status4Flag == 1">
<el-button size="small" @click="dialogUpload = true">导入机构名单</el-button> <el-button size="small" @click="dialogUpload = true" :disabled="isPreview==1">导入机构名单</el-button>
<el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button> <el-button class="down-button" slot="tip" size="small" @click="download('organization')">下载导入模板</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -94,7 +94,36 @@ ...@@ -94,7 +94,36 @@
:total="totalOrganization" :total="totalOrganization"
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog title="提醒" :visible.sync="dialogUpload" width="30%" center >
<p style="text-align:center">该项目为上架状态,确定要导入机构名单吗?</p>
<span slot="footer" class="dialog-footer">
<el-upload
class="upload-excel"
action="#"
accept=".xlsx"
:limit="1"
:before-upload="uploadOrganization"
>
<el-button class="down-button-close" slot="tip" size="small" @click="dialogUpload = false">取消</el-button>
<el-button @click="closeUpload()" type="primary" size="small">继续导入</el-button>
</el-upload>
</span>
</el-dialog>
<el-dialog
title="导入成功"
:visible.sync="dialogSuccess"
width="30%"
class="dialog-success"
center
>
<p>
本次成功导入
<span class="upload-text">{{ updateNum }}</span> 数据
</p>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="dialogSuccess = false">关闭</el-button>
</span>
</el-dialog>
<el-dialog title="导入失败" :visible.sync="dialogFail" width="30%" class="dialog-fail" center> <el-dialog title="导入失败" :visible.sync="dialogFail" width="30%" class="dialog-fail" center>
<div class="fail-type" v-if="failType == 1"> <div class="fail-type" v-if="failType == 1">
<p>导入数据量已超限额,请修正后再次导入</p> <p>导入数据量已超限额,请修正后再次导入</p>
...@@ -126,23 +155,6 @@ ...@@ -126,23 +155,6 @@
@click="closeFail()" @click="closeFail()"
>重新导入</el-button> >重新导入</el-button>
</el-upload> </el-upload>
<el-upload
v-if="uploadType == 'person'"
class="upload-button"
action="#"
accept=".xlsx"
multiple
:limit="1"
:before-upload="uploadPerson"
>
<el-button slot="tip" class="down-button-close" size="small" @click="dialogFail = false">取消</el-button>
<el-button
stype="position: absolute;top: -14px;"
type="primary"
size="small"
@click="closeFail()"
>重新导入</el-button>
</el-upload>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -167,6 +179,10 @@ export default { ...@@ -167,6 +179,10 @@ export default {
projectId:{ projectId:{
type: String | Number, type: String | Number,
default:'' default:''
},
status4Flag: {
type: String | Number,
default: 0
} }
}, },
data() { data() {
...@@ -174,7 +190,6 @@ export default { ...@@ -174,7 +190,6 @@ export default {
getRowKeys(row) { getRowKeys(row) {
return row.id; return row.id;
}, },
status4Flag: '',
checkTableState: { checkTableState: {
multipleOrganization: "", multipleOrganization: "",
multipleDepartment: "", multipleDepartment: "",
...@@ -240,11 +255,14 @@ export default { ...@@ -240,11 +255,14 @@ export default {
} }
} }
}, },
regio: '' //设定行政范围选择的范围 regio: '', //设定行政范围选择的范围
dialogUpload: false,
isPreview:1 // 是否预览
} }
}, },
created() { created() {
vm = this; vm = this;
vm.isPreview = vm.$route.query.isPreview ? vm.$route.query.isPreview : 0;
vm.idType = localStorage.getItem("storageIdType"); vm.idType = localStorage.getItem("storageIdType");
// vm.getOrganization(); // vm.getOrganization();
vm.getRegionOption(); vm.getRegionOption();
...@@ -278,7 +296,6 @@ export default { ...@@ -278,7 +296,6 @@ export default {
if (res.code == "000000") { if (res.code == "000000") {
vm.tableOrganization = res.data.organizationList; vm.tableOrganization = res.data.organizationList;
vm.totalOrganization = res.data.total; vm.totalOrganization = res.data.total;
vm.initOrganizationStatus(); vm.initOrganizationStatus();
} else { } else {
vm.$message(res.message); vm.$message(res.message);
...@@ -335,7 +352,7 @@ export default { ...@@ -335,7 +352,7 @@ export default {
selectableTableList(row, index) { selectableTableList(row, index) {
console.log('=========================selectableTableList') console.log('=========================selectableTableList')
// if (vm.status4Flag == 1) { // if (vm.status4Flag == 1) {
if (row.modifyFlag == 1) { if (row.modifyFlag == 1 || vm.isPreview==1) {
return false; return false;
} }
return true; return true;
...@@ -356,7 +373,7 @@ export default { ...@@ -356,7 +373,7 @@ export default {
searchForm.name == "" searchForm.name == ""
) { ) {
vm.searchOrganizationType = ""; vm.searchOrganizationType = "";
vm.getOrganization(); vm.getOrganization(vm.regio);
} else { } else {
vm.searchOrganizationType = "choose"; vm.searchOrganizationType = "choose";
vm.getOrganizationChoose(); vm.getOrganizationChoose();
...@@ -431,7 +448,7 @@ export default { ...@@ -431,7 +448,7 @@ export default {
if (vm.searchOrganizationType == "choose") { if (vm.searchOrganizationType == "choose") {
vm.getOrganizationChoose(); vm.getOrganizationChoose();
} else { } else {
vm.getOrganization(); vm.getOrganization(vm.regio);
} }
}, },
//机构table中勾选一个 //机构table中勾选一个
...@@ -500,10 +517,6 @@ export default { ...@@ -500,10 +517,6 @@ export default {
downloadUrl = getExeclUrl( downloadUrl = getExeclUrl(
"%E6%95%99%E5%9F%B9%E9%A1%B9%E7%9B%AE%E8%AE%BE%E7%BD%AE%E6%9C%BA%E6%9E%84%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx" "%E6%95%99%E5%9F%B9%E9%A1%B9%E7%9B%AE%E8%AE%BE%E7%BD%AE%E6%9C%BA%E6%9E%84%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx"
); );
} else if (type == "person") {
downloadUrl = getExeclUrl(
"%E6%95%99%E5%9F%B9%E9%A1%B9%E7%9B%AE%E8%AE%BE%E7%BD%AE%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx"
);
} else if (type == "fail") { } else if (type == "fail") {
downloadUrl = vm.failExcelUrl; downloadUrl = vm.failExcelUrl;
} }
...@@ -558,12 +571,9 @@ export default { ...@@ -558,12 +571,9 @@ export default {
let administrativeIdItem = operationData.setAdministrativeId( let administrativeIdItem = operationData.setAdministrativeId(
vm.formOrganization.administrativeIdList vm.formOrganization.administrativeIdList
); );
console.log('====================administrativeIdItem ================');
console.log(administrativeIdItem );
console.log('====================================');
let req = { let req = {
projectId: vm.projectId, projectId: vm.projectId,
administrativeId: administrativeIdItem, administrativeId: administrativeIdItem == '000_0' ? '000' : administrativeIdItem,
hospitalLevel: vm.formOrganization.level, hospitalLevel: vm.formOrganization.level,
hospitalName: vm.formOrganization.name, hospitalName: vm.formOrganization.name,
pageNum: vm.formOrganization.pageNum, pageNum: vm.formOrganization.pageNum,
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
placeholder="请输入项目名称" placeholder="请输入项目名称"
style="width:70%;" style="width:70%;"
ref="projectName" ref="projectName"
:disabled="isPreview==1"
></el-input> ></el-input>
<span class="word-num">{{(formData.projectName).replace(/\s+/g,"").length}}/24</span> <span class="word-num">{{(formData.projectName).replace(/\s+/g,"").length}}/24</span>
</el-col> </el-col>
...@@ -32,9 +33,10 @@ ...@@ -32,9 +33,10 @@
@input="changeOrganizationName" @input="changeOrganizationName"
@blur = "blurName" @blur = "blurName"
@focus = "focusName(index)" @focus = "focusName(index)"
:disabled="isPreview==1"
></el-input> ></el-input>
<span class="word-num">{{(formData.organizationNameList[index]).replace(/\s+/g,"").length}}/16</span> <span class="word-num">{{(formData.organizationNameList[index]).replace(/\s+/g,"").length}}/16</span>
<img @click="plusOrg(index)" class="edit-img" src="../../../assets/image/plus.png" /> <img @click="plusOrg(index)" class="edit-img" src="../../../assets/image/plus.png" v-if="isPreview!=1"/>
<img @click="deleteOrg(index)" v-if="index >= 1" class="edit-img" src="../../../assets/image/trash.png" /> <img @click="deleteOrg(index)" v-if="index >= 1" class="edit-img" src="../../../assets/image/trash.png" />
</el-col> </el-col>
<el-popover <el-popover
...@@ -59,7 +61,7 @@ ...@@ -59,7 +61,7 @@
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0" :picker-options="pickerOptions0"
style="width: 100%;" style="width: 100%;"
:disabled="formData.status4Flag == 1" :disabled="formData.status4Flag == 1 || isPreview==1"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -75,6 +77,7 @@ ...@@ -75,6 +77,7 @@
:picker-options="pickerOptions1" :picker-options="pickerOptions1"
default-time="23:59:59" default-time="23:59:59"
style="width: 100%;" style="width: 100%;"
:disabled="isPreview==1"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -178,6 +181,7 @@ ...@@ -178,6 +181,7 @@
placeholder="请输入项目简介" placeholder="请输入项目简介"
v-model="formData.projectIntro" v-model="formData.projectIntro"
style="width:83%;" style="width:83%;"
:disabled="isPreview==1"
></el-input> ></el-input>
<span class="word-num">{{(formData.projectIntro).replace(/\s+/g,"").length}}/200</span> <span class="word-num">{{(formData.projectIntro).replace(/\s+/g,"").length}}/200</span>
</el-col> </el-col>
...@@ -340,6 +344,7 @@ export default { ...@@ -340,6 +344,7 @@ export default {
confirmMsg: '取消', confirmMsg: '取消',
hideMsg: '重新选择' hideMsg: '重新选择'
}, },
isPreview: 0
} }
}, },
components: { components: {
...@@ -347,6 +352,7 @@ export default { ...@@ -347,6 +352,7 @@ export default {
}, },
created() { created() {
vm = this; vm = this;
vm.isPreview = vm.$route.query.isPreview ? vm.$route.query.isPreview : 0;
if (vm.editor) { if (vm.editor) {
// 编辑时 // 编辑时
vm.disabled = false; vm.disabled = false;
...@@ -368,12 +374,11 @@ export default { ...@@ -368,12 +374,11 @@ export default {
vm.formData.projectBegintime = vm.formData.projectBegintime ? new Date(vm.formData.projectBegintime) : ''; vm.formData.projectBegintime = vm.formData.projectBegintime ? new Date(vm.formData.projectBegintime) : '';
vm.formData.projectEndtime = vm.formData.projectBegintime ? new Date(vm.formData.projectEndtime) : ''; vm.formData.projectEndtime = vm.formData.projectBegintime ? new Date(vm.formData.projectEndtime) : '';
if (data.attachmentData[1]) { if (data.attachmentData[1]) {
// vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentType == 1 ? data.attachmentData[1].attachmentUrl : '';
// vm.formData.attachmentUrl3 = data.attachmentData[1].attachmentType == 2 ? data.attachmentData[1].attachmentUrl : '';
vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentUrl; vm.formData.attachmentUrl2 = data.attachmentData[1].attachmentUrl;
vm.formData.type = data.attachmentData[1].attachmentType; vm.formData.type = data.attachmentData[1].attachmentType;
vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, data.attachmentData[1]); vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, data.attachmentData[1]);
} }
vm.$emit('setStatus4Flag',data.projectData.status4Flag)
}, },
// 获取选择模板后的基本信息 // 获取选择模板后的基本信息
getMessage() { getMessage() {
...@@ -382,7 +387,7 @@ export default { ...@@ -382,7 +387,7 @@ export default {
.then(res => { .then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
this.$emit('hideSave',res.data.projectData.projectStatus < 2) this.$emit('hideSave',res.data.projectData.projectStatus)
vm.setBaseMessage(res.data); vm.setBaseMessage(res.data);
} else { } else {
vm.$message.info(res.message); vm.$message.info(res.message);
...@@ -400,7 +405,7 @@ export default { ...@@ -400,7 +405,7 @@ export default {
.then(res => { .then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
this.$emit('hideSave',res.data.projectData.projectStatus < 2) this.$emit('hideSave',res.data.projectData.projectStatus)
vm.setBaseMessage(res.data) vm.setBaseMessage(res.data)
} else { } else {
vm.$message.info(res.message); vm.$message.info(res.message);
...@@ -623,17 +628,24 @@ export default { ...@@ -623,17 +628,24 @@ export default {
baseobj.attachmentPDFModel= null; baseobj.attachmentPDFModel= null;
baseobj.notifyData= null; baseobj.notifyData= null;
openLoading(vm); openLoading(vm);
vm.POST("portal/portalInfo/insertOrUpdate", baseobj).then(res => { vm.POST("portal/portalInfo/insertOrUpdate", baseobj)
.then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
// 下一步,并将项目id传递 // 下一步,并将项目id传递给父组件
vm.$emit('next',res.data.id); vm.$emit('next',res.data.id);
} else if (res.code == "213061") { } else if (res.code == "213061") {
vm.dialogObj.visible = true; vm.dialogObj.visible = true;
} else { } else {
vm.$message.info(res.message); vm.$message.warning(res.message);
} }
})
.catch((err) => {
vm.$message({
type: "warning",
message: res.message
}); });
})
}, },
//表单校验 //表单校验
submitForm(formName) { submitForm(formName) {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</el-col> </el-col>
<el-col :span="5" :offset="5"> <el-col :span="5" :offset="5">
<div v-if="!canNext" class="dis-btn">下一步</div> <div v-if="!canNext" class="dis-btn">下一步</div>
<el-button v-if="active!=0 && showSave" size="small" @click="save">暂存</el-button> <el-button v-if="active!=0 && projectStatus==1" size="small" @click="save">暂存</el-button>
<el-button v-if="active!==2 && canNext" size="small" type="primary" @click="nextStep">下一步</el-button> <el-button v-if="active!==2 && canNext" size="small" type="primary" @click="nextStep">下一步</el-button>
<el-button v-if="active==2" size="small" type="primary" @click="complete">完成</el-button> <el-button v-if="active==2" size="small" type="primary" @click="complete">完成</el-button>
</el-col> </el-col>
...@@ -37,16 +37,17 @@ ...@@ -37,16 +37,17 @@
@next="next" @next="next"
@backSelectVue="backSelectVue" @backSelectVue="backSelectVue"
@hideSave="hideSave" @hideSave="hideSave"
@setStatus4Flag="setStatus4Flag"
/> />
<!-- 选择学员 --> <!-- 选择学员 -->
<div class="three-step" v-if="active === 2"> <div class="three-step" v-if="active === 2">
<el-tabs v-model="activeName" @tab-click="handleClickTabs"> <el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane label="设定行政范围" name="first"> <el-tab-pane label="设定行政范围" name="first">
<select-region ref="selectRegion" :projectId="projectId"></select-region> <select-region ref="selectRegion" :projectId="projectId" :status4Flag="status4Flag"></select-region>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设定机构" name="second"> <el-tab-pane label="设定机构" name="second">
<set-organization ref="setOrganization" :projectId="projectId"></set-organization> <set-organization ref="setOrganization" :projectId="projectId" :status4Flag="status4Flag"></set-organization>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -126,7 +127,8 @@ export default { ...@@ -126,7 +127,8 @@ export default {
confirmMsg: '取消', confirmMsg: '取消',
hideMsg: '确定发布' hideMsg: '确定发布'
}, },
showSave: false projectStatus: 1, //1.草稿 2.未上架 3.审核中/待审核 4.已上架 5.已下架 6.已拒绝/未上架
status4Flag: 0//0表示没有上过架,1表示上过架
} }
}, },
components: { components: {
...@@ -146,6 +148,7 @@ export default { ...@@ -146,6 +148,7 @@ export default {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
// 判断是否为编辑状态
isEditorFn(){ isEditorFn(){
if(vm.$route.query.projectId) { if(vm.$route.query.projectId) {
vm.projectId = vm.$route.query.projectId; vm.projectId = vm.$route.query.projectId;
...@@ -154,18 +157,19 @@ export default { ...@@ -154,18 +157,19 @@ export default {
vm.canNext = true; vm.canNext = true;
} }
}, },
// 下一步 // 按钮点击下一步
nextStep() { nextStep() {
if (vm.active == 0) { if (vm.active == 0) {
vm.checkSelectTemplate() vm.checkSelectTemplate()
return; return;
} }
if (vm.active == 1) { if (vm.active == 1) {
// 调用项目信息中的下一步操作
vm.$refs.templateMessage.nextStep(); vm.$refs.templateMessage.nextStep();
return; return;
} }
}, },
// 填写项目信息组件的下一步回调 // 填写项目信息组件的下一步回调(获取项目id)
next(id) { next(id) {
vm.projectId = id; vm.projectId = id;
vm.active = 2; vm.active = 2;
...@@ -183,8 +187,14 @@ export default { ...@@ -183,8 +187,14 @@ export default {
}, },
// 完成 // 完成
complete() { complete() {
// 4不弹框
if (vm.projectStatus !=4) {
vm.sendObj.visible = true; vm.sendObj.visible = true;
} else {
vm.hidefn();
}
}, },
// 完成触发的接口
hidefn() { hidefn() {
vm.regionComplete(vm.changeStatus()); vm.regionComplete(vm.changeStatus());
}, },
...@@ -197,7 +207,8 @@ export default { ...@@ -197,7 +207,8 @@ export default {
flag: fishFn ? 3 : 1, //0:下一步 1:暂存 flag: fishFn ? 3 : 1, //0:下一步 1:暂存
}; };
openLoading(vm); openLoading(vm);
vm.POST("portal/new/scope", req).then(res => { vm.POST("portal/new/scope", req)
.then(res => {
closeLoading(vm); closeLoading(vm);
if(res.code == '000000' && fishFn) { if(res.code == '000000' && fishFn) {
fishFn(); fishFn();
...@@ -208,7 +219,13 @@ export default { ...@@ -208,7 +219,13 @@ export default {
message: res.message message: res.message
}); });
} }
})
.catch(() => {
vm.$message({
type: "warning",
message: res.message
}); });
})
}, },
// 完成后更改状态 // 完成后更改状态
changeStatus() { changeStatus() {
...@@ -219,11 +236,18 @@ export default { ...@@ -219,11 +236,18 @@ export default {
vm.POST("portal/portalInfo/changeStatus", req) vm.POST("portal/portalInfo/changeStatus", req)
.then(res => { .then(res => {
vm.sendObj.visible = false; vm.sendObj.visible = false;
if(res.code == '000000') {
let query = {}; let query = {};
if (vm.$route.query.pageNum) { if (vm.$route.query.pageNum) {
query = { pageNum: vm.$route.query.pageNum }; query = { pageNum: vm.$route.query.pageNum };
} }
vm.$router.push({ path: "item-manager", query: query }); vm.$router.push({ path: "item-manager", query: query });
} else {
vm.$message({
type: "warning",
message: res.message
});
}
}) })
.catch(() => { .catch(() => {
vm.$message({ vm.$message({
...@@ -285,8 +309,12 @@ export default { ...@@ -285,8 +309,12 @@ export default {
vm.active = 0; vm.active = 0;
}, },
// 是否隐藏暂存按钮 // 是否隐藏暂存按钮
hideSave(flag) { hideSave(num) {
this.showSave = flag; this.projectStatus = num;
},
// 从子组件(项目信息)获取项目状态是否为上架
setStatus4Flag(s) {
vm.status4Flag = s;
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册