更新
This commit is contained in:
@ -149,13 +149,10 @@ const handleNum = (val) => {
|
|||||||
|
|
||||||
watch(() => props.modelValue, (newVal) => {
|
watch(() => props.modelValue, (newVal) => {
|
||||||
listQuery.value = newVal; //赋值
|
listQuery.value = newVal; //赋值
|
||||||
console.log(newVal,'===newVal');
|
|
||||||
|
|
||||||
}, { immediate: true, deep: true });
|
}, { immediate: true, deep: true });
|
||||||
|
|
||||||
watch(() => listQuery.value, (newVal) => {
|
watch(() => listQuery.value, (newVal) => {
|
||||||
emits('update:modelValue', newVal)
|
emits('update:modelValue', newVal)
|
||||||
console.log(newVal,'===newVal111');
|
|
||||||
}, { immediate: true, deep: true });
|
}, { immediate: true, deep: true });
|
||||||
|
|
||||||
defineExpose({ submit, reset });
|
defineExpose({ submit, reset });
|
||||||
|
|||||||
@ -86,7 +86,7 @@ function open(row) {
|
|||||||
|
|
||||||
function getList () {
|
function getList () {
|
||||||
pageData.tableConfiger.loading = true;
|
pageData.tableConfiger.loading = true;
|
||||||
qcckPost({ }, "/mosty-base/baxx/dwgl/list").then((res) => {
|
qcckPost({ keyword : localStorage.getItem('idEntityCard') }, "/mosty-base/baxx/dwgl/list").then((res) => {
|
||||||
let arr = res || []
|
let arr = res || []
|
||||||
pageData.tableData = arr.filter(item => item.type == '02')
|
pageData.tableData = arr.filter(item => item.type == '02')
|
||||||
pageData.tableConfiger.loading = false;
|
pageData.tableConfiger.loading = false;
|
||||||
|
|||||||
@ -9,15 +9,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cntinfo">
|
<div class="cntinfo">
|
||||||
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
||||||
|
<template #pxgs>
|
||||||
|
<el-input v-model="formData.pxgs" @click="selectPxgs" readonly placeholder="请选择培训公司"></el-input>
|
||||||
|
</template>
|
||||||
<template #lzsj>
|
<template #lzsj>
|
||||||
<el-input v-model="formData.lzsj" disabled placeholder="请选择离职时间"></el-input>
|
<el-input v-model="formData.lzsj" disabled placeholder="请选择离职时间"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</FormMessage>
|
</FormMessage>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 选择公司 -->
|
||||||
|
<ChooseCompany ref="RefConmay" @change="changePxgs"></ChooseCompany>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import ChooseCompany from './chooseCompany.vue'
|
||||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||||
import { qcckPost } from "@/api/qcckApi.js";
|
import { qcckPost } from "@/api/qcckApi.js";
|
||||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||||
@ -28,7 +34,7 @@ const title = ref('新增从业人员')
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
const FormRef = ref(null)
|
const FormRef = ref(null)
|
||||||
|
const RefConmay = ref()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -56,6 +62,9 @@ const formList = reactive([
|
|||||||
{ label: "资格证截至日期", prop: "zgzJssj", type: "date" },
|
{ label: "资格证截至日期", prop: "zgzJssj", type: "date" },
|
||||||
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
|
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
{ label: "培训公司", prop: "pxgs", type: "slot" },
|
||||||
|
],
|
||||||
[
|
[
|
||||||
{ label: "外派单位", prop: "wpdw", type: "input" },
|
{ label: "外派单位", prop: "wpdw", type: "input" },
|
||||||
],
|
],
|
||||||
@ -76,10 +85,20 @@ const rules = {
|
|||||||
zgzKssj: [{ required: true, message: "请选择资格证起始日期", trigger: "change" }],
|
zgzKssj: [{ required: true, message: "请选择资格证起始日期", trigger: "change" }],
|
||||||
zgzJssj: [{ required: true, message: "请选择资格证截至日期", trigger: "blur" }],
|
zgzJssj: [{ required: true, message: "请选择资格证截至日期", trigger: "blur" }],
|
||||||
whcd: [{ required: true, message: "请选择文化程度", trigger: "change" }],
|
whcd: [{ required: true, message: "请选择文化程度", trigger: "change" }],
|
||||||
|
pxgs: [{ required: true, message: "请选择培训公司", trigger: "change" }],
|
||||||
}
|
}
|
||||||
|
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
|
|
||||||
|
const selectPxgs = () => {
|
||||||
|
RefConmay.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
const changePxgs = (data) => {
|
||||||
|
formData.value.pxgs = data.pxgs
|
||||||
|
formData.value.pxgsid = data.pxgsid
|
||||||
|
}
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
FormRef.value?.reset();
|
FormRef.value?.reset();
|
||||||
formData.value = {}
|
formData.value = {}
|
||||||
@ -89,14 +108,10 @@ const close = () => {
|
|||||||
const open = (row = {}, type = 'add') => {
|
const open = (row = {}, type = 'add') => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
disabled.value = false
|
disabled.value = false
|
||||||
|
|
||||||
const fieldsToSplit = ['tp', 'bazzp'];
|
const fieldsToSplit = ['tp', 'bazzp'];
|
||||||
fieldsToSplit.forEach(field => {
|
fieldsToSplit.forEach(field => {
|
||||||
row[field] = typeof row[field] === 'string'
|
row[field] = typeof row[field] === 'string' ? row[field].split(',') : row[field];
|
||||||
? row[field].split(',')
|
|
||||||
: row[field];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
formData.value = { ...row }
|
formData.value = { ...row }
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
title.value = '新增从业人员'
|
title.value = '新增从业人员'
|
||||||
|
|||||||
@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog class="dialogWerapper" width="80%" v-model="visibleDialog" title="选择公司" @close="handleClose">
|
||||||
|
<div>
|
||||||
|
<MyTable
|
||||||
|
:tableData="pageData.tableData"
|
||||||
|
:tableColumn="pageData.tableColumn"
|
||||||
|
:tableHeight="pageData.tableHeight"
|
||||||
|
:key="pageData.keyCount"
|
||||||
|
:tableConfiger="pageData.tableConfiger"
|
||||||
|
:controlsWidth="pageData.controlsWidth"
|
||||||
|
@chooseData="chooseData"
|
||||||
|
>
|
||||||
|
</MyTable>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="flex just-center">
|
||||||
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
||||||
|
<el-button @click="handleClose">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||||
|
import { ref, reactive,getCurrentInstance } from 'vue';
|
||||||
|
import { qcckPost } from "@/api/qcckApi.js";
|
||||||
|
const emits = defineEmits(['change']);
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const visibleDialog = ref(false);
|
||||||
|
const pageData = reactive({
|
||||||
|
tableData: [],
|
||||||
|
keyCount: 0,
|
||||||
|
tableConfiger: {
|
||||||
|
rowHieght: 61,
|
||||||
|
showSelectType: "radio",
|
||||||
|
loading: false,
|
||||||
|
haveControls:false
|
||||||
|
},
|
||||||
|
tableHeight:500,
|
||||||
|
pageConfiger: {
|
||||||
|
pageSize: 20,
|
||||||
|
pageCurrent: 1
|
||||||
|
},
|
||||||
|
controlsWidth: 180,
|
||||||
|
tableColumn: [
|
||||||
|
{ label: "单位名称", prop: "dwmc" },
|
||||||
|
{ label: "信用代码", prop: "xydm" },
|
||||||
|
{ label: "场所名称", prop: "csmc" },
|
||||||
|
{ label: "场所电话", prop: "csLxdh" }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
const formData = ref({})
|
||||||
|
const handleClose = () => {
|
||||||
|
formData.value = {};
|
||||||
|
visibleDialog.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const chooseData = (row) => {
|
||||||
|
formData.value.pxgsid = row[0].id;
|
||||||
|
formData.value.pxgs = row[0].dwmc;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if(!formData.value.pxgsid) return proxy.$message.error('请选择公司');
|
||||||
|
let obj = JSON.parse(JSON.stringify(formData.value))
|
||||||
|
emits('change',obj)
|
||||||
|
handleClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
pageData.keyCount++;
|
||||||
|
visibleDialog.value = true;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getList () {
|
||||||
|
pageData.tableConfiger.loading = true;
|
||||||
|
qcckPost({ keyword : localStorage.getItem('idEntityCard')}, "/mosty-base/baxx/dwgl/list").then((res) => {
|
||||||
|
pageData.tableData = res || []
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
}).catch(() => {
|
||||||
|
pageData.tableConfiger.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -31,7 +31,6 @@
|
|||||||
total: pageData.total
|
total: pageData.total
|
||||||
}"></Pages>
|
}"></Pages>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<add-practitioner-dialog v-model="isVisible" ref="addPractitionerRef" @refresh="getList" />
|
<add-practitioner-dialog v-model="isVisible" ref="addPractitionerRef" @refresh="getList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -112,7 +112,8 @@ const onSearch = (value) => {
|
|||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
pageData.tableConfiger.loading = true;
|
pageData.tableConfiger.loading = true;
|
||||||
let params = { ...pageData.pageConfiger, ...queryFrom.value, sfxxpx: '01' }
|
let pxgsid = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo'))?.pxgsid : null;
|
||||||
|
let params = { ...pageData.pageConfiger, ...queryFrom.value, sfxxpx: '01',pxgsid: pxgsid }
|
||||||
const res = await qcckPost(params, `/mosty-base/baxx/pxry/page`)
|
const res = await qcckPost(params, `/mosty-base/baxx/pxry/page`)
|
||||||
pageData.tableData = res.records || [];
|
pageData.tableData = res.records || [];
|
||||||
pageData.total = res.total;
|
pageData.total = res.total;
|
||||||
|
|||||||
@ -76,19 +76,13 @@ const tabHeightFn = () => {
|
|||||||
|
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
try {
|
pageData.tableConfiger.loading = true;
|
||||||
pageData.tableConfiger.loading = true;
|
let data = { ...pageData.pageConfiger, }
|
||||||
const res = await qcckPost({
|
data.keyword = localStorage.getItem('idEntityCard');
|
||||||
...pageData.pageConfiger,
|
const res = await qcckPost(data, `/mosty-base/baxx/dwgl/page`)
|
||||||
}, `/mosty-base/baxx/dwgl/page`)
|
pageData.tableData = res.records || [];
|
||||||
|
pageData.total = res.total;
|
||||||
if(res) {
|
pageData.tableConfiger.loading = false;
|
||||||
pageData.tableData = res.records || [];
|
|
||||||
pageData.total = res.total;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
pageData.tableConfiger.loading = false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const addEdit = (type, row) => {
|
const addEdit = (type, row) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user