浏览代码

提交相关代码

Lijy 4 月之前
父节点
当前提交
4033fbe320

二进制
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/image/login_logo.png


+ 38 - 12
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/login.vue

@@ -1,16 +1,26 @@
 <template>
   <div class="loginPage w-full h-full bg-white">
-    <van-form show-error :show-error-message="false" @submit="onSubmit">
-      <van-cell-group inset>
-        <van-field v-model="username" name="username" label="用户名" placeholder="用户名" :rules="rules" />
-        <van-field v-model="password" type="password" name="password" label="密码" placeholder="密码" :rules="rules" />
-      </van-cell-group>
-      <div style="margin: 16px">
-        <van-button round block type="primary" native-type="submit">
-          提交
-        </van-button>
+    <template v-if="!isCorpWX">
+      <div class="flex justify-center">
+        <div class="logo-image">
+          <img src="/src/assets/image/login_logo.png" class="w-full h-full" />
+        </div>
       </div>
-    </van-form>
+      <van-form show-error :show-error-message="false" @submit="onSubmit">
+        <van-cell-group inset>
+          <van-field v-model="username" name="username" label="用户名" placeholder="用户名" :rules="rules" />
+          <van-field v-model="password" type="password" name="password" label="密码" placeholder="密码" :rules="rules" />
+        </van-cell-group>
+        <div class="login-btn">
+          <van-button round block type="primary" native-type="submit">
+            提交
+          </van-button>
+        </div>
+      </van-form>
+    </template>
+    <template v-else>
+      <div class="flex justify-center getInto">正在进入系统中...</div>
+    </template>
   </div>
 </template>
 
@@ -89,7 +99,7 @@ function onSubmit(fromVal) {
 function loginByUserId(userId) {
   toastLoading('登陆中...', 0)
   // requests.post(USER_ID_LOGIN, { params: { userId } }).then(({ data }) => {
-  requests.post(USER_ID_LOGIN, {  userId }).then(({ data }) => {
+  requests.post(USER_ID_LOGIN, { userId }).then(({ data }) => {
     loginProcessing(data)
   })
 }
@@ -170,4 +180,20 @@ function separateRouting(list = []) {
 
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.logo-image {
+  width: 150px;
+  height: 150px;
+  margin: 100px 0 50px 0;
+}
+
+.getInto {
+  padding-top: 100px;
+  font-size: 24px;
+  color: #999;
+}
+
+.login-btn {
+  margin: 24px 16px 16px 16px;
+}
+</style>

+ 8 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/my/index.vue

@@ -15,7 +15,7 @@
           </div>
         </div>
         
-        <div class="w-full mb-40 px-24">
+        <div class="w-full mb-40 px-24" v-if="!isCorpWX">
           <van-button type="primary" @click="signOut" class="w-full">退出登录</van-button>
         </div>
       </div>
@@ -37,6 +37,7 @@ import Footer from "@components/page/footer.vue";
 
 const router = useRouterStore()
 const userInfo = useInfoStore()
+const isCorpWX = ref(false)
 function signOut() {
   router.redirectTo({
     pathName: 'login',
@@ -48,9 +49,14 @@ function signOut() {
   })
 }
 
+function judgingTheEnvironment() {
+  const currentEnvironment = navigator.userAgent.toLowerCase();
+  isCorpWX.value = currentEnvironment.indexOf("wxwork") > 0 ? true : false
+}
+
 useLifecycle({
   load: () => {
-
+    judgingTheEnvironment()
   }
 });
 </script>

+ 5 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/visitorProgram/visitorDetails.vue

@@ -26,7 +26,11 @@
       <van-cell-group>
         <van-cell title="计划名称" :value="detailedData.planName" />
         <van-cell title="客户姓名" :value="detailedData.customName" />
-        <van-cell title="负责人" :value="detailedData.inchargerName" />
+        <van-cell title="负责人">
+          <template #title>
+            <TranslationComponent :openId="detailedData.inchargerName" />
+          </template>
+        </van-cell>
         <van-cell title="拜访目的" :value="detailedData.visitGoalName" />
         <van-cell title="拜访时间" :value="detailedData.visitTime" />
         <van-cell title="提醒" :value="detailedData.remindTypeName" />

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/index.vue

@@ -118,7 +118,10 @@
         <el-form-item label="操作记录" label-width="7em">
           <div class="w-full">
             <div v-for="item in form.taskLogs" class=" border-b-2 w-full pl-3">
-              {{ `${dayjs(item.modTime).format('YYYY-MM-DD HH:mm:ss')} ${item.userName} ${item.content}` }}
+              <!-- {{ `${dayjs(item.modTime).format('YYYY-MM-DD HH:mm:ss')} ${item.userName} ${item.content}` }} -->
+              {{ dayjs(item.modTime).format('YYYY-MM-DD HH:mm:ss') }}
+              <TextTranslation translationTypes="userName" :translationValue="item.userName" />
+              {{ item.content }}
             </div>
           </div>
         </el-form-item>

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -85,7 +85,7 @@
                   <div class="table-text-textnowrap" v-if="item.eventName"
                     @click="dealWithTableColumn(scope.row, item.eventName)">{{ scope.row[item.prop] }}</div>
                   <template v-else-if="['inchargerName', 'creatorName'].includes(item.prop)">
-                    <TextTranslation translationTypes="userName" :translationValue="scope.row[item.prop]">
+                    <TextTranslation translationTypes="userName" :translationValue="scope.row[item.prop]" v-if="scope.row[item.prop]">
                     </TextTranslation>
                   </template>
                   <template v-else>{{ scope.row[item.prop] }}</template>

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/index.vue

@@ -46,7 +46,7 @@
                   }}</el-button>
                 </template>
                 <template v-if="['creatorName', 'ownerName'].includes(column.prop)">
-                  <TextTranslation translationTypes="userName" :translationValue="scope.row[column.prop]"></TextTranslation>
+                  <TextTranslation translationTypes="userName" :translationValue="scope.row[column.prop]" v-if="scope.row[column.prop]"></TextTranslation>
                 </template>
                 <template v-if="column.event === 'getSex'">
                   {{ getSex(scope.row.sex) }}

+ 14 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/corpreport/index.vue

@@ -151,10 +151,23 @@ const queryConversion = async (payload?: RequestProps) => {
 
   // @ts-ignore
   chartOptions.series = [{ type: 'bar', barWidth: 20 }];
+
+  if(userInfo && userInfo.value.userNameNeedTranslate == 1) {
+    dealWithTranslation(sourceDataTypes, sourceData).then((res: any) => {
+      // @ts-ignore
+      chartOptions.dataset.dimensions = ['name', '客户转化率(%)'];
+      // @ts-ignore
+      chartOptions.dataset.source = res
+      chartOptions.legend = undefined;
+    })
+
+    return
+  }
+
   // @ts-ignore
   chartOptions.dataset.dimensions = ['name', '客户转化率(%)'];
   // @ts-ignore
-  chartOptions.dataset.source = userInfo.userNameNeedTranslate == 1 ? dealWithTranslation(sourceDataTypes, sourceData) : sourceData
+  chartOptions.dataset.source = sourceData
   // chartOptions.dataset.source = data.map((d) => ({
   //   name: form.type === 1 ? d.name : d.departmentName,
   //   ['客户转化率(%)']: d.dealRate * 100

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue

@@ -82,7 +82,7 @@
             <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable="custom"></el-table-column>
             <el-table-column prop="inchargerName" label="负责人" width="190">
               <template #default="scope">
-                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName"></TextTranslation>
+                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName" v-if="scope.row.inchargerName"></TextTranslation>
               </template>
             </el-table-column>
             <el-table-column prop="creatorName" label="创建人" width="180">

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -60,7 +60,7 @@
                   <div class="table-text-textnowrap" @click.prevent="toDetali(scope.row)">{{ scope.row[column.prop] }}</div>
                 </template>
                 <template v-if="['customSignerName', 'companySignerName', 'inchargerName', 'creatorName'].includes(column.prop)">
-                  <TextTranslation translationTypes="userName" :translationValue="scope.row[column.prop]"></TextTranslation>
+                  <TextTranslation translationTypes="userName" :translationValue="scope.row[column.prop]" v-if="scope.row[column.prop]"></TextTranslation>
                 </template>
                 <template v-if="column.prop === 'receivedStatus'">
                   <div>{{ selectData.RemittanceStatus[scope.row.receivedStatus].name }}</div>

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/product/index.vue

@@ -75,7 +75,7 @@
             </el-table-column>
             <el-table-column prop="inchargerName" label="负责人" width="190">
               <template #default="scope">
-                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName"></TextTranslation>
+                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName" v-if="scope.row.inchargerName"></TextTranslation>
               </template>
             </el-table-column>
             <el-table-column prop="creatorName" label="创建人" width="180">

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

@@ -76,7 +76,7 @@
             <el-table-column prop="customerLevelValue" label="客户级别" width="180" sortable="custom"></el-table-column>
             <el-table-column prop="inchargerName" label="负责人" width="190">
               <template #default="scope">
-                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName"></TextTranslation>
+                <TextTranslation translationTypes="userName" :translationValue="scope.row.inchargerName" v-if="scope.row.inchargerName"</TextTranslation>
               </template>
             </el-table-column>
             <el-table-column prop="createName" label="创建人" width="180">