|
@@ -32,15 +32,32 @@
|
|
|
<v-navigation-drawer v-model="showDetail" absolute location="left" rounded temporary width="500" class="pa-5">
|
|
|
详情
|
|
|
</v-navigation-drawer>
|
|
|
+
|
|
|
+ <!-- 无权限提示 -->
|
|
|
+ <CtDialog :visible="showDialog" :widthType="4" :footer="false" titleClass="text-h6" title="系统提示" @close="showDialog = false">
|
|
|
+ <div class="d-flex align-center flex-column">
|
|
|
+ <div class="color-warning">
|
|
|
+ <p>您没有权限查看门墩儿新任命信息</p>
|
|
|
+ <p>请用微信扫描下方二维码联系门墩儿管理员开通权限</p>
|
|
|
+ </div>
|
|
|
+ <div style="width: 150px; height: 150px;">
|
|
|
+ <v-img src="https://minio.citupro.com/dev/menduner/official-account-code4.jpg"></v-img>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </CtDialog>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({ name: 'newlyAppointedTable'})
|
|
|
import { ref } from 'vue'
|
|
|
-// import { timesTampChange } from '@/utils/date'
|
|
|
+import { getNewAppointmentsPage } from '@/api/recruit/enterprise/newlyAppointed'
|
|
|
+import { useUserStore } from '@/store/user'
|
|
|
+// import Snackbar from '@/plugins/snackbar'
|
|
|
|
|
|
+const store = useUserStore()
|
|
|
const loading = ref(false)
|
|
|
-const total = ref(11)
|
|
|
+const total = ref(10)
|
|
|
const query = ref({
|
|
|
pageSize: 10,
|
|
|
pageNo: 1
|
|
@@ -56,7 +73,6 @@ const items = ref([
|
|
|
{ id: 8, nameChinese: '吴十', workTerritory: '成都', inaugurationHotel: '成都茂业万豪酒店' },
|
|
|
{ id: 9, nameChinese: '郑十一', workTerritory: '重庆', inaugurationHotel: '重庆富力丽思卡尔顿酒店' },
|
|
|
{ id: 10, nameChinese: '王十二', workTerritory: '西安', inaugurationHotel: '西安希尔顿酒店' },
|
|
|
- { id: 11, nameChinese: '冯十三', workTerritory: '长沙', inaugurationHotel: '长沙万达文华东方酒店' },
|
|
|
])
|
|
|
const headers = [
|
|
|
{ title: '宣布日期', key: 'announceTime', sortable: false },
|
|
@@ -139,14 +155,40 @@ const formItems = ref({
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
+const showDialog = ref(false)
|
|
|
+
|
|
|
+// 获取企业权益信息
|
|
|
+const info = ref(localStorage.getItem('entBaseInfo') ? JSON.parse(localStorage.getItem('entBaseInfo')) : {})
|
|
|
+store.$subscribe((mutation, state) => {
|
|
|
+ if (Object.keys(state.entBaseInfo).length) info.value = state.entBaseInfo
|
|
|
+})
|
|
|
+
|
|
|
+const getList = async () => {
|
|
|
+ const result = await getNewAppointmentsPage(query.value)
|
|
|
+ items.value = result.list
|
|
|
+ total.value = result.total
|
|
|
+}
|
|
|
|
|
|
// 分页切换
|
|
|
-const handleChangePage = (e) => {
|
|
|
+const handleChangePage = async (e) => {
|
|
|
+ await store.getEnterpriseInfo(true)
|
|
|
+ // 没有权限提示联系门墩儿
|
|
|
+ if (!info.value?.entitlement?.newAppointment) {
|
|
|
+ showDialog.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
query.value.pageNo = e
|
|
|
+ getList()
|
|
|
}
|
|
|
|
|
|
// 搜索
|
|
|
-const handleSearch = () => {
|
|
|
+const handleSearch = async () => {
|
|
|
+ await store.getEnterpriseInfo(true)
|
|
|
+ // 没有权限提示联系门墩儿
|
|
|
+ if (!info.value?.entitlement?.newAppointment) {
|
|
|
+ showDialog.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
const param = {}
|
|
|
formItems.value.options.forEach(item => {
|
|
|
if (item.noParam) return
|
|
@@ -163,8 +205,14 @@ const handleReset = () => {
|
|
|
|
|
|
// 查看详情
|
|
|
const showDetail = ref(false)
|
|
|
-const handleDetail = (item) => {
|
|
|
+const handleDetail = async (item) => {
|
|
|
console.log(item, 'detail')
|
|
|
+ await store.getEnterpriseInfo(true)
|
|
|
+ // 没有权限提示联系门墩儿
|
|
|
+ if (!info.value?.entitlement?.newAppointment) {
|
|
|
+ showDialog.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
showDetail.value = true
|
|
|
}
|
|
|
</script>
|