|
@@ -18,7 +18,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="手机号" prop="phoneNo" :rules="[{ required: true, message: '请填写手机号', trigger: 'blur' }]">
|
|
|
+ <el-form-item label="手机号" prop="phoneNo" :rules="[{ required: isPhoneRequired, message: '请填写手机号', trigger: 'blur' }]">
|
|
|
<el-input v-model="state.ruleForm.phoneNo" placeholder="请填写手机号" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -136,12 +136,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="systemUserEdit">
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { computed, reactive, ref } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import { throttle } from '@/utils/tools';
|
|
|
import { updateUser } from '@/api/system/user';
|
|
|
import other from '@/utils/other';
|
|
|
+import { useThemeConfig } from '@/stores/themeConfig';
|
|
|
+import { storeToRefs } from 'pinia';
|
|
|
// 定义子组件向父组件传值/事件
|
|
|
const emit = defineEmits(['updateList']);
|
|
|
const props = defineProps<{
|
|
@@ -203,6 +205,12 @@ const openDialog = (row: any) => {
|
|
|
state.ruleForm.defaultTelNo = state.ruleForm.defaultTelNo === '' ? null : state.ruleForm.defaultTelNo;
|
|
|
state.dialogVisible = true;
|
|
|
};
|
|
|
+const storesThemeConfig = useThemeConfig();
|
|
|
+const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
+// 判断用户是否必填 自贡非必填 其他必填
|
|
|
+const isPhoneRequired = computed(()=>{
|
|
|
+ return ['YiBin','LuZhou'].includes(themeConfig.value.appScope)
|
|
|
+})
|
|
|
// 关闭弹窗
|
|
|
const closeDialog = () => {
|
|
|
state.dialogVisible = false;
|