调整权限 去掉系统选择

This commit is contained in:
浅念
2025-12-08 11:53:02 +08:00
parent 2648c49a3b
commit 65b2cb1037
27 changed files with 364 additions and 87 deletions
+6
View File
@@ -173,4 +173,10 @@ export class commonService {
params params
}) })
} }
//仪表盘选择下拉
static getDashboardSelect() {
return request.get<any>({
url: '/admin/resources/list/menu?is_home=1'
})
}
} }
+35
View File
@@ -310,4 +310,39 @@ export class systemService {
params params
}) })
} }
//仪表盘设置列表
static getDashboardList(params: any) {
return request.get<Api.Common.CommonListData>({
url: '/admin/dashboard/rule/list',
params
})
}
//仪表盘设置新增
static dashboardAdd(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/dashboard/rule/store',
params
})
}
//仪表盘设置详情
static dashboardDetail(params: any) {
return request.get<any>({
url: '/admin/dashboard/rule/show',
params
})
}
//仪表盘设置编辑
static dashboardEdit(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/dashboard/rule/update',
params
})
}
//仪表盘设置删除
static dashboardDelete(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/dashboard/rule/destroy',
params
})
}
} }
@@ -334,13 +334,8 @@
const goPage = (path: string) => { const goPage = (path: string) => {
router.push(path) router.push(path)
} }
const { systemsid } = useUserStore()
const gouserInfo = () => { const gouserInfo = () => {
if (systemsid == '1') {
router.push('/admin/user/user_info') router.push('/admin/user/user_info')
} else {
router.push('/system/user-center')
}
} }
// const toDocs = () => { // const toDocs = () => {
+1 -1
View File
@@ -9,7 +9,7 @@ import Home from '@views/index/index.vue'
export const staticRoutes: AppRouteRecordRaw[] = [ export const staticRoutes: AppRouteRecordRaw[] = [
{ {
path: '/', path: '/',
redirect: HOME_PAGE redirect: localStorage.getItem('home_page') || HOME_PAGE
}, },
{ {
path: '/console', path: '/console',
+1 -1
View File
@@ -50,7 +50,7 @@ axiosInstance.interceptors.request.use(
const { systemsabbr } = useUserStore() const { systemsabbr } = useUserStore()
request.headers.set('Fdesk-Language', language) request.headers.set('Fdesk-Language', language)
request.headers.set('Fdesk-Corp-Abbr', companyabbr) request.headers.set('Fdesk-Corp-Abbr', companyabbr)
request.headers.set('Fdesk-System-Code', systemsabbr) request.headers.set('Fdesk-System-Code', 'fdesk')
request.headers.set('Fdesk-Login-Type', loginType) request.headers.set('Fdesk-Login-Type', loginType)
// 设置 token 和 请求头 // 设置 token 和 请求头
if (accessToken) { if (accessToken) {
+6 -1
View File
@@ -47,7 +47,12 @@
<ElTableColumn fixed="right" label="操作" width="140px"> <ElTableColumn fixed="right" label="操作" width="140px">
<template #default="scope"> <template #default="scope">
<ElRow> <ElRow>
<el-button link @click="showDialog('edit', scope.row)">编辑</el-button> <el-button
link
@click="showDialog('edit', scope.row)"
v-if="hasAuth('approval_list@edit')"
>编辑</el-button
>
<el-button <el-button
type="danger" type="danger"
link link
+2 -1
View File
@@ -56,11 +56,12 @@
underline="never" underline="never"
@click="handleView(scope.row)" @click="handleView(scope.row)"
style="margin-right: 8px" style="margin-right: 8px"
v-if="hasAuth('stocking_auth@show')"
> >
<i class="iconfont-sys">&#xe76c;</i> 查看审批 <i class="iconfont-sys">&#xe76c;</i> 查看审批
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.status == 'pending'" v-if="scope.row.status == 'pending' && hasAuth('stocking_auth@approve')"
type="success" type="success"
underline="never" underline="never"
@click="handleCreateRepair(scope.row)" @click="handleCreateRepair(scope.row)"
@@ -61,11 +61,12 @@
underline="never" underline="never"
@click="handleView(scope.row)" @click="handleView(scope.row)"
style="margin-right: 8px" style="margin-right: 8px"
v-if="hasAuth('stocking_auth_history@show')"
> >
<i class="iconfont-sys">&#xe76c;</i> 查看审批 <i class="iconfont-sys">&#xe76c;</i> 查看审批
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.status == 'pending'" v-if="scope.row.status == 'pending' && hasAuth('stocking_auth_history@approve')"
type="success" type="success"
underline="never" underline="never"
@click="handleCreateRepair(scope.row)" @click="handleCreateRepair(scope.row)"
+6 -6
View File
@@ -68,7 +68,7 @@
</el-form> </el-form>
</section> </section>
<div class="table"> <div class="table">
<el-button class="reset-button" @click="addfn()" v-if="hasAuth('inquiry#store')"><i class="iconfont-sys">&#xe602;</i> 录单</el-button> <el-button class="reset-button" @click="addfn()" v-if="hasAuth('inquiry@store')"><i class="iconfont-sys">&#xe602;</i> 录单</el-button>
<ArtTable <ArtTable
ref="tableRef" ref="tableRef"
row-key="id" row-key="id"
@@ -147,31 +147,31 @@
<el-table-column prop="created_at" label="创建时间"></el-table-column> <el-table-column prop="created_at" label="创建时间"></el-table-column>
<el-table-column fixed="right" label="操作" width="260px"> <el-table-column fixed="right" label="操作" width="260px">
<template #default="scope"> <template #default="scope">
<div class="follow-action fenpei" @click="onFenpei(scope.row,'add')" v-if="scope.row.status!= 2&&hasAuth('inquiry#allocation')"> <div class="follow-action fenpei" @click="onFenpei(scope.row,'add')" v-if="scope.row.status!= 2&&hasAuth('inquiry@allocation')">
<span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle" <span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle"
><i class="iconfont-sys">&#xe852;</i></span ><i class="iconfont-sys">&#xe852;</i></span
> >
分配 分配
</div> </div>
<div class="follow-action detil" @click="onDetail(scope.row)" v-if="hasAuth('inquiry#show')"> <div class="follow-action detil" @click="onDetail(scope.row)" v-if="hasAuth('inquiry@show')">
<span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle" <span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle"
><i class="iconfont-sys">&#xe70f;</i></span ><i class="iconfont-sys">&#xe70f;</i></span
> >
详情 详情
</div> </div>
<div class="follow-action" @click="onFollow(scope.row)" v-if="scope.row.status==0&&hasAuth('inquiry#release')"> <div class="follow-action" @click="onFollow(scope.row)" v-if="scope.row.status==0&&hasAuth('inquiry@release')">
<span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle" <span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle"
><i class="iconfont-sys">&#xe712;</i></span ><i class="iconfont-sys">&#xe712;</i></span
> >
发布 发布
</div> </div>
<div class="follow-action edit" @click="onEdit(scope.row)" v-if="hasAuth('inquiry#update')"> <div class="follow-action edit" @click="onEdit(scope.row)" v-if="hasAuth('inquiry@update')">
<span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle" <span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle"
><i class="iconfont-sys">&#xe6bf;</i></span ><i class="iconfont-sys">&#xe6bf;</i></span
> >
编辑 编辑
</div> </div>
<div class="follow-action delete" @click="onDelete(scope.row)" v-if="hasAuth('inquiry#destroy')"> <div class="follow-action delete" @click="onDelete(scope.row)" v-if="hasAuth('inquiry@destroy')">
<span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle" <span class="custom-clock-icon" style="margin-right: 2px; vertical-align: middle"
><i class="iconfont-sys">&#xe6d4;</i></span ><i class="iconfont-sys">&#xe6d4;</i></span
> >
+32 -5
View File
@@ -2,7 +2,13 @@
<div class="port-page"> <div class="port-page">
<div class="port-toolbar boxshadow"> <div class="port-toolbar boxshadow">
<div class="toolbar-left"> <div class="toolbar-left">
<ElButton @click="showDialog('add')" v-ripple type="primary">创建</ElButton> <ElButton
@click="showDialog('add')"
v-ripple
type="primary"
v-if="hasAuth('purchase_order@add')"
>创建</ElButton
>
</div> </div>
<div class="toolbar-right"> <div class="toolbar-right">
<el-input <el-input
@@ -56,19 +62,38 @@
<ElTableColumn fixed="right" label="操作" width="240px"> <ElTableColumn fixed="right" label="操作" width="240px">
<template #default="scope"> <template #default="scope">
<ElRow> <ElRow>
<el-button type="success" link @click="showDialogdetil(scope.row)"> <el-button
type="success"
link
@click="showDialogdetil(scope.row)"
v-if="hasAuth('purchase_order@show')"
>
详情 详情
</el-button> </el-button>
<el-button type="warning" link @click="showDialogtimeline(scope.row)"> <el-button
type="warning"
link
@click="showDialogtimeline(scope.row)"
v-if="hasAuth('purchase_order@approval')"
>
查看审批 查看审批
</el-button> </el-button>
<el-button <el-button
link link
v-if="scope.row.status == 0 || scope.row.status == 3" v-if="
scope.row.status == 0 ||
(scope.row.status == 3 && hasAuth('purchase_order@edit'))
"
@click="showDialog('edit', scope.row)" @click="showDialog('edit', scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-button type="danger" link @click="deleteprocurement(scope.row)">删除</el-button> <el-button
type="danger"
link
@click="deleteprocurement(scope.row)"
v-if="hasAuth('purchase_order@del')"
>删除</el-button
>
</ElRow> </ElRow>
</template> </template>
</ElTableColumn> </ElTableColumn>
@@ -353,6 +378,8 @@
import imageUrl1 from '@/assets/img/crm/upimg.png' import imageUrl1 from '@/assets/img/crm/upimg.png'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue' import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import { manageService } from '@/api/adminApi' import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
const approvalRecords = ref<any[]>([]) const approvalRecords = ref<any[]>([])
const { uploadHeaders } = useUploadHeaders() const { uploadHeaders } = useUploadHeaders()
const timelineDialogVisible = ref(false) const timelineDialogVisible = ref(false)
+3 -7
View File
@@ -14,18 +14,13 @@
<!-- 表格头部 --> <!-- 表格头部 -->
<ArtTableHeader :showZebra="false" v-model:columns="columnChecks" @refresh="handleRefresh"> <ArtTableHeader :showZebra="false" v-model:columns="columnChecks" @refresh="handleRefresh">
<template #left> <template #left>
<el-segmented <!-- <el-segmented
v-model="yearVal" v-model="yearVal"
size="large" size="large"
:options="segmentedOptions" :options="segmentedOptions"
@change="searchArticleByYear" @change="searchArticleByYear"
> >
<!-- <template #default="scope"> </el-segmented> -->
<div class="flex flex-col items-center gap-2 p-2">
<div>{{ scope.item.label }}</div>
</div>
</template> -->
</el-segmented>
<!-- 按钮权限:后端控制模式,使用自定义指令 --> <!-- 按钮权限:后端控制模式,使用自定义指令 -->
<!-- <ElButton <!-- <ElButton
v-auth="'system@menu_add'" v-auth="'system@menu_add'"
@@ -57,6 +52,7 @@
:data="filteredTableData" :data="filteredTableData"
:marginTop="10" :marginTop="10"
:stripe="false" :stripe="false"
:pagination="false"
> >
<template #default> <template #default>
<ElTableColumn v-for="col in columns" :key="col.prop || col.type" v-bind="col" /> <ElTableColumn v-for="col in columns" :key="col.prop || col.type" v-bind="col" />
+21 -3
View File
@@ -97,7 +97,7 @@
<ElDialog v-model="permissionDialog" title="菜单权限" align-center> <ElDialog v-model="permissionDialog" title="菜单权限" align-center>
<el-tabs v-model="activeName" class="demo-tabs"> <el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane <!-- <el-tab-pane
v-for="sys in systemsList" v-for="sys in systemsList"
:key="sys.id" :key="sys.id"
:label="sys.name" :label="sys.name"
@@ -123,7 +123,25 @@
</template> </template>
</ElTree> </ElTree>
</ElScrollbar> </ElScrollbar>
</el-tab-pane> </el-tab-pane> -->
<ElTree
:ref="(el:any) => setTreeRef(1, el)"
:data="processedMenuBySystem[1] || []"
show-checkbox
node-key="id"
:default-expand-all="isExpandAll"
:props="defaultProps"
@check="() => handleTreeCheck(1)"
>
<template #default="{ data }">
<div style="display: flex; align-items: center">
<span v-if="data.isAuth">
{{ data.label }}
</span>
<span v-else>{{ defaultProps.label(data) }}</span>
</div>
</template>
</ElTree>
</el-tabs> </el-tabs>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
@@ -163,7 +181,7 @@
const treeRef = ref() const treeRef = ref()
const treeRefwork = ref() const treeRefwork = ref()
const treeRefcrm = ref() const treeRefcrm = ref()
const isExpandAll = ref(true) const isExpandAll = ref(false)
const isSelectAll = ref(false) const isSelectAll = ref(false)
const pagination = reactive({ const pagination = reactive({
currentPage: 1, currentPage: 1,
+21 -3
View File
@@ -275,7 +275,7 @@
/> />
<ElDialog v-model="permissionDialog" title="菜单权限" align-center> <ElDialog v-model="permissionDialog" title="菜单权限" align-center>
<el-tabs v-model="activeName" class="demo-tabs"> <el-tabs v-model="activeName" class="demo-tabs">
<el-tab-pane <!-- <el-tab-pane
v-for="sys in systemsList" v-for="sys in systemsList"
:key="sys.id" :key="sys.id"
:label="sys.name" :label="sys.name"
@@ -301,7 +301,25 @@
</template> </template>
</ElTree> </ElTree>
</ElScrollbar> </ElScrollbar>
</el-tab-pane> </el-tab-pane> -->
<ElTree
:ref="(el: any) => setTreeRef(1, el)"
:data="processedMenuBySystem[1] || []"
show-checkbox
node-key="id"
:default-expand-all="isExpandAll"
:props="defaultProps"
@check="() => handleTreeCheck(1)"
>
<template #default="{ data }">
<div style="display: flex; align-items: center">
<span v-if="data.isAuth">
{{ data.label }}
</span>
<span v-else>{{ defaultProps.label(data) }}</span>
</div>
</template>
</ElTree>
</el-tabs> </el-tabs>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
@@ -452,7 +470,7 @@
if (el) treeRefs[systemId] = el if (el) treeRefs[systemId] = el
} }
const treeRef = ref() const treeRef = ref()
const isExpandAll = ref(true) const isExpandAll = ref(false)
const isSelectAll = ref(false) const isSelectAll = ref(false)
const pagination = reactive({ const pagination = reactive({
currentPage: 1, currentPage: 1,
+92 -1
View File
@@ -27,6 +27,14 @@
<span class="info-label">公 司:</span> <span class="info-label">公 司:</span>
<span class="info-value">{{ userInfo.corp_name }}</span> <span class="info-value">{{ userInfo.corp_name }}</span>
</div> </div>
<div class="info-row" v-if="isshownq">
<span class="info-label">上 级:</span>
<span class="info-value">{{ userInfo.report_to_info?.name || '' }}</span>
</div>
<div class="info-row" v-if="isshownq">
<span class="info-label">内 勤:</span>
<span class="info-value">{{ userInfo.office_clerk_info?.name || '' }}</span>
</div>
<!-- <div class="info-row"> <!-- <div class="info-row">
<span class="info-label">国 家:</span> <span class="info-label">国 家:</span>
<span class="info-value">{{ userInfo.country_txt }}</span> <span class="info-value">{{ userInfo.country_txt }}</span>
@@ -210,6 +218,54 @@
</div> </div>
</ElForm> </ElForm>
</div> </div>
<div class="info box-style" style="margin-top: 20px" v-if="isshownq">
<h1 class="title"><span class="border" style="margin-right: 5px"></span>绑定信息</h1>
<ElForm
:model="formbd"
class="form"
ref="ruleFormbdRef"
:rules="rulesbd"
label-width="86px"
label-position="left"
>
<ElRow>
<ElFormItem label="直属上级" prop="report_to" required>
<ElSelect
v-model="formbd.report_to"
placeholder="请选择直属上级"
:disabled="!isEditbd"
>
<ElOption
v-for="item in userOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</ElSelect>
</ElFormItem>
<ElFormItem label="所属内勤" prop="office_clerk_id" class="right-input" required>
<ElSelect
v-model="formbd.office_clerk_id"
placeholder="请选择所属内勤"
:disabled="!isEditbd"
>
<ElOption
v-for="item in usernqOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</ElSelect>
</ElFormItem>
</ElRow>
<div class="el-form-item-right">
<ElButton type="primary" style="width: 90px" v-ripple @click="editbd(ruleFormbdRef)">
<i v-if="!isEditbd" class="iconfont-sys"> &#xe6bf;</i>
{{ isEditbd ? '保存' : '编辑' }}
</ElButton>
</div>
</ElForm>
</div>
<div class="info box-style" style="margin-top: 20px"> <div class="info box-style" style="margin-top: 20px">
<h1 class="title">更改密码</h1> <h1 class="title">更改密码</h1>
@@ -256,12 +312,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ElForm, FormInstance } from 'element-plus' import { ElForm, FormInstance, FormRules } from 'element-plus'
// import imageUrl from '@/assets/img/crm/upimg.png' // import imageUrl from '@/assets/img/crm/upimg.png'
import { CrmService } from '@/api/crmApi' import { CrmService } from '@/api/crmApi'
import { UserService } from '@/api/usersApi' import { UserService } from '@/api/usersApi'
import { useUploadHeaders } from '@/composables/useUploadHeaders' import { useUploadHeaders } from '@/composables/useUploadHeaders'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { commonService } from '@/api/commonApi'
import { computed } from 'vue' import { computed } from 'vue'
import QrcodeVue from 'qrcode.vue' import QrcodeVue from 'qrcode.vue'
const { uploadHeaders } = useUploadHeaders() const { uploadHeaders } = useUploadHeaders()
@@ -277,6 +334,8 @@
// const socialize_pic_full = ref('') // const socialize_pic_full = ref('')
// const countryOptions = ref<any>() // const countryOptions = ref<any>()
const form = ref<CustomerInfo>({}) const form = ref<CustomerInfo>({})
const formbd = ref<CustomerInfo>({})
const isshownq = ref(false)
//获取公司 getCompanyList //获取公司 getCompanyList
// const companyList = ref<any>() // const companyList = ref<any>()
//国家 //国家
@@ -291,11 +350,15 @@
const userInfo = ref<CustomerInfo>({}) const userInfo = ref<CustomerInfo>({})
const getuserInfo = async () => { const getuserInfo = async () => {
const data = await UserService.getUserInfo() const data = await UserService.getUserInfo()
isshownq.value = data.user.roles_id?.some((id: number) => [2, 4].includes(id)) || false
userInfo.value = data.user userInfo.value = data.user
form.value = data.user form.value = data.user
imageUrlavatar.value = data.user.avatar imageUrlavatar.value = data.user.avatar
// socialize_pic_full.value = data.socialize_pic_full // socialize_pic_full.value = data.socialize_pic_full
sign_img_url.value = data.user.sign_img_url sign_img_url.value = data.user.sign_img_url
formbd.value = data.user
formbd.value.office_clerk_id = data.user.office_clerk_info?.id || ''
formbd.value.report_to = data.user.report_to_info?.id || ''
// userInfo.value = getUserInfo.user // userInfo.value = getUserInfo.user
// form.value = getUserInfo.user // form.value = getUserInfo.user
// imageUrlavatar.value = getUserInfo.user.avatar // imageUrlavatar.value = getUserInfo.user.avatar
@@ -305,6 +368,7 @@
const isEdit = ref(false) const isEdit = ref(false)
const showReSignQR = ref(false) const showReSignQR = ref(false)
const isEditPwd = ref(false) const isEditPwd = ref(false)
const isEditbd = ref(false)
const pwdForm = reactive({ const pwdForm = reactive({
password: '', password: '',
password_new: '', password_new: '',
@@ -312,6 +376,11 @@
}) })
const ruleFormRef = ref<FormInstance>() const ruleFormRef = ref<FormInstance>()
const ruleFormbdRef = ref<FormInstance>()
const rulesbd = reactive<FormRules>({
report_to: [{ required: true, message: '请选择直属上级', trigger: 'blur' }],
office_clerk_id: [{ required: true, message: '请选择所属内勤', trigger: 'blur' }]
})
const options = [ const options = [
{ {
@@ -330,6 +399,7 @@
onMounted(async () => { onMounted(async () => {
// await getarea() // await getarea()
await getuserInfo() await getuserInfo()
await getuserOptions()
}) })
const qrcodeUrl = computed(() => { const qrcodeUrl = computed(() => {
const userStore = useUserStore() as any const userStore = useUserStore() as any
@@ -374,6 +444,27 @@
} }
isEditPwd.value = !isEditPwd.value isEditPwd.value = !isEditPwd.value
} }
//用户下拉
const userOptions = ref<any>()
const usernqOptions = ref<any>()
const getuserOptions = async () => {
const res = await commonService.getUserSelect()
const resparams = await commonService.getUserSelectparams({ role_id: '5' })
userOptions.value = res
usernqOptions.value = resparams
}
const editbd = async (formEl: FormInstance | undefined) => {
if (isEditbd.value) {
if (formbd.value.report_to == '' || formbd.value.office_clerk_id == '') {
ElMessage.error('直属上级或所属内勤不能为空')
return
}
const res = await CrmService.crmuseredit(formbd.value)
ElMessage.success(res?.message || '操作成功')
getuserInfo()
}
isEditbd.value = !isEditbd.value
}
//头像上传 //头像上传
function handleUploadavatar(response: any) { function handleUploadavatar(response: any) {
// 假设返回图片地址字段为 response.url 或 response.data.url // 假设返回图片地址字段为 response.url 或 response.data.url
+5 -3
View File
@@ -68,6 +68,7 @@
underline="never" underline="never"
style="margin-right: 8px" style="margin-right: 8px"
@click="Vehicleseries(scope.row)" @click="Vehicleseries(scope.row)"
v-if="hasAuth('brand@collect')"
> >
<i class="iconfont-sys"> &#xe7d1;</i>采集车系 <i class="iconfont-sys"> &#xe7d1;</i>采集车系
</el-link> </el-link>
@@ -76,6 +77,7 @@
underline="never" underline="never"
style="margin-right: 8px" style="margin-right: 8px"
@click="showSeriesListDialog(scope.row)" @click="showSeriesListDialog(scope.row)"
v-if="hasAuth('brand@show_series')"
> >
<i class="iconfont-sys">&#xe7ff;</i>查看车系 <i class="iconfont-sys">&#xe7ff;</i>查看车系
</el-link> </el-link>
@@ -215,7 +217,7 @@
type="primary" type="primary"
style="margin-left: 8px" style="margin-left: 8px"
@click="showSeriesDialog('add')" @click="showSeriesDialog('add')"
v-if="hasAuth('series@add')" v-if="hasAuth('crm_brand_series@add')"
>新增系列</ElButton >新增系列</ElButton
> >
</div> </div>
@@ -247,7 +249,7 @@
underline="never" underline="never"
style="margin-right: 8px" style="margin-right: 8px"
@click="collectVehicleModels(scope.row)" @click="collectVehicleModels(scope.row)"
v-if="hasAuth('brand@update')" v-if="hasAuth('brand@collect_vehicle_models')"
> >
<i class="iconfont-sys"> &#xe7d1;</i>采集车型 <i class="iconfont-sys"> &#xe7d1;</i>采集车型
</el-link> </el-link>
@@ -256,7 +258,7 @@
underline="never" underline="never"
style="margin-right: 8px" style="margin-right: 8px"
@click="showVehicleListDialog(scope.row)" @click="showVehicleListDialog(scope.row)"
v-if="hasAuth('brand@destroy')" v-if="hasAuth('brand@show_vehicle_list')"
> >
<i class="iconfont-sys">&#xe7ff;</i>查看车型 <i class="iconfont-sys">&#xe7ff;</i>查看车型
</el-link> </el-link>
+33 -5
View File
@@ -43,8 +43,16 @@
<!-- 数据表格 --> <!-- 数据表格 -->
<div class="table-container boxshadow"> <div class="table-container boxshadow">
<div class="btntab"> <div class="btntab">
<ElButton type="primary" v-ripple @click="handleAdd">新增车辆</ElButton> <ElButton type="primary" v-ripple @click="handleAdd" v-if="hasAuth('vehicle_list@add')"
<ElButton type="success" v-ripple @click="crawlKeywordfn">通过关键字查找车辆</ElButton> >新增车辆</ElButton
>
<ElButton
type="success"
v-ripple
@click="crawlKeywordfn"
v-if="hasAuth('vehicle_list@find')"
>通过关键字查找车辆</ElButton
>
</div> </div>
<ArtTable <ArtTable
ref="tableRef" ref="tableRef"
@@ -103,9 +111,27 @@
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="操作" fixed="right" width="150" align="center"> <ElTableColumn label="操作" fixed="right" width="150" align="center">
<template #default="scope"> <template #default="scope">
<ElButton link type="primary" @click="handleEdit(scope.row)">编辑</ElButton> <ElButton
<ElButton link type="primary" @click="handleView(scope.row)">查看</ElButton> link
<ElButton link type="danger" @click="handleDelete(scope.row)">删除</ElButton> type="primary"
@click="handleEdit(scope.row)"
v-if="hasAuth('vehicle_list@update')"
>编辑</ElButton
>
<ElButton
link
type="primary"
@click="handleView(scope.row)"
v-if="hasAuth('vehicle_list@show')"
>查看</ElButton
>
<ElButton
link
type="danger"
@click="handleDelete(scope.row)"
v-if="hasAuth('vehicle_list@destroy')"
>删除</ElButton
>
</template> </template>
</ElTableColumn> </ElTableColumn>
</template> </template>
@@ -1122,6 +1148,8 @@
import { ElMessage, ElMessageBox, ElLoading } from 'element-plus' import { ElMessage, ElMessageBox, ElLoading } from 'element-plus'
import { vehicleService } from '@/api/vehicleApi' import { vehicleService } from '@/api/vehicleApi'
import { commonService } from '@/api/commonApi' import { commonService } from '@/api/commonApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'AdminVehicleList' }) defineOptions({ name: 'AdminVehicleList' })
const keywordwidth = ref('900px') const keywordwidth = ref('900px')
const is_series = ref(1) const is_series = ref(1)
+8 -7
View File
@@ -83,7 +83,7 @@
</ElOption> </ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem prop="company" label="系统"> <!-- <ElFormItem prop="company" label="系统">
<ElSelect v-model="formData.systems" class="account-select" @change="changesystems"> <ElSelect v-model="formData.systems" class="account-select" @change="changesystems">
<ElOption <ElOption
v-for="account in systemsList" v-for="account in systemsList"
@@ -94,7 +94,7 @@
<span>{{ account.name }}</span> <span>{{ account.name }}</span>
</ElOption> </ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem> -->
<div class="drag-verify"> <div class="drag-verify">
<div class="drag-verify-content" :class="{ error: !isPassing && isClickPass }"> <div class="drag-verify-content" :class="{ error: !isPassing && isClickPass }">
<ArtDragVerify <ArtDragVerify
@@ -151,7 +151,7 @@
</ElOption> </ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem prop="company" label="系统"> <!-- <ElFormItem prop="company" label="系统">
<ElSelect v-model="formData.systems" class="account-select" @change="changesystems"> <ElSelect v-model="formData.systems" class="account-select" @change="changesystems">
<ElOption <ElOption
v-for="account in systemsList" v-for="account in systemsList"
@@ -162,7 +162,7 @@
<span>{{ account.name }}</span> <span>{{ account.name }}</span>
</ElOption> </ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem> -->
</ElForm> </ElForm>
<div class="qrcode-login" v-if="!isInFeishu"> <div class="qrcode-login" v-if="!isInFeishu">
<div id="login_container"></div> <div id="login_container"></div>
@@ -278,11 +278,11 @@
companyid.value = company companyid.value = company
iscompany.value = company iscompany.value = company
userStore.setCompany(company, companyt?.abbr) userStore.setCompany(company, companyt?.abbr)
if (companyid.value && systemsid.value) { if (activeLoginType.value == 'qrcode') {
getfeishuAppList() getfeishuAppList()
} }
} }
if (companyabbr != '' && systemsabbr != '') { if (companyabbr != '' && activeLoginType.value == 'qrcode') {
iscompany.value = true iscompany.value = true
getfeishuAppList() getfeishuAppList()
} }
@@ -457,7 +457,8 @@
// formData.systems = Number(system_id) // formData.systems = Number(system_id)
// } // }
// 只有两个 id 都有值时才调用 // 只有两个 id 都有值时才调用
if (companyid && systemsid.value) { userStore.setSystems('1', 'fdesk')
if (companyid && activeLoginType.value == 'qrcode') {
getfeishuAppList() getfeishuAppList()
} }
}) })
+12 -2
View File
@@ -51,13 +51,21 @@
<el-table-column prop="created_at" label="创建时间"></el-table-column> <el-table-column prop="created_at" label="创建时间"></el-table-column>
<el-table-column fixed="right" label="操作" width="160px"> <el-table-column fixed="right" label="操作" width="160px">
<template #default="scope"> <template #default="scope">
<div class="follow-detli" @click="onDetail(scope.row)"> <div
class="follow-detli"
@click="onDetail(scope.row)"
v-if="hasAuth('highseas@show')"
>
<span class="custom-clock-icon" style="vertical-align: middle; margin-right: 4px"> <span class="custom-clock-icon" style="vertical-align: middle; margin-right: 4px">
<i class="iconfont-sys">&#xe70f;</i> <i class="iconfont-sys">&#xe70f;</i>
</span> </span>
详情 详情
</div> </div>
<div class="follow-action" @click="onFollow(scope.row)"> <div
class="follow-action"
@click="onFollow(scope.row)"
v-if="hasAuth('highseas@claim')"
>
<span class="custom-clock-icon" style="vertical-align: middle; margin-right: 4px"> <span class="custom-clock-icon" style="vertical-align: middle; margin-right: 4px">
<i class="iconfont-sys">&#xe841;</i> <i class="iconfont-sys">&#xe841;</i>
</span> </span>
@@ -79,6 +87,8 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { CrmService } from '@/api/crmApi' import { CrmService } from '@/api/crmApi'
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'CrmHighseas' }) defineOptions({ name: 'CrmHighseas' })
const loading = ref(false) const loading = ref(false)
const pagination = reactive({ const pagination = reactive({
+14 -4
View File
@@ -56,7 +56,11 @@
<ElTableColumn label="操作" fixed="right" min-width="160" align="center"> <ElTableColumn label="操作" fixed="right" min-width="160" align="center">
<template #default="scope"> <template #default="scope">
<el-link <el-link
v-if="scope.row.file_url != null && scope.row.file_url != ''" v-if="
scope.row.file_url != null &&
scope.row.file_url != '' &&
hasAuth('final_stock@print')
"
type="warning" type="warning"
underline="never" underline="never"
@click="printfn(scope.row)" @click="printfn(scope.row)"
@@ -65,7 +69,7 @@
<i class="iconfont-sys">&#xe782;</i> 打印预览 <i class="iconfont-sys">&#xe782;</i> 打印预览
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 0" v-if="scope.row.approval_status == 0 && hasAuth('final_stock@edit')"
type="primary" type="primary"
underline="never" underline="never"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
@@ -74,7 +78,7 @@
<i class="iconfont-sys">&#xe6bf;</i> 编辑 <i class="iconfont-sys">&#xe6bf;</i> 编辑
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 0" v-if="scope.row.approval_status == 0 && hasAuth('final_stock@submit')"
type="success" type="success"
underline="never" underline="never"
@click="handleapproval(scope.row)" @click="handleapproval(scope.row)"
@@ -87,10 +91,16 @@
underline="never" underline="never"
@click="handleView1(scope.row)" @click="handleView1(scope.row)"
style="margin-right: 8px" style="margin-right: 8px"
v-if="hasAuth('final_stock@view')"
> >
<i class="iconfont-sys">&#xe76c;</i> 查看终版 <i class="iconfont-sys">&#xe76c;</i> 查看终版
</el-link> </el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)"> <el-link
type="warning"
underline="never"
@click="showDialogtimeline(scope.row)"
v-if="hasAuth('final_stock@approval_history')"
>
<i class="iconfont-sys">&#xe728;</i> 查看审批 <i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link> </el-link>
</template> </template>
+22 -12
View File
@@ -2,7 +2,9 @@
<div class="stocking-page"> <div class="stocking-page">
<div class="stocking-toolbar boxshadow"> <div class="stocking-toolbar boxshadow">
<div class="toolbar-left"> <div class="toolbar-left">
<ElButton type="primary" v-ripple @click="handleCreate">创建备货单</ElButton> <ElButton type="primary" v-ripple @click="handleCreate" v-if="hasAuth('stock@add')"
>创建备货单</ElButton
>
</div> </div>
<div class="toolbar-right"> <div class="toolbar-right">
<el-input <el-input
@@ -58,7 +60,9 @@
<template #default="scope"> <template #default="scope">
<ElRow :gutter="10" justify="center"> <ElRow :gutter="10" justify="center">
<el-link <el-link
v-if="scope.row.file_url != null && scope.row.file_url != ''" v-if="
scope.row.file_url != null && scope.row.file_url != '' && hasAuth('stock@print')
"
type="warning" type="warning"
underline="never" underline="never"
@click="printfn(scope.row)" @click="printfn(scope.row)"
@@ -67,7 +71,7 @@
<i class="iconfont-sys">&#xe782;</i> 打印预览 <i class="iconfont-sys">&#xe782;</i> 打印预览
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 0" v-if="scope.row.approval_status == 0 && hasAuth('stock@submit')"
type="success" type="success"
underline="never" underline="never"
@click="handleapproval(scope.row)" @click="handleapproval(scope.row)"
@@ -76,7 +80,7 @@
<i class="iconfont-sys">&#xe641;</i> 提交 <i class="iconfont-sys">&#xe641;</i> 提交
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 0" v-if="scope.row.approval_status == 0 && hasAuth('stock@edit')"
type="primary" type="primary"
underline="never" underline="never"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
@@ -88,14 +92,17 @@
type="success" type="success"
underline="never" underline="never"
@click="handleView(scope.row)" @click="handleView(scope.row)"
style="margin-right: 8px;color: #750AF8;" style="margin-right: 8px; color: #750af8"
v-if="hasAuth('stock@show')"
> >
<i class="iconfont-sys">&#xe76c;</i> 查看 <i class="iconfont-sys">&#xe76c;</i> 查看
</el-link> </el-link>
<el-link <el-link
v-if=" v-if="
scope.row.is_use == 0 && scope.row.is_use == 0 &&
scope.row.approval_status == 2 &&(scope.row.appro_status?scope.row.appro_status.status=='approved':false) scope.row.approval_status == 2 &&
hasAuth('stock@add_final') &&
(scope.row.appro_status ? scope.row.appro_status.status == 'approved' : false)
" "
type="primary" type="primary"
underline="never" underline="never"
@@ -105,7 +112,7 @@
<i class="iconfont-sys">&#xe6bf;</i> 创建终版 <i class="iconfont-sys">&#xe6bf;</i> 创建终版
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.is_use == 1" v-if="scope.row.is_use == 1 && hasAuth('stock@show_final')"
type="success" type="success"
underline="never" underline="never"
style="margin-right: 8px" style="margin-right: 8px"
@@ -118,6 +125,7 @@
underline="never" underline="never"
@click="copys(scope.row)" @click="copys(scope.row)"
style="margin-right: 8px;color: #F04800;" style="margin-right: 8px;color: #F04800;"
v-if="hasAuth('stock@copy')"
> >
<i class="iconfont-sys">&#xe8b7;</i> 复制 <i class="iconfont-sys">&#xe8b7;</i> 复制
</el-link> </el-link>
@@ -126,11 +134,12 @@
underline="never" underline="never"
@click="showDialogtimeline(scope.row)" @click="showDialogtimeline(scope.row)"
style="margin-right: 8px" style="margin-right: 8px"
v-if="hasAuth('stock@show_approval')"
> >
<i class="iconfont-sys">&#xe728;</i> 查看审批 <i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 1" v-if="scope.row.approval_status == 1 && hasAuth('stock@recall')"
type="danger" type="danger"
underline="never" underline="never"
@click="stockrecallfn(scope.row)" @click="stockrecallfn(scope.row)"
@@ -139,7 +148,7 @@
<i class="iconfont-sys">&#xe65e;</i> 撤回 <i class="iconfont-sys">&#xe65e;</i> 撤回
</el-link> </el-link>
<el-link <el-link
v-if="scope.row.approval_status == 2" v-if="scope.row.approval_status == 2 && hasAuth('stock@invalid')"
type="danger" type="danger"
underline="never" underline="never"
@click="stockinvalidfn(scope.row)" @click="stockinvalidfn(scope.row)"
@@ -151,7 +160,8 @@
v-if=" v-if="
scope.row.approval_status != 1 && scope.row.approval_status != 1 &&
scope.row.approval_status != 2 && scope.row.approval_status != 2 &&
scope.row.approval_status != 4 scope.row.approval_status != 4 &&
hasAuth('stock@del')
" "
type="danger" type="danger"
underline="never" underline="never"
@@ -257,8 +267,8 @@
const timelineDialogVisible = ref(false) const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([]) const approvalRecords = ref<any[]>([])
const isFinites = ref(false) const isFinites = ref(false)
// import { useAuth } from '@/composables/useAuth' import { useAuth } from '@/composables/useAuth'
// const { hasAuth } = useAuth() const { hasAuth } = useAuth()
defineOptions({ name: 'CrmStockingList' }) // 定义组件名称,用于 KeepAlive 缓存控制 defineOptions({ name: 'CrmStockingList' }) // 定义组件名称,用于 KeepAlive 缓存控制
+6 -1
View File
@@ -23,7 +23,12 @@
</div> </div>
</div> </div>
<div class="table boxshadow"> <div class="table boxshadow">
<el-button type="primary" @click="gotransfer" :disabled="selectedRows.length === 0"> <el-button
type="primary"
@click="gotransfer"
:disabled="selectedRows.length === 0"
v-if="hasAuth('crm_customer_team@cede')"
>
<i class="iconfont-sys">&#xe794;</i> 批量转移 <i class="iconfont-sys">&#xe794;</i> 批量转移
</el-button> </el-button>
<ArtTable <ArtTable
+1 -1
View File
@@ -215,7 +215,7 @@
type="primary" type="primary"
style="margin-left: 8px" style="margin-left: 8px"
@click="showSeriesDialog('add')" @click="showSeriesDialog('add')"
v-if="hasAuth('series@add')" v-if="hasAuth('crm_brand_series@add')"
>新增系列</ElButton >新增系列</ElButton
> >
</div> </div>
+3 -3
View File
@@ -38,7 +38,7 @@
<ElRow> <ElRow>
<div style="width: 12px"></div> <div style="width: 12px"></div>
<ElCol :xs="24" :sm="12" :lg="6" class="el-col2"> <ElCol :xs="24" :sm="12" :lg="6" class="el-col2">
<ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('color@add')" type="primary"> <ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('crm_color@add')" type="primary">
新增颜色 新增颜色
</ElButton> </ElButton>
</ElCol> </ElCol>
@@ -79,14 +79,14 @@
<el-button <el-button
link link
@click="showDialog('edit', scope.row)" @click="showDialog('edit', scope.row)"
v-if="hasAuth('color@update')" v-if="hasAuth('crm_color@update')"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button
type="danger" type="danger"
link link
@click="deleteColor(scope.row)" @click="deleteColor(scope.row)"
v-if="hasAuth('color@destroy')" v-if="hasAuth('crm_color@destroy')"
> >
删除 删除
</el-button> </el-button>
+3 -3
View File
@@ -23,7 +23,7 @@
<ElButton <ElButton
@click="showDialog('add')" @click="showDialog('add')"
v-ripple v-ripple
v-if="hasAuth('modification@add')" v-if="hasAuth('crm_modification@add')"
type="primary" type="primary"
> >
新增改装项目 新增改装项目
@@ -66,14 +66,14 @@
<el-button <el-button
link link
@click="showDialog('edit', scope.row)" @click="showDialog('edit', scope.row)"
v-if="hasAuth('modification@update')" v-if="hasAuth('crm_modification@update')"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button
type="danger" type="danger"
link link
@click="deleteModification(scope.row)" @click="deleteModification(scope.row)"
v-if="hasAuth('modification@destroy')" v-if="hasAuth('crm_modification@destroy')"
> >
删除 删除
</el-button> </el-button>
+3 -3
View File
@@ -2,7 +2,7 @@
<div class="port-page"> <div class="port-page">
<div class="port-toolbar boxshadow"> <div class="port-toolbar boxshadow">
<div class="toolbar-left"> <div class="toolbar-left">
<ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('port@add')" type="primary" <ElButton @click="showDialog('add')" v-ripple v-if="hasAuth('crm_port@add')" type="primary"
>创建港口</ElButton >创建港口</ElButton
> >
</div> </div>
@@ -55,14 +55,14 @@
<ElTableColumn fixed="right" label="操作" width="200px"> <ElTableColumn fixed="right" label="操作" width="200px">
<template #default="scope"> <template #default="scope">
<ElRow> <ElRow>
<el-button link @click="showDialog('edit', scope.row)" v-if="hasAuth('port@update')" <el-button link @click="showDialog('edit', scope.row)" v-if="hasAuth('crm_port@update')"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button
type="danger" type="danger"
link link
@click="deletePort(scope.row)" @click="deletePort(scope.row)"
v-if="hasAuth('port@destroy')" v-if="hasAuth('crm_port@destroy')"
>删除</el-button >删除</el-button
> >
</ElRow> </ElRow>
+1
View File
@@ -35,6 +35,7 @@
:data="filteredTableData" :data="filteredTableData"
:marginTop="10" :marginTop="10"
:stripe="false" :stripe="false"
:pagination="false"
> >
<template #default> <template #default>
<ElTableColumn v-for="col in columns" :key="col.prop || col.type" v-bind="col" /> <ElTableColumn v-for="col in columns" :key="col.prop || col.type" v-bind="col" />
+24 -7
View File
@@ -7,7 +7,7 @@
<div style="width: 12px"></div> <div style="width: 12px"></div>
<ElCol :xs="24" :sm="12" :lg="6" class="el-col2"> <ElCol :xs="24" :sm="12" :lg="6" class="el-col2">
<!-- <ElButton v-ripple>搜索</ElButton> --> <!-- <ElButton v-ripple>搜索</ElButton> -->
<ElButton v-if="hasAuth('work_order_self@add')" @click="showDialog('add')" v-ripple> <ElButton v-if="hasAuth('work_order_user_self@add')" @click="showDialog('add')" v-ripple>
新增 新增
</ElButton> </ElButton>
</ElCol> </ElCol>
@@ -38,9 +38,26 @@
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="状态" prop="status"> <ElTableColumn label="状态" prop="status">
<template #default="scope"> <template #default="scope">
<ElTag :type="scope.row.status == 1 ? 'info' : scope.row.status == 2 ?'primary' :scope.row.status == 4 ?'success' : 'danger'"> <ElTag
{{ scope.row.status == 1 ? '待受理' : scope.row.status == 2 ? '处理中' : :type="
scope.row.status == 4 ? "已完成":'关闭' }} scope.row.status == 1
? 'info'
: scope.row.status == 2
? 'primary'
: scope.row.status == 4
? 'success'
: 'danger'
"
>
{{
scope.row.status == 1
? '待受理'
: scope.row.status == 2
? '处理中'
: scope.row.status == 4
? '已完成'
: '关闭'
}}
</ElTag> </ElTag>
</template> </template>
</ElTableColumn> </ElTableColumn>
@@ -49,21 +66,21 @@
<template #default="scope"> <template #default="scope">
<ElRow> <ElRow>
<el-button <el-button
v-if="scope.row.status == 1 && hasAuth('work_order_self@edit')" v-if="scope.row.status == 1 && hasAuth('work_order_user_self@edit')"
link link
@click="showDialog('edit', scope.row)" @click="showDialog('edit', scope.row)"
> >
编辑 编辑
</el-button> </el-button>
<el-button <el-button
v-if="hasAuth('work_order_self@status')" v-if="hasAuth('work_order_user_self@status')"
link link
@click="statusEdit(scope.row)" @click="statusEdit(scope.row)"
> >
状态编辑 状态编辑
</el-button> </el-button>
<el-button <el-button
v-if="hasAuth('work_order_self@conversation_list')" v-if="hasAuth('work_order_user_self@conversation_list')"
link link
@click="openChat(scope.row)" @click="openChat(scope.row)"
> >