首页地图

This commit is contained in:
cxc
2022-10-01 09:12:01 +08:00
parent 25ed1387a7
commit e8fb69f0e3
56 changed files with 4910 additions and 941 deletions

View File

@ -5,7 +5,7 @@
v-model="form"
:isAdd="false"
:labelWidth="labelWidth"
ref="expertForm"
ref="expertFormRef"
/>
<div :style="{ marginLeft: labelWidth + 'px' }">
<el-button @click="$router.go(-1)">取消</el-button>
@ -15,23 +15,25 @@
</div>
</template>
<script setup>
import { expert } from "@/api/identity/index";
import { insertCasExpert } from "@/api/identity/index";
import ExpertForm from "@/views/components/ExpertForm";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
const { proxy } = getCurrentInstance();
const router = useRouter();
const labelWidth = 140;
const form = reactive({
laboratory_id: undefined, // 所属实验室
gender: 1,
});
function submitForm(status) {
// if (proxy.$refs.expertForm.submitForm()) {
// expert(form).then((res) => {
// proxy.$modal.msgSuccess("新增成功");
// proxy.$router.go(-1);
// });
// } else {
// console.log("校验未通过");
// }
}
const expertFormRef = ref();
const submitForm = async (status) => {
if (await expertFormRef.value.validateForm()) {
form.area = form.district;
await insertCasExpert(form);
ElMessage.success("申请已提交");
router.back();
} else {
console.log("校验未通过");
}
};
</script>

View File

@ -5,6 +5,7 @@
<el-col
:span="4"
v-for="item in identityList.slice(0, 5)"
v-show="item.id <= 2"
:key="item.id"
@click="handleStatus(item)"
>
@ -26,9 +27,9 @@
查看拒绝原因
</p>
</div>
<!-- <div v-else-if="item.status == 4">
<div v-else-if="item.status == 4">
<el-link type="primary">申请</el-link>
</div> -->
</div>
</el-card>
</el-col>
</el-row>
@ -39,6 +40,7 @@
<el-col
:span="4"
v-for="item in identityList.slice(0, 5)"
v-show="item.id <= 2"
:key="item.id"
>
<el-card style="text-align: center; height: 100%">
@ -49,6 +51,7 @@
></el-image>
<h3>{{ `${item.title}后台` }}</h3>
<p v-if="item.status == 1">
<!-- <p> -->
<el-link type="primary" @click="handlePage(item)">进入</el-link>
</p>
</el-card>
@ -63,6 +66,7 @@ import { identity, settled, identitySwitch } from "@/api/identity/index";
import { useRouter } from "vue-router";
import usePermissionStore from "@/store/modules/permission";
import useUserStore from "@/store/modules/user";
import { ElMessageBox } from "element-plus";
const router = useRouter();
const permissionStore = usePermissionStore();
@ -109,11 +113,12 @@ function reason(item) {
alert("拒绝原因:\n" + item.remark);
}
function noClicking() {
return identityList.value.some((item) => item.status === 0);
return identityList.value.some((item) => item.status == 0);
}
// item.status -1>未入驻 0>审核中 1>通过 2拒绝
function handleStatus(item) {
if (noClicking()) return alert("你有已入住申请中");
console.log(item);
if (noClicking()) return ElMessageBox.alert("您已有入驻申请");
if (item.status === "4" || item.status === "2") {
if (item.id == 1) {
// 企业