完成合同管理模块和公共参数模块
This commit is contained in:
@@ -26,13 +26,14 @@
|
||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
import SelectData from './components/select-data.vue';
|
||||
import { Customer } from '@/api/oa/customer/model';
|
||||
import { TowerModel } from '@/api/tower/model/model';
|
||||
|
||||
withDefaults(
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
value?: any;
|
||||
customerType?: string;
|
||||
placeholder?: string;
|
||||
index?: number;
|
||||
}>(),
|
||||
{
|
||||
placeholder: '请选择数据'
|
||||
@@ -40,7 +41,7 @@
|
||||
);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', Customer): void;
|
||||
(e: 'done', TowerModel): void;
|
||||
(e: 'clear'): void;
|
||||
(e: 'multiple', any): void;
|
||||
}>();
|
||||
@@ -48,16 +49,17 @@
|
||||
// 是否显示编辑弹窗
|
||||
const showEdit = ref(false);
|
||||
// 当前编辑数据
|
||||
const current = ref<Customer | null>(null);
|
||||
const current = ref<TowerModel | null>(null);
|
||||
|
||||
/* 打开编辑弹窗 */
|
||||
const openEdit = (row?: Customer) => {
|
||||
const openEdit = (row?: TowerModel) => {
|
||||
current.value = row ?? null;
|
||||
showEdit.value = true;
|
||||
};
|
||||
|
||||
const onChange = (row) => {
|
||||
console.log(row);
|
||||
// 第几行
|
||||
row.index = Number(props.index);
|
||||
emit('done', row);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user