mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
..
This commit is contained in:
@@ -81,9 +81,8 @@
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { editRoutered } from '@/api/indexLearningPath'
|
||||
import { message } from "ant-design-vue";
|
||||
// import { watch } from '@vue/runtime-core'
|
||||
// import { editRoutered } from '@/api/indexLearningPath'
|
||||
// import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "UnlockMode",
|
||||
props:{
|
||||
@@ -91,7 +90,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
routerInfo:{
|
||||
objData:{
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
@@ -116,19 +115,19 @@ export default {
|
||||
checked: true,
|
||||
radioSelect: 1,
|
||||
formData: {
|
||||
routerId:'',
|
||||
organizationName:'',
|
||||
organizationId:'',
|
||||
name:'',
|
||||
picUrl:'',
|
||||
remark:'',
|
||||
status:'', // 0 草稿 1 已发布 -1 已停用
|
||||
attach:'',
|
||||
attachSwitch:'',
|
||||
enablePreview:'',
|
||||
previewSetting:'',
|
||||
enableStudy:'',
|
||||
studySetting:'',
|
||||
// routerId:'',
|
||||
// organizationName:'',
|
||||
// organizationId:'',
|
||||
// name:'',
|
||||
// picUrl:'',
|
||||
// remark:'',
|
||||
// status:'', // 0 草稿 1 已发布 -1 已停用
|
||||
// attach:'',
|
||||
// attachSwitch:'',
|
||||
// enablePreview:'',
|
||||
// previewSetting:'',
|
||||
// enableStudy:'',
|
||||
// studySetting:'',
|
||||
unlockMode:'',
|
||||
}
|
||||
});
|
||||
@@ -142,35 +141,26 @@ export default {
|
||||
|
||||
|
||||
const saveUnlock =() =>{
|
||||
editRoutered(state.formData).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
message.success(res.data.msg)
|
||||
ctx.emit("successA")
|
||||
closeDrawer()
|
||||
}else{
|
||||
message.error(res.data.msg)
|
||||
}
|
||||
}).catch(e=>{
|
||||
console.log(e)
|
||||
message.error(e.data.msg)
|
||||
})
|
||||
console.log(ctx,state.formData.unlockMode)
|
||||
ctx.emit("saveUnlock",state.formData.unlockMode)
|
||||
// editRoutered(state.formData).then(res=>{
|
||||
// if(res.data.code == 200){
|
||||
// message.success(res.data.msg)
|
||||
// ctx.emit("successA")
|
||||
// closeDrawer()
|
||||
// }else{
|
||||
// message.error(res.data.msg)
|
||||
// }
|
||||
// }).catch(e=>{
|
||||
// console.log(e)
|
||||
// message.error(e.data.msg)
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
// watch:{
|
||||
// unlockModeVisible(val){
|
||||
// if(val){
|
||||
// for(let key in this.formData){
|
||||
// this.formData[key] = this.routerInfo[key]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
if(bool){
|
||||
for(let key in state.formData){
|
||||
state.formData[key] = props.routerInfo[key]
|
||||
state.formData[key] = props.objData[key]
|
||||
}
|
||||
if(state.formData.unlockMode === 1){
|
||||
state.selectClassifyType = 1
|
||||
@@ -179,6 +169,7 @@ export default {
|
||||
state.radioSelect = state.formData.unlockMode
|
||||
}
|
||||
}
|
||||
console.log("点开弹窗",state.formData,state.unlockMode)
|
||||
};
|
||||
|
||||
const selectClassify = (e) => {
|
||||
@@ -186,13 +177,11 @@ export default {
|
||||
if(e.type === 1){
|
||||
state.formData.unlockMode = e.type
|
||||
}
|
||||
// state.formData.unlockMode = e.type
|
||||
};
|
||||
|
||||
const changeUnlockMode = (e) =>{
|
||||
|
||||
state.formData.unlockMode = e.target.value
|
||||
console.log(e,state.formData)
|
||||
state.formData.unlockMode = e.target.value
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user