fix:修改案例无法显示问题

This commit is contained in:
lixg
2022-12-06 16:01:10 +08:00
parent eddf03ee75
commit a75f047bf2
3 changed files with 82 additions and 79 deletions

View File

@@ -51,12 +51,12 @@
<div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">200*200</div>
</div>
<div class="qrmbtn" @click="downloadQr(200)">
<!-- <div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">400*400</div>
</div>
<div class="qrmbtn" @click="downloadQr(200)">
<div class="btntext">800*800</div>
</div>
</div> -->
</div>
</div>
</div>

View File

@@ -47,13 +47,13 @@
<div class="main_table">
<a-table
v-if="edit"
v-if="edit"
class="ant-table-striped"
:row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
"
:row-selection="{
type:'radio',
type: 'radio',
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
@@ -63,7 +63,7 @@
:pagination="false"
/>
<a-table
v-else
v-else
class="ant-table-striped"
:row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null)
@@ -79,7 +79,7 @@
/>
<div class="pa">
<a-pagination
v-if="tableDataTotal>10"
v-if="tableDataTotal > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
@@ -216,7 +216,7 @@ export default {
state.apiTaskList = selectedRows;
};
const handelChangePage = (page, pageSize) => {
state.selectedRowKeys = []
state.selectedRowKeys = [];
state.currentPage = page;
state.pageSize = pageSize;
getAllCaseText();
@@ -224,7 +224,7 @@ export default {
const getTableDate = (tableData) => {
let data = tableData;
let array = [];
data.map((value, index) => {
data.map((value, index) => {
let obj = {
key: index,
authorId: value.authorId,
@@ -251,15 +251,15 @@ export default {
isTop: "",
})
.then((res) => {
console.log('案例列表',res)
if (res.status === 200) {
state.selectedRowKeys=[0]
for(let i=0;i<res.data.data.length;i++){
if(Number(res.data.data[i].casesId) == props.EditCaseId){
state.selectedRowKeys = [i]
console.log("案例列表", res);
if (res.data.code === 200) {
// state.selectedRowKeys = [0];
for (let i = 0; i < res.data.data.list.length; i++) {
if (Number(res.data.data.list[i].casesId) == props.EditCaseId) {
state.selectedRowKeys = [i];
}
}
getTableDate(res.data.data);
getTableDate(res.data.data.list);
}
})
.catch(() => {});
@@ -334,25 +334,25 @@ export default {
}
};
//搜索案例列表
const searchList = ()=> {
if(state.inputV1 !== ''){
getAllCaseText()
}else {
resetCase()
const searchList = () => {
if (state.inputV1 !== "") {
getAllCaseText();
} else {
resetCase();
}
}
};
//重置案例信息
const resetCase = () => {
state.inputV1 = ""
state.selectedRowKeys=[]
state.currentPage = 1
state.inputV1 = "";
state.selectedRowKeys = [];
state.currentPage = 1;
getAllCaseText();
};
onMounted(()=>{
onMounted(() => {
// let cookie =
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2Njk0MjgwNTAsImV4cCI6MTY2OTQzNTI1MCwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.9ea5ce6d4cd43c2c17f21a293e4dc0d362c2a404b9d50fae5c49fed5a238fb1a";
// setCookie("token", cookie, 10);
})
});
return {
...toRefs(state),
afterVisibleChange,

View File

@@ -1087,11 +1087,11 @@
><span style="color: #333333">BOEU实施</span></a-radio
>
</div>
</div>
</div>
<div class="set_content" v-if="isPass">
<div class="setc_name"><span>审核意见:</span></div>
<div class="setc_main">
<span style="color: #333333">{{passInfo}}</span>
<span style="color: #333333">{{ passInfo }}</span>
</div>
</div>
</div>
@@ -1106,7 +1106,10 @@
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch v-model:checked="docChecked" @change="checkedClose"></a-switch>
<a-switch
v-model:checked="docChecked"
@change="checkedClose"
></a-switch>
</div>
</div>
<div class="btnbox" style="margin: 20px">
@@ -2435,9 +2438,8 @@ export default {
authClassify: 3,
addAuthList: [],
switchopen: true,
isPass:false, // 是否审核未通过
passInfo:null, // 审核未通过原因说明
isPass: false, // 是否审核未通过
passInfo: null, // 审核未通过原因说明
});
const levelList = reactive({
@@ -2511,10 +2513,10 @@ export default {
let leng = res.data.data.stageList.length;
if (leng > 0) {
let taskarr = res.data.data.stageList;
console.log('11-22-33',taskarr)
if(taskarr.length==1){
if(taskarr[0].stageId == '0'){
taskarr[0].name = '无阶段任务'
console.log("11-22-33", taskarr);
if (taskarr.length == 1) {
if (taskarr[0].stageId == "0") {
taskarr[0].name = "无阶段任务";
}
}
state.taskSyllabus = taskarr;
@@ -3370,13 +3372,13 @@ export default {
console.log("get task", res.data.data);
if (res.data.code === 200) {
// 判断当前审核是否通过
if(res.data.data.projectAuditLogDtoList!==null){
console.log('审核信息是什么',res.data.data.projectAuditLogDtoList)
let dataset = res.data.data.projectAuditLogDtoList
for(let i=0;i<dataset.length;i++){
if(dataset[i].status==-5){
state.isPass = true
state.passInfo = dataset[i].description
if (res.data.data.projectAuditLogDtoList !== null) {
console.log("审核信息是什么", res.data.data.projectAuditLogDtoList);
let dataset = res.data.data.projectAuditLogDtoList;
for (let i = 0; i < dataset.length; i++) {
if (dataset[i].status == -5) {
state.isPass = true;
state.passInfo = dataset[i].description;
}
// isPass passInfo
}
@@ -3411,9 +3413,9 @@ export default {
state.type = info.type;
state.category = info.category;
state.noticeFlag = info.noticeFlag;
state.switchopen = info.attachSwitch==1?true:false
state.docChecked = info.attachSwitch==1?true:false;
state.switchopen = info.attachSwitch == 1 ? true : false;
state.docChecked = info.attachSwitch == 1 ? true : false;
// state.attach = info.attach;
// state.templateId = info.templateId;
state.sourceBelong = info.sourceBelongName;
@@ -3483,11 +3485,13 @@ export default {
// projectGroupId: 0,
projectId: state.projectId,
};
console.log("小组创建obj", obj);
editGroup(obj)
.then((res) => {
console.log("小组创建成功", res);
message.success("小组创建成功");
getGroup();
getStu();
})
.catch((err) => {
console.log("小组创建失败", err);
@@ -3569,40 +3573,39 @@ export default {
};
//end---------项目概览
// 设置上传图片开关
const checkedClose = (data, a) => {
// 设置上传图片开关
const checkedClose = (data, a) => {
console.log(data, a);
state.docChecked = data;
state.switchopen = data
state.switchopen = data;
// 更新开关状态
editProj({
attachSwitch:state.switchopen?1:-1,
boeFlag: state.boeFlag,
category: state.category,
courseSyncFlag: state.courseSyncFlag,
level: state.tlevel,
manager: state.manager,
managerId: state.managerId,
name: state.name,
notice: state.notice,
noticeFlag: state.noticeFlag,
parentId: state.parentId,
picUrl: state.picUrl,
projectId: Number(state.projectId),
remark: state.remark,
sourceBelongId: Number(state.tsourceBelong),
status: state.status,
systemId: state.tsystemId,
templateId: state.templateId || 0,
type: state.type,
attachSwitch: state.switchopen ? 1 : -1,
boeFlag: state.boeFlag,
category: state.category,
courseSyncFlag: state.courseSyncFlag,
level: state.tlevel,
manager: state.manager,
managerId: state.managerId,
name: state.name,
notice: state.notice,
noticeFlag: state.noticeFlag,
parentId: state.parentId,
picUrl: state.picUrl,
projectId: Number(state.projectId),
remark: state.remark,
sourceBelongId: Number(state.tsourceBelong),
status: state.status,
systemId: state.tsystemId,
templateId: state.templateId || 0,
type: state.type,
})
.then((res) => {
console.log("上传成功", res);
})
.then((res) => {
console.log("上传成功", res);
})
.catch((err) => {
console.log("上传失败了", err);
});
.catch((err) => {
console.log("上传失败了", err);
});
};
const handleChange = ({ file, fileList }) => {
@@ -3615,7 +3618,7 @@ export default {
let str = JSON.stringify(list);
console.log("str", str);
//要编辑项目
console.log('编辑的项目信息',{
console.log("编辑的项目信息", {
attach: str,
// beginTime: state.tstartTime.slice(0, 10),
boeFlag: state.boeFlag,
@@ -3637,9 +3640,9 @@ export default {
systemId: state.tsystemId,
templateId: state.templateId || 0,
type: state.type,
})
});
editProj({
attachSwitch:state.switchopen?1:-1,
attachSwitch: state.switchopen ? 1 : -1,
attach: str,
boeFlag: state.boeFlag,
category: state.category,
@@ -4028,7 +4031,7 @@ export default {
deFile,
toDate,
routered,
checkedClose
checkedClose,
};
},
};