|
|
|
|
@ -8,8 +8,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- @click="openAdd" -->
|
|
|
|
|
<a-button type="primary" :icon="h(PlusOutlined)">新增内容</a-button>
|
|
|
|
|
<!-- @click="openAdd" -->
|
|
|
|
|
<a-button type="primary" @click="openAdd('add')" :icon="h(PlusOutlined)">新增内容</a-button>
|
|
|
|
|
<!-- <a-button type="" class="g_border_d g_ml_16" @click="handleToForm('add', { id: 0 })" :icon="h(DownloadOutlined)">导出模版</a-button> -->
|
|
|
|
|
<!--
|
|
|
|
|
<a-dropdown :trigger="['click']">
|
|
|
|
|
@ -58,7 +58,7 @@
|
|
|
|
|
>
|
|
|
|
|
报名
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="btn g_c_main g_fs_14 g_cursor_point g_mr_13" @click="handleToForm('edit', record)">编辑</div>
|
|
|
|
|
<div class="btn g_c_main g_fs_14 g_cursor_point g_mr_13" @click="openAdd('edit', record)">编辑</div>
|
|
|
|
|
<div class="btn g_c_main g_fs_14 g_cursor_point" @click="handleDel(record)">删除</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -74,9 +74,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <a-modal v-model:open="modalInfo.isShow"
|
|
|
|
|
<!-- <a-modal v-model:open="modalInfo.isShow"
|
|
|
|
|
:title="modalInfo.title"
|
|
|
|
|
width="640px"
|
|
|
|
|
centered
|
|
|
|
|
@ -115,37 +113,28 @@
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-modal v-model:open="showAdd" :title="modalInfo.title" style="width: 734px" :destroyOnClose="true">
|
|
|
|
|
<div class="g_pt_30 modal-box">
|
|
|
|
|
<a-form :model="modalInfo.form"
|
|
|
|
|
name="basic"
|
|
|
|
|
:label-col="{ span: 6 }"
|
|
|
|
|
:wrapper-col="{ span: 18 }"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
style="width: 80%;"
|
|
|
|
|
class="g_ml_51"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item label="姓名" name="name" required>
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入姓名" v-model:value="modalInfo.form.name" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="电话" name="name" required>
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入电话" v-model:value="modalInfo.form.username" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="身份证号" name="name">
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入身份证号" v-model:value="modalInfo.form.idcard" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
<a-form-item label="备注" name="desp">
|
|
|
|
|
<a-textarea :rows='6' style="width: 100%" placeholder="请输入备注" v-model:value="modalInfo.form.description" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button @click="showAdd = false" >关闭</a-button>
|
|
|
|
|
<a-button @click="submitForm" type="primary">确定</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<a-form :model="modalInfo.form" name="basic" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" autocomplete="off" style="width: 80%" class="g_ml_51">
|
|
|
|
|
<a-form-item label="姓名" name="name" required>
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入姓名" v-model:value="modalInfo.form.name" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="电话" name="name" required>
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入电话" v-model:value="modalInfo.form.username" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="身份证号" name="name">
|
|
|
|
|
<a-input style="width: 100%" placeholder="请输入身份证号" v-model:value="modalInfo.form.idcard" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
<a-form-item label="备注" name="desp">
|
|
|
|
|
<a-textarea :rows="6" style="width: 100%" placeholder="请输入备注" v-model:value="modalInfo.form.description" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button @click="showAdd = false">关闭</a-button>
|
|
|
|
|
<a-button @click="submitForm" type="primary">确定</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -155,7 +144,7 @@ import { ref, onMounted, getCurrentInstance, h, watch } from "vue";
|
|
|
|
|
import { PlusOutlined, EllipsisOutlined, UploadOutlined, DownOutlined } from "@ant-design/icons-vue";
|
|
|
|
|
import { Modal, message } from "ant-design-vue";
|
|
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
|
|
import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi,updateUserApi } from "../../api/userList/userList";
|
|
|
|
|
import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi, updateUserApi } from "../../api/userList/userList";
|
|
|
|
|
import { DownloadOutlined } from "@ant-design/icons-vue";
|
|
|
|
|
import idCardPanel from "../components/upload/image.vue";
|
|
|
|
|
|
|
|
|
|
@ -183,69 +172,64 @@ const handleChangeSearch = (e) => {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const modalInfo = ref({
|
|
|
|
|
title:'新增用户',
|
|
|
|
|
id:0,
|
|
|
|
|
form:{
|
|
|
|
|
name:"",
|
|
|
|
|
username:'',
|
|
|
|
|
idcard:'',
|
|
|
|
|
description:''
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
title: "新增用户",
|
|
|
|
|
id: 0,
|
|
|
|
|
form: {
|
|
|
|
|
name: "",
|
|
|
|
|
username: "",
|
|
|
|
|
idcard: "",
|
|
|
|
|
description: "",
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const submitForm = ()=>{
|
|
|
|
|
let url = '',params = {};
|
|
|
|
|
const submitForm = () => {
|
|
|
|
|
let url = "",
|
|
|
|
|
params = {};
|
|
|
|
|
params = {
|
|
|
|
|
name:modalInfo.value.form.name,
|
|
|
|
|
username:modalInfo.value.form.username,
|
|
|
|
|
idcard:modalInfo.value.form.idcard,
|
|
|
|
|
description:modalInfo.value.form.description,
|
|
|
|
|
password:'123456',
|
|
|
|
|
id:modalInfo.value.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!commonJS.regular(modalInfo.value.form.username, 'tel')) {
|
|
|
|
|
message.warning('请输入正确的手机号')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
name: modalInfo.value.form.name,
|
|
|
|
|
username: modalInfo.value.form.username,
|
|
|
|
|
idcard: modalInfo.value.form.idcard,
|
|
|
|
|
description: modalInfo.value.form.description,
|
|
|
|
|
password: "123456",
|
|
|
|
|
id: modalInfo.value.id,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if(modalInfo.value.id){
|
|
|
|
|
delete params.password;
|
|
|
|
|
updateUserApi(params).then((res)=>{
|
|
|
|
|
showAdd.value = false;
|
|
|
|
|
message.success("修改成功");
|
|
|
|
|
getTable();
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
addUserApi(params).then((res)=>{
|
|
|
|
|
showAdd.value = false;
|
|
|
|
|
message.success("新增成功");
|
|
|
|
|
getTable();
|
|
|
|
|
});
|
|
|
|
|
if (!commonJS.regular(modalInfo.value.form.username, "tel")) {
|
|
|
|
|
message.warning("请输入正确的手机号");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (modalInfo.value.id) {
|
|
|
|
|
delete params.password;
|
|
|
|
|
updateUserApi(params).then((res) => {
|
|
|
|
|
showAdd.value = false;
|
|
|
|
|
message.success("修改成功");
|
|
|
|
|
getTable();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addUserApi(params).then((res) => {
|
|
|
|
|
showAdd.value = false;
|
|
|
|
|
message.success("新增成功");
|
|
|
|
|
getTable();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const handleToForm = ($type, $data) => {
|
|
|
|
|
showAdd.value = true;
|
|
|
|
|
console.log($data.id);
|
|
|
|
|
modalInfo.value = {
|
|
|
|
|
isShow:true,
|
|
|
|
|
title:'修改用户',
|
|
|
|
|
form:{
|
|
|
|
|
name:$data.name,
|
|
|
|
|
username:$data.username,
|
|
|
|
|
idcard:$data.idcard,
|
|
|
|
|
description:$data.description,
|
|
|
|
|
},
|
|
|
|
|
id:$data.id
|
|
|
|
|
}
|
|
|
|
|
showAdd.value = true;
|
|
|
|
|
console.log($data.id);
|
|
|
|
|
modalInfo.value = {
|
|
|
|
|
isShow: true,
|
|
|
|
|
title: "修改用户",
|
|
|
|
|
form: {
|
|
|
|
|
name: $data.name,
|
|
|
|
|
username: $data.username,
|
|
|
|
|
idcard: $data.idcard,
|
|
|
|
|
description: $data.description,
|
|
|
|
|
},
|
|
|
|
|
id: $data.id,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// updateUserApi({
|
|
|
|
|
// updateUserApi({
|
|
|
|
|
// description: "测试备注",
|
|
|
|
|
// idcard: "123123123123123123",
|
|
|
|
|
// name: "测试真名",
|
|
|
|
|
@ -277,8 +261,6 @@ const handleToForm = ($type, $data) => {
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* #################### 表格事件 #################### */
|
|
|
|
|
const tableData = ref({
|
|
|
|
|
keyword: "",
|
|
|
|
|
@ -299,26 +281,31 @@ const getTable = () => {
|
|
|
|
|
tableData.value = { ...res.data, keyword: tableData.value.keyword, page: res.data.current, limit: res.data.size };
|
|
|
|
|
tableData.value.records.forEach((item, index) => {
|
|
|
|
|
item.rank = index + 1;
|
|
|
|
|
item.title = '常用发票主体信息';
|
|
|
|
|
item.title = "常用发票主体信息";
|
|
|
|
|
item.content = "默认主体:郑州伯才科技有限公司 单位名称:郑州伯才科技有限公司 纳税人识别号:91410100MA9L4HDT0L 地址:河南自贸试验区郑州";
|
|
|
|
|
item.time = "2024-03-11 13:04:24";
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const openAdd = () =>{
|
|
|
|
|
showAdd.value = true
|
|
|
|
|
modalInfo.value.title = "新增用户"
|
|
|
|
|
modalInfo.value.id = 0;
|
|
|
|
|
modalInfo.value = {
|
|
|
|
|
form:{
|
|
|
|
|
name:"",
|
|
|
|
|
username:'',
|
|
|
|
|
idcard:'',
|
|
|
|
|
description:''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const openAdd = (_type,_record) => {
|
|
|
|
|
if(_type == 'add'){
|
|
|
|
|
router.push({
|
|
|
|
|
path: "messageAdd",
|
|
|
|
|
// query: {
|
|
|
|
|
// type: "add",
|
|
|
|
|
// },
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
router.push({
|
|
|
|
|
path: "messageEdit",
|
|
|
|
|
query: {
|
|
|
|
|
id: _record.rank,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
const columns = ref([
|
|
|
|
|
{
|
|
|
|
|
title: "序号",
|
|
|
|
|
@ -347,7 +334,7 @@ const columns = ref([
|
|
|
|
|
width: "200px",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: "操作",
|
|
|
|
|
key: "state",
|
|
|
|
|
@ -408,7 +395,6 @@ const handleApplication = (record) => {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleDel = ($data) => {
|
|
|
|
|
commonJS.gConfirmModal(
|
|
|
|
|
"删除",
|
|
|
|
|
@ -440,9 +426,8 @@ const handleModalSize = ($page, $size) => {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
|
|
|
|
|
.ant-table-cell:empty::before{
|
|
|
|
|
content: "-";
|
|
|
|
|
.ant-table-cell:empty::before {
|
|
|
|
|
content: "-";
|
|
|
|
|
}
|
|
|
|
|
.p-manage-myJob {
|
|
|
|
|
position: relative;
|