|
|
@ -56,8 +56,14 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue'; |
|
|
|
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; |
|
|
|
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; |
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; |
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; |
|
|
|
import { getValueType } from '/@/utils'; |
|
|
|
import { getValueType } from '/@/utils'; |
|
|
|
import { saveOrUpdate,select } from '../Topic.api'; |
|
|
|
import { saveOrUpdate,select,getdate } from '../Topic.api'; |
|
|
|
import { Form } from 'ant-design-vue'; |
|
|
|
import { Form } from 'ant-design-vue'; |
|
|
|
|
|
|
|
import {useRoute} from "vue-router"; |
|
|
|
|
|
|
|
import {demoArticleListApi} from "/@/api/demo/mainHome"; |
|
|
|
|
|
|
|
const $Route = useRoute() |
|
|
|
|
|
|
|
//把路由中的数据转化到组件中 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
const props = defineProps({ |
|
|
|
formDisabled: { type: Boolean, default: false }, |
|
|
|
formDisabled: { type: Boolean, default: false }, |
|
|
@ -101,12 +107,32 @@ const disabled = computed(()=>{ |
|
|
|
} |
|
|
|
} |
|
|
|
return props.formDisabled; |
|
|
|
return props.formDisabled; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
function routrtodate() { |
|
|
|
|
|
|
|
const annualCompid = $Route.query.annualCompid; |
|
|
|
|
|
|
|
formData.annualCompid = annualCompid; |
|
|
|
|
|
|
|
console.log( formData.annualCompid,annualCompid,'111') |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
routrtodate(); |
|
|
|
|
|
|
|
let compName = '' |
|
|
|
|
|
|
|
function getData() { |
|
|
|
|
|
|
|
return new Promise((resovle,rej) => { |
|
|
|
|
|
|
|
const annualCompid = $Route.query.annualCompid; |
|
|
|
|
|
|
|
getdate({ annualCompid:annualCompid }).then(res => { |
|
|
|
|
|
|
|
console.log(res,'2222') |
|
|
|
|
|
|
|
compName = res |
|
|
|
|
|
|
|
resovle(res) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
// getData(); |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新增 |
|
|
|
* 新增 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function add() { |
|
|
|
async function add() { |
|
|
|
|
|
|
|
const res = await getData() |
|
|
|
|
|
|
|
setFieldsValue({annualCompid:formData.annualCompid,annualCompid_dictText:res}) |
|
|
|
edit({}); |
|
|
|
edit({}); |
|
|
|
} |
|
|
|
} |
|
|
|
function change(record){ |
|
|
|
function change(record){ |
|
|
@ -166,6 +192,7 @@ async function submitForm() { |
|
|
|
* popup组件值改变事件 |
|
|
|
* popup组件值改变事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function setFieldsValue(map) { |
|
|
|
function setFieldsValue(map) { |
|
|
|
|
|
|
|
console.log(map) |
|
|
|
Object.keys(map).map((key) => { |
|
|
|
Object.keys(map).map((key) => { |
|
|
|
formData[key] = map[key]; |
|
|
|
formData[key] = map[key]; |
|
|
|
}); |
|
|
|
}); |
|
|
|