@dongkboy пре 5 месеци
родитељ
комит
68e1b14960
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      src/views/personnel/wechatService.vue

+ 8 - 8
src/views/personnel/wechatService.vue

@@ -40,7 +40,7 @@
         <template v-slot:customSlot="scope">
           <div class="flex a-c j-c " @click="goSupportStaff(scope.data)">
             <el-tag :type="scope.data.scheduling ? 'primary' : 'danger'">{{ scope.data.scheduling ? '已配置' : '未配置'
-              }}</el-tag>
+            }}</el-tag>
             <el-icon class="m-left-10" v-if="!scope.data.scheduling && isHovered[scope.data.userId]">
               <Edit />
             </el-icon>
@@ -126,7 +126,7 @@ interface ServiceForm {
 }
 const dialogTitle = ref('添加客服账号');
 const dialogType = ref('add');
-const id=ref();
+const id = ref();
 const ServiceFormRef = ref<FormInstance>()
 //客服新增表单
 const ServiceForm = reactive<ServiceForm>({
@@ -158,8 +158,8 @@ const imageUrl = ref('')//图片回显
 //图片上传事件
 const beforeAvatarUpload = (file: any) => {
 
-  if (file.raw.type !== 'image/jpeg') {
-    ElMessage.error('只读取,png,jeg格式的图片')
+  if (file.raw.type !== 'image/jpeg' && file.raw.type !== 'image/png' && file.raw.type !== 'image/jpg') {
+    ElMessage.error('只读取,png,jpg,jpeg格式的图片')
     return false
   } else if (file.raw.size / 1024 / 1024 > 2) {
     ElMessage.error('请上传小于2MB的图片')
@@ -257,7 +257,7 @@ function ServiceUpdate(item: any) {
   dialogTitle.value = '编辑'
   dialogType.value = 'edit'
   imageUrl.value = item.avatar;
-  id.value=item.id;
+  id.value = item.id;
   api.wechatApi.wechatServiceDetail(item.id).then((res: any) => {
     if (res.code == 200) {
       ServiceForm.nickname = res.data.nickname;
@@ -304,12 +304,12 @@ function ServiceDel(item: any) {
     })
 }
 //跳转节假日配置页
-const goSupportStaff = (row:any) => {
+const goSupportStaff = (row: any) => {
   router.push({
     name: 'personnelHolidaySchedule',
     query: {
       id: row.id,
-      name:row.nickname,
+      name: row.nickname,
     }
   })
 }
@@ -372,7 +372,7 @@ const ServiceSave = async (formEl: FormInstance | undefined) => {
           }
         })
       } else {
-        api.wechatApi.wechatServicePut(id.value,ServiceForm).then((res: any) => {
+        api.wechatApi.wechatServicePut(id.value, ServiceForm).then((res: any) => {
           if (res.code == 200) {
             ElMessage({
               type: 'success',