@@ -68,7 +68,6 @@ | |||
"stylelint-config-recommended-vue": "^1.4.0", | |||
"stylelint-config-standard": "^32.0.0", | |||
"stylelint-config-standard-scss": "^8.0.0", | |||
"typescript": "^4.9.3", | |||
"unocss": "^0.50.1", | |||
"unplugin-auto-import": "^0.13.0", | |||
"unplugin-icons": "^0.15.1", | |||
@@ -23,30 +23,40 @@ declare module '@vue/runtime-core' { | |||
ElFormItem: typeof import('element-plus/es')['ElFormItem'] | |||
ElIcon: typeof import('element-plus/es')['ElIcon'] | |||
ElInput: typeof import('element-plus/es')['ElInput'] | |||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] | |||
ElMenu: typeof import('element-plus/es')['ElMenu'] | |||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] | |||
ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] | |||
ElOption: typeof import('element-plus/es')['ElOption'] | |||
ElPagination: typeof import('element-plus/es')['ElPagination'] | |||
ElRadio: typeof import('element-plus/es')['ElRadio'] | |||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] | |||
ElSelect: typeof import('element-plus/es')['ElSelect'] | |||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] | |||
ElSwitch: typeof import('element-plus/es')['ElSwitch'] | |||
ElTable: typeof import('element-plus/es')['ElTable'] | |||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] | |||
ElTag: typeof import('element-plus/es')['ElTag'] | |||
ElTooltip: typeof import('element-plus/es')['ElTooltip'] | |||
ElUpload: typeof import('element-plus/es')['ElUpload'] | |||
GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] | |||
Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] | |||
IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] | |||
IEpAvatar: typeof import('~icons/ep/avatar')['default'] | |||
IEpClock: typeof import('~icons/ep/clock')['default'] | |||
IEpDocument: typeof import('~icons/ep/document')['default'] | |||
IEpCloseBold: typeof import('~icons/ep/close-bold')['default'] | |||
IEpCollection: typeof import('~icons/ep/collection')['default'] | |||
IEpDelete: typeof import('~icons/ep/delete')['default'] | |||
IEpDownload: typeof import('~icons/ep/download')['default'] | |||
IEpEdit: typeof import('~icons/ep/edit')['default'] | |||
IEpHouse: typeof import('~icons/ep/house')['default'] | |||
IEpIconMenu: typeof import('~icons/ep/icon-menu')['default'] | |||
IEpLink: typeof import('~icons/ep/link')['default'] | |||
IEpLoading: typeof import('~icons/ep/loading')['default'] | |||
IEpLock: typeof import('~icons/ep/lock')['default'] | |||
IEpPlus: typeof import('~icons/ep/plus')['default'] | |||
IEpPointer: typeof import('~icons/ep/pointer')['default'] | |||
IEpRefresh: typeof import('~icons/ep/refresh')['default'] | |||
IEpSearch: typeof import('~icons/ep/search')['default'] | |||
IEpUser: typeof import('~icons/ep/user')['default'] | |||
IEpUserFilled: typeof import('~icons/ep/user-filled')['default'] | |||
IEpVideoPlay: typeof import('~icons/ep/video-play')['default'] | |||
LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] | |||
MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] | |||
MyLoading: typeof import('./../components/myLoading.vue')['default'] | |||
@@ -60,4 +70,8 @@ declare module '@vue/runtime-core' { | |||
TalkUs: typeof import('./../components/talkUs.vue')['default'] | |||
WangEditor: typeof import('./../components/WangEditor/index.vue')['default'] | |||
} | |||
export interface ComponentCustomProperties { | |||
vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] | |||
vLoading: typeof import('element-plus/es')['ElLoadingDirective'] | |||
} | |||
} |
@@ -21,7 +21,11 @@ service.interceptors.request.use( | |||
return Promise.reject(error); | |||
} | |||
); | |||
declare module 'axios' { | |||
interface AxiosInstance { | |||
(config: AxiosRequestConfig): Promise<any> | |||
} | |||
} | |||
// 响应拦截器 | |||
service.interceptors.response.use( | |||
(response: AxiosResponse) => { | |||
@@ -249,7 +249,7 @@ const handleCurrentChange = (val) => { | |||
const getListData = async (PageNum, PageSize) => { | |||
try { | |||
const res = await businessListApi(PageNum, PageSize, 1, route.query.id); | |||
const res = await businessListApi(PageNum, PageSize, 1, route.query.id || ''); | |||
console.log(res, "res"); | |||
tableData.value = res.data.list; | |||
total.value = res.data.total * 1; | |||
@@ -45,7 +45,7 @@ | |||
</div> | |||
</template> | |||
<script lang="ts" setup> | |||
<script setup> | |||
import { ref } from 'vue' | |||
import { ElTable } from 'element-plus' | |||
import { modelAllList, personMouldIdList, associatedMould } from '@/apis/apiManage.js' | |||
@@ -63,27 +63,21 @@ const getDate = (val) => { | |||
}; | |||
interface User { | |||
date: string | |||
name: string | |||
address: string | |||
} | |||
const multipleTableRef = ref<InstanceType<typeof ElTable>>() | |||
const multipleSelection = ref<User[]>([]) | |||
const toggleSelection = (rows?: User[]) => { | |||
const multipleTableRef = ref() | |||
const multipleSelection = ref([]) | |||
const toggleSelection = (rows) => { | |||
if (rows) { | |||
rows.forEach((row) => { | |||
// TODO: improvement typing when refactor table | |||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | |||
// @ts-expect-error | |||
multipleTableRef.value!.toggleRowSelection(row, undefined) | |||
multipleTableRef.value.toggleRowSelection(row, undefined) | |||
}) | |||
} else { | |||
multipleTableRef.value!.clearSelection() | |||
multipleTableRef.value.clearSelection() | |||
} | |||
} | |||
const handleSelectionChange = (val: User[]) => { | |||
const handleSelectionChange = (val) => { | |||
multipleSelection.value = val | |||
} | |||
const pageNum = ref(1); | |||
@@ -106,7 +100,7 @@ const modelAllListFunc = async (PageNum, PageSize) => { | |||
const modelIds = await personMouldIdList(); | |||
let idIndx = [] | |||
res.data.list.forEach((ele, idx) => { | |||
modelIds.data.forEach(item => { | |||
modelIds.data.forEach((item) => { | |||
if (ele.id === item.personMouldId) { | |||
idIndx.push(idx) | |||
} | |||
@@ -22,12 +22,12 @@ | |||
<a @click="editDialogVisible = true">修改密码</a> | |||
</div> | |||
</li> | |||
<li v-if="userData.isAdmin === '1' && userData.localDeploy"> | |||
<!-- <li v-if="userData.isAdmin === '1' && userData.localDeploy"> | |||
<el-icon><i-ep-Pointer /></el-icon> 视频制作统计 | |||
<div class="user-right"> | |||
<a @click="videoDialogVisible = true">查看</a> | |||
</div> | |||
</li> | |||
</li> --> | |||
<li v-if="userData.isAdmin === 0"> | |||
<el-icon><i-ep-Pointer /></el-icon>密钥 | |||
<div class="user-right"> | |||
@@ -42,7 +42,7 @@ | |||
</el-dialog> | |||
</div> | |||
</template> | |||
<script setup lang="ts"> | |||
<script setup> | |||
import editPass from '../editPass/index.vue' | |||
import { useRoute, useRouter } from "vue-router"; | |||
import { getUser, privateDeployAdminCurrent, current, localDeployApi } from "@/apis/home.js"; | |||