mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 12:18:43 +08:00 
			
		
		
		
	refactor: vue3.3 defineOptions
This commit is contained in:
		@@ -1,6 +1,8 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <Error type="403" @error-click="push('/')" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="Error403" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
defineOptions({ name: 'Error403' })
 | 
			
		||||
 | 
			
		||||
const { push } = useRouter()
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <Error @error-click="push('/')" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="Error404" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
defineOptions({ name: 'Error404' })
 | 
			
		||||
const { push } = useRouter()
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <Error type="500" @error-click="push('/')" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="Error500" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
defineOptions({ name: 'Error500' })
 | 
			
		||||
const { push } = useRouter()
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -160,7 +160,7 @@
 | 
			
		||||
    </el-col>
 | 
			
		||||
  </el-row>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="Home">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { set } from 'lodash-es'
 | 
			
		||||
import { EChartsOption } from 'echarts'
 | 
			
		||||
import { formatTime } from '@/utils'
 | 
			
		||||
@@ -171,6 +171,8 @@ import avatarImg from '@/assets/imgs/avatar.gif'
 | 
			
		||||
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
 | 
			
		||||
import { pieOptions, barOptions } from './echarts-data'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'Home' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const userStore = useUserStore()
 | 
			
		||||
const { setWatermark } = useWatermark()
 | 
			
		||||
 
 | 
			
		||||
@@ -140,7 +140,7 @@
 | 
			
		||||
    </el-col>
 | 
			
		||||
  </el-row>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="Home2" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { set } from 'lodash-es'
 | 
			
		||||
import { EChartsOption } from 'echarts'
 | 
			
		||||
 | 
			
		||||
@@ -148,6 +148,8 @@ import { useDesign } from '@/hooks/web/useDesign'
 | 
			
		||||
import type { AnalysisTotalTypes } from './types'
 | 
			
		||||
import { barOptions, lineOptions, pieOptions } from './echarts-data'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'Home2' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const loading = ref(true)
 | 
			
		||||
const { getPrefixCls } = useDesign()
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="Login" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { underlineToHump } from '@/utils'
 | 
			
		||||
 | 
			
		||||
import { useDesign } from '@/hooks/web/useDesign'
 | 
			
		||||
@@ -70,6 +70,8 @@ import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
 | 
			
		||||
 | 
			
		||||
import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'Login' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const appStore = useAppStore()
 | 
			
		||||
const { getPrefixCls } = useDesign()
 | 
			
		||||
 
 | 
			
		||||
@@ -143,7 +143,7 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="LoginForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { ElLoading } from 'element-plus'
 | 
			
		||||
import LoginFormTitle from './LoginFormTitle.vue'
 | 
			
		||||
import type { RouteLocationNormalizedLoaded } from 'vue-router'
 | 
			
		||||
@@ -155,6 +155,8 @@ import { usePermissionStore } from '@/store/modules/permission'
 | 
			
		||||
import * as LoginApi from '@/api/login'
 | 
			
		||||
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'LoginForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const message = useMessage()
 | 
			
		||||
const iconHouse = useIcon({ icon: 'ep:house' })
 | 
			
		||||
 
 | 
			
		||||
@@ -3,9 +3,11 @@
 | 
			
		||||
    {{ getFormTitle }}
 | 
			
		||||
  </h2>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="LoginFormTitle" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { LoginStateEnum, useLoginState } from './useLogin'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'LoginFormTitle' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
 | 
			
		||||
const { getLoginState } = useLoginState()
 | 
			
		||||
 
 | 
			
		||||
@@ -92,7 +92,7 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="MobileForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { RouteLocationNormalizedLoaded } from 'vue-router'
 | 
			
		||||
 | 
			
		||||
import { useIcon } from '@/hooks/web/useIcon'
 | 
			
		||||
@@ -103,6 +103,8 @@ import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
 | 
			
		||||
import LoginFormTitle from './LoginFormTitle.vue'
 | 
			
		||||
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'MobileForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const message = useMessage()
 | 
			
		||||
const permissionStore = usePermissionStore()
 | 
			
		||||
 
 | 
			
		||||
@@ -16,12 +16,14 @@
 | 
			
		||||
    </el-col>
 | 
			
		||||
  </el-row>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="QrCodeForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import logoImg from '@/assets/imgs/logo.png'
 | 
			
		||||
 | 
			
		||||
import LoginFormTitle from './LoginFormTitle.vue'
 | 
			
		||||
import { LoginStateEnum, useLoginState } from './useLogin'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'QrCodeForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const { handleBackLogin, getLoginState } = useLoginState()
 | 
			
		||||
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.QR_CODE)
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="RegisterForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { FormRules } from 'element-plus'
 | 
			
		||||
 | 
			
		||||
import { useForm } from '@/hooks/web/useForm'
 | 
			
		||||
@@ -44,6 +44,8 @@ import LoginFormTitle from './LoginFormTitle.vue'
 | 
			
		||||
import { LoginStateEnum, useLoginState } from './useLogin'
 | 
			
		||||
import { FormSchema } from '@/types/form'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'RegisterForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const { required } = useValidator()
 | 
			
		||||
const { register, elFormRef } = useForm()
 | 
			
		||||
 
 | 
			
		||||
@@ -38,11 +38,14 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="SSOLogin" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import LoginFormTitle from './LoginFormTitle.vue'
 | 
			
		||||
import * as OAuth2Api from '@/api/login/oauth2'
 | 
			
		||||
import { LoginStateEnum, useLoginState } from './useLogin'
 | 
			
		||||
import type { RouteLocationNormalizedLoaded } from 'vue-router'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'SSOLogin' })
 | 
			
		||||
 | 
			
		||||
const route = useRoute() // 路由
 | 
			
		||||
const { currentRoute } = useRouter() // 路由
 | 
			
		||||
const { getLoginState, setLoginState } = useLoginState()
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,8 @@
 | 
			
		||||
  <XButton :title="t('common.save')" @click="submit()" />
 | 
			
		||||
  <XButton :title="t('common.reset')" type="danger" @click="init()" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BasicInfo" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { FormRules } from 'element-plus'
 | 
			
		||||
import { ElMessage } from 'element-plus'
 | 
			
		||||
 | 
			
		||||
import { FormSchema } from '@/types/form'
 | 
			
		||||
import type { FormExpose } from '@/components/Form'
 | 
			
		||||
import {
 | 
			
		||||
@@ -22,7 +20,10 @@ import {
 | 
			
		||||
  UserProfileUpdateReqVO
 | 
			
		||||
} from '@/api/system/user/profile'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BasicInfo' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
// 表单校验
 | 
			
		||||
const rules = reactive<FormRules>({
 | 
			
		||||
  nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }],
 | 
			
		||||
@@ -74,7 +75,7 @@ const submit = () => {
 | 
			
		||||
    if (valid) {
 | 
			
		||||
      const data = unref(formRef)?.formModel as UserProfileUpdateReqVO
 | 
			
		||||
      await updateUserProfile(data)
 | 
			
		||||
      ElMessage.success(t('common.updateSuccess'))
 | 
			
		||||
      message.success(t('common.updateSuccess'))
 | 
			
		||||
      await init()
 | 
			
		||||
    }
 | 
			
		||||
  })
 | 
			
		||||
 
 | 
			
		||||
@@ -46,12 +46,14 @@
 | 
			
		||||
    </ul>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProfileUser" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import UserAvatar from './UserAvatar.vue'
 | 
			
		||||
 | 
			
		||||
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProfileUser' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const userInfo = ref<ProfileVO>()
 | 
			
		||||
const getUserInfo = async () => {
 | 
			
		||||
@@ -79,7 +81,7 @@ onMounted(async () => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.list-group {
 | 
			
		||||
  padding-left: 0px;
 | 
			
		||||
  padding-left: 0;
 | 
			
		||||
  list-style: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -87,7 +89,7 @@ onMounted(async () => {
 | 
			
		||||
  border-bottom: 1px solid #e7eaec;
 | 
			
		||||
  border-top: 1px solid #e7eaec;
 | 
			
		||||
  margin-bottom: -1px;
 | 
			
		||||
  padding: 11px 0px;
 | 
			
		||||
  padding: 11px 0;
 | 
			
		||||
  font-size: 13px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -15,12 +15,14 @@
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ResetPwd" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { FormInstance, FormRules } from 'element-plus'
 | 
			
		||||
 | 
			
		||||
import { InputPassword } from '@/components/InputPassword'
 | 
			
		||||
import { updateUserPassword } from '@/api/system/user/profile'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ResetPwd' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n()
 | 
			
		||||
const message = useMessage()
 | 
			
		||||
const formRef = ref<FormInstance>()
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,12 @@
 | 
			
		||||
    />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="UserAvatar" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { uploadAvatar } from '@/api/system/user/profile'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'UserAvatar' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  img: propTypes.string.def('')
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -21,11 +21,13 @@
 | 
			
		||||
    </el-table-column>
 | 
			
		||||
  </el-table>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="UserSocial" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { SystemUserSocialTypeEnum } from '@/utils/constants'
 | 
			
		||||
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
 | 
			
		||||
import { socialAuthRedirect, socialBind, socialUnbind } from '@/api/system/user/socialUser'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'UserSocial' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage()
 | 
			
		||||
const socialUsers = ref<any[]>([])
 | 
			
		||||
const userInfo = ref<ProfileVO>()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div></div>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="Redirect">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
defineOptions({ name: 'Redirect' })
 | 
			
		||||
 | 
			
		||||
const { currentRoute, replace } = useRouter()
 | 
			
		||||
const { params, query } = unref(currentRoute)
 | 
			
		||||
const { path, _redirect_type = 'path' } = params
 | 
			
		||||
 
 | 
			
		||||
@@ -94,12 +94,15 @@
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="BpmProcessDefinition">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
 | 
			
		||||
import * as DefinitionApi from '@/api/bpm/definition'
 | 
			
		||||
import { setConfAndFields2 } from '@/utils/formCreate'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessDefinition' })
 | 
			
		||||
 | 
			
		||||
const { push } = useRouter() // 路由
 | 
			
		||||
const { query } = useRoute() // 查询参数
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,7 +38,7 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmFormEditor" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import * as FormApi from '@/api/bpm/form'
 | 
			
		||||
@@ -46,6 +46,8 @@ import FcDesigner from '@form-create/designer'
 | 
			
		||||
import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate'
 | 
			
		||||
import { useTagsViewStore } from '@/store/modules/tagsView'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmFormEditor' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息
 | 
			
		||||
const { push, currentRoute } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -90,12 +90,14 @@
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" name="BpmForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as FormApi from '@/api/bpm/form'
 | 
			
		||||
import { setConfAndFields2 } from '@/utils/formCreate'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const { currentRoute, push } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -41,12 +41,14 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="UserGroupForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import * as UserGroupApi from '@/api/bpm/userGroup'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'UserGroupForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -111,13 +111,16 @@
 | 
			
		||||
  <UserGroupForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="BpmUserGroup">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as UserGroupApi from '@/api/bpm/userGroup'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
import UserGroupForm from './UserGroupForm.vue'
 | 
			
		||||
import { UserVO } from '@/api/system/user'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmUserGroup' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -121,12 +121,14 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ModelForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { ElMessageBox } from 'element-plus'
 | 
			
		||||
import * as ModelApi from '@/api/bpm/model'
 | 
			
		||||
import * as FormApi from '@/api/bpm/form'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ModelForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -49,9 +49,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ModelImportForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { getAccessToken, getTenantId } from '@/utils/auth'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ModelImportForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="BpmModelEditor">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { MyProcessDesigner, MyProcessPenal } from '@/components/bpmnProcessDesigner/package'
 | 
			
		||||
// 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务)
 | 
			
		||||
import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/content-pad'
 | 
			
		||||
@@ -32,6 +32,8 @@ import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/d
 | 
			
		||||
import CustomPaletteProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/palette'
 | 
			
		||||
import * as ModelApi from '@/api/bpm/model'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmModelEditor' })
 | 
			
		||||
 | 
			
		||||
const router = useRouter() // 路由
 | 
			
		||||
const { query } = useRoute() // 路由的查询
 | 
			
		||||
const message = useMessage() // 国际化
 | 
			
		||||
 
 | 
			
		||||
@@ -226,7 +226,7 @@
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="BpmModel">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
 | 
			
		||||
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
 | 
			
		||||
@@ -235,6 +235,9 @@ import * as FormApi from '@/api/bpm/form'
 | 
			
		||||
import ModelForm from './ModelForm.vue'
 | 
			
		||||
import ModelImportForm from '@/views/bpm/model/ModelImportForm.vue'
 | 
			
		||||
import { setConfAndFields2 } from '@/utils/formCreate'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmModel' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const { push } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -42,10 +42,13 @@
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup name="BpmOALeaveCreate" lang="ts">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import * as LeaveApi from '@/api/bpm/leave'
 | 
			
		||||
import { useTagsViewStore } from '@/store/modules/tagsView'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmOALeaveCreate' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { delView } = useTagsViewStore() // 视图操作
 | 
			
		||||
const { currentRoute } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -16,12 +16,14 @@
 | 
			
		||||
    </el-descriptions>
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmOALeaveDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import * as LeaveApi from '@/api/bpm/leave'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmOALeaveDetail' })
 | 
			
		||||
 | 
			
		||||
const { query } = useRoute() // 查询参数
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
 
 | 
			
		||||
@@ -138,11 +138,14 @@
 | 
			
		||||
    />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="BpmOALeave">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as LeaveApi from '@/api/bpm/leave'
 | 
			
		||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmOALeave' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const router = useRouter() // 路由
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 
 | 
			
		||||
@@ -46,13 +46,16 @@
 | 
			
		||||
    <ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML as any" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="BpmProcessInstanceCreate">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import * as DefinitionApi from '@/api/bpm/definition'
 | 
			
		||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
 | 
			
		||||
import { setConfAndFields2 } from '@/utils/formCreate'
 | 
			
		||||
import type { ApiAttrs } from '@form-create/element-ui/types/config'
 | 
			
		||||
import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessInstanceCreate' })
 | 
			
		||||
 | 
			
		||||
const router = useRouter() // 路由
 | 
			
		||||
const message = useMessage() // 消息
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -14,11 +14,13 @@
 | 
			
		||||
    />
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmProcessInstanceBpmnViewer" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
 | 
			
		||||
import * as ActivityApi from '@/api/bpm/activity'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessInstanceBpmnViewer' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  loading: propTypes.bool, // 是否加载中
 | 
			
		||||
  id: propTypes.string, // 流程实例的编号
 | 
			
		||||
 
 | 
			
		||||
@@ -44,13 +44,15 @@
 | 
			
		||||
    </el-col>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmProcessInstanceTaskList" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { formatDate, formatPast2 } from '@/utils/formatTime'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessInstanceTaskList' })
 | 
			
		||||
 | 
			
		||||
defineProps({
 | 
			
		||||
  loading: propTypes.bool, // 是否加载中
 | 
			
		||||
  tasks: propTypes.array // 流程任务的数组
 | 
			
		||||
  tasks: propTypes.arrayOf(propTypes.object) // 流程任务的数组
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
/** 获得任务对应的 icon */
 | 
			
		||||
 
 | 
			
		||||
@@ -24,10 +24,12 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmTaskUpdateAssigneeForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as TaskApi from '@/api/bpm/task'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmTaskUpdateAssigneeForm' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const formLoading = ref(false) // 表单的加载中
 | 
			
		||||
const formData = ref({
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,7 @@
 | 
			
		||||
    <TaskUpdateAssigneeForm ref="taskUpdateAssigneeFormRef" @success="getDetail" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmProcessInstanceDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { useUserStore } from '@/store/modules/user'
 | 
			
		||||
import { setConfAndFields2 } from '@/utils/formCreate'
 | 
			
		||||
import type { ApiAttrs } from '@form-create/element-ui/types/config'
 | 
			
		||||
@@ -105,6 +105,8 @@ import ProcessInstanceBpmnViewer from './ProcessInstanceBpmnViewer.vue'
 | 
			
		||||
import ProcessInstanceTaskList from './ProcessInstanceTaskList.vue'
 | 
			
		||||
import { registerComponent } from '@/utils/routerHelper'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessInstanceDetail' })
 | 
			
		||||
 | 
			
		||||
const { query } = useRoute() // 查询参数
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { proxy } = getCurrentInstance() as any
 | 
			
		||||
 
 | 
			
		||||
@@ -159,11 +159,14 @@
 | 
			
		||||
    />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="BpmProcessInstance">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import { ElMessageBox } from 'element-plus'
 | 
			
		||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmProcessInstance' })
 | 
			
		||||
 | 
			
		||||
const router = useRouter() // 路由
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 
 | 
			
		||||
@@ -25,11 +25,13 @@
 | 
			
		||||
    </el-descriptions>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmTaskDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as TaskApi from '@/api/bpm/task'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmTaskDetail' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const detailLoading = ref(false) // 表单的加载中
 | 
			
		||||
const detailData = ref() // 详情数据
 | 
			
		||||
 
 | 
			
		||||
@@ -80,12 +80,14 @@
 | 
			
		||||
  <!-- 表单弹窗:详情 -->
 | 
			
		||||
  <TaskDetail ref="detailRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmTodoTask" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as TaskApi from '@/api/bpm/task'
 | 
			
		||||
import TaskDetail from './TaskDetail.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmTodoTask' })
 | 
			
		||||
 | 
			
		||||
const { push } = useRouter() // 路由
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
 
 | 
			
		||||
@@ -77,10 +77,12 @@
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" name="BpmDoneTask" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as TaskApi from '@/api/bpm/task'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmDoneTask' })
 | 
			
		||||
 | 
			
		||||
const { push } = useRouter() // 路由
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
 
 | 
			
		||||
@@ -97,7 +97,7 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="BpmTaskAssignRuleForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { defaultProps, handleTree } from '@/utils/tree'
 | 
			
		||||
import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
 | 
			
		||||
@@ -107,6 +107,8 @@ import * as PostApi from '@/api/system/post'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
import * as UserGroupApi from '@/api/bpm/userGroup'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmTaskAssignRuleForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@
 | 
			
		||||
  <!-- 添加/修改弹窗 -->
 | 
			
		||||
  <TaskAssignRuleForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="BpmTaskAssignRule">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import * as TaskAssignRuleApi from '@/api/bpm/taskAssignRule'
 | 
			
		||||
import * as RoleApi from '@/api/system/role'
 | 
			
		||||
@@ -41,6 +41,9 @@ import * as PostApi from '@/api/system/post'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
import * as UserGroupApi from '@/api/bpm/userGroup'
 | 
			
		||||
import TaskAssignRuleForm from './TaskAssignRuleForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'BpmTaskAssignRule' })
 | 
			
		||||
 | 
			
		||||
const { query } = useRoute() // 查询参数
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
 
 | 
			
		||||
@@ -40,11 +40,13 @@
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" name="ApiAccessLogDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as ApiAccessLog from '@/api/infra/apiAccessLog'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ApiAccessLogDetail' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const detailLoading = ref(false) // 表单地加载中
 | 
			
		||||
const detailData = ref() // 详情数据
 | 
			
		||||
 
 | 
			
		||||
@@ -139,12 +139,15 @@
 | 
			
		||||
  <!-- 表单弹窗:详情 -->
 | 
			
		||||
  <ApiAccessLogDetail ref="detailRef" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraApiAccessLog">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as ApiAccessLogApi from '@/api/infra/apiAccessLog'
 | 
			
		||||
import ApiAccessLogDetail from './ApiAccessLogDetail.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraApiAccessLog' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
 
 | 
			
		||||
@@ -55,11 +55,13 @@
 | 
			
		||||
    </el-descriptions>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ApiErrorLogDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as ApiErrorLog from '@/api/infra/apiErrorLog'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ApiErrorLogDetail' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const detailLoading = ref(false) // 表单的加载中
 | 
			
		||||
const detailData = ref() // 详情数据
 | 
			
		||||
 
 | 
			
		||||
@@ -158,13 +158,16 @@
 | 
			
		||||
  <ApiErrorLogDetail ref="detailRef" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="InfraApiErrorLog">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as ApiErrorLogApi from '@/api/infra/apiErrorLog'
 | 
			
		||||
import ApiErrorLogDetail from './ApiErrorLogDetail.vue'
 | 
			
		||||
import { InfraApiErrorLogProcessStatusEnum } from '@/utils/constants'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraApiErrorLog' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 列表的加载中
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraBuild">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import FcDesigner from '@form-create/designer'
 | 
			
		||||
import { useClipboard } from '@vueuse/core'
 | 
			
		||||
import { isString } from '@/utils/is'
 | 
			
		||||
@@ -39,6 +39,8 @@ import 'highlight.js/styles/github.css' // 导入代码高亮样式
 | 
			
		||||
import xml from 'highlight.js/lib/languages/java'
 | 
			
		||||
import json from 'highlight.js/lib/languages/json'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraBuild' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,11 +19,13 @@
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenEditTable" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { useTagsViewStore } from '@/store/modules/tagsView'
 | 
			
		||||
import { BasicInfoForm, ColumInfoForm, GenerateInfoForm } from './components'
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenEditTable' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { push, currentRoute } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -69,11 +69,13 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenImportTable" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
 | 
			
		||||
import { ElTable } from 'element-plus'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenImportTable' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenPreviewCode" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { useClipboard } from '@vueuse/core'
 | 
			
		||||
import { handleTree2 } from '@/utils/tree'
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
@@ -67,6 +67,8 @@ import javascript from 'highlight.js/lib/languages/javascript'
 | 
			
		||||
import sql from 'highlight.js/lib/languages/sql'
 | 
			
		||||
import typescript from 'highlight.js/lib/languages/typescript'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenPreviewCode' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,10 +40,12 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenBasicInfoForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenBasicInfoForm' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  table: {
 | 
			
		||||
    type: Object as PropType<Nullable<CodegenApi.CodegenTableVO>>,
 | 
			
		||||
 
 | 
			
		||||
@@ -112,11 +112,13 @@
 | 
			
		||||
    </el-table-column>
 | 
			
		||||
  </el-table>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenColumInfoForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
import * as DictDataApi from '@/api/system/dict/dict.type'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenColumInfoForm' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  columns: {
 | 
			
		||||
    type: Array as unknown as PropType<CodegenApi.CodegenColumnVO[]>,
 | 
			
		||||
 
 | 
			
		||||
@@ -291,13 +291,15 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegenGenerateInfoForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { handleTree } from '@/utils/tree'
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
import * as MenuApi from '@/api/system/menu'
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegenGenerateInfoForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  table: {
 | 
			
		||||
 
 | 
			
		||||
@@ -149,7 +149,7 @@
 | 
			
		||||
  <!-- 弹窗:预览代码 -->
 | 
			
		||||
  <PreviewCode ref="previewRef" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraCodegen" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as CodegenApi from '@/api/infra/codegen'
 | 
			
		||||
@@ -157,6 +157,8 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
 | 
			
		||||
import ImportTable from './ImportTable.vue'
 | 
			
		||||
import PreviewCode from './PreviewCode.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraCodegen' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const { push } = useRouter() // 路由跳转
 | 
			
		||||
 
 | 
			
		||||
@@ -40,10 +40,12 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraConfigForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getBoolDictOptions } from '@/utils/dict'
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraConfigForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -137,12 +137,15 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <ConfigForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraConfig">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
import ConfigForm from './ConfigForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraConfig' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -26,9 +26,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraDataSourceConfigForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraDataSourceConfigForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -57,10 +57,13 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <DataSourceConfigForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraDataSourceConfig">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
 | 
			
		||||
import DataSourceConfigForm from './DataSourceConfigForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraDataSourceConfig' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,12 @@
 | 
			
		||||
    <IFrame v-if="!loading" v-loading="loading" :src="src" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraDBDoc">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as DbDocApi from '@/api/infra/dbDoc'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraDBDoc' })
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 是否加载中
 | 
			
		||||
const src = ref('') // HTML 的地址
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,11 @@
 | 
			
		||||
    <IFrame v-if="!loading" :src="url" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraDruid">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraDruid' })
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 是否加载中
 | 
			
		||||
const url = ref(import.meta.env.VITE_BASE_URL + '/druid/index.html')
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,9 +30,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraFileForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { getAccessToken, getTenantId } from '@/utils/auth'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraFileForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -91,11 +91,14 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <FileForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraFile">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { fileSizeFormatter } from '@/utils'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as FileApi from '@/api/infra/file'
 | 
			
		||||
import FileForm from './FileForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraFile' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -98,10 +98,12 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraFileConfigForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
 | 
			
		||||
import * as FileConfigApi from '@/api/infra/fileConfig'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraFileConfigForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
@@ -112,7 +114,7 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
 | 
			
		||||
const formData = ref({
 | 
			
		||||
  id: undefined,
 | 
			
		||||
  name: '',
 | 
			
		||||
  storage: '',
 | 
			
		||||
  storage: 0,
 | 
			
		||||
  remark: '',
 | 
			
		||||
  config: {}
 | 
			
		||||
})
 | 
			
		||||
@@ -184,7 +186,7 @@ const resetForm = () => {
 | 
			
		||||
  formData.value = {
 | 
			
		||||
    id: undefined,
 | 
			
		||||
    name: '',
 | 
			
		||||
    storage: '',
 | 
			
		||||
    storage: 0,
 | 
			
		||||
    remark: '',
 | 
			
		||||
    config: {}
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -126,11 +126,14 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <FileConfigForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraFileConfig">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as FileConfigApi from '@/api/infra/fileConfig'
 | 
			
		||||
import FileConfigForm from './FileConfigForm.vue'
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraFileConfig' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -42,11 +42,13 @@
 | 
			
		||||
    </el-descriptions>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraJobDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as JobApi from '@/api/infra/job'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraJobDetail' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const detailLoading = ref(false) // 表单的加载中
 | 
			
		||||
const detailData = ref({}) // 详情数据
 | 
			
		||||
 
 | 
			
		||||
@@ -45,8 +45,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="JobForm">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as JobApi from '@/api/infra/job'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'JobForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,7 @@
 | 
			
		||||
  <!-- 表单弹窗:查看 -->
 | 
			
		||||
  <JobDetail ref="detailRef" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraJob">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { checkPermi } from '@/utils/permission'
 | 
			
		||||
import JobForm from './JobForm.vue'
 | 
			
		||||
@@ -155,6 +155,9 @@ import JobDetail from './JobDetail.vue'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as JobApi from '@/api/infra/job'
 | 
			
		||||
import { InfraJobStatusEnum } from '@/utils/constants'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraJob' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { push } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -31,11 +31,13 @@
 | 
			
		||||
    </el-descriptions>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="JobLogDetail" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import * as JobLogApi from '@/api/infra/jobLog'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'JobLogDetail' })
 | 
			
		||||
 | 
			
		||||
const dialogVisible = ref(false) // 弹窗的是否展示
 | 
			
		||||
const detailLoading = ref(false) // 表单的加载中
 | 
			
		||||
const detailData = ref({}) // 详情数据
 | 
			
		||||
 
 | 
			
		||||
@@ -121,12 +121,15 @@
 | 
			
		||||
  <!-- 表单弹窗:查看 -->
 | 
			
		||||
  <JobLogDetail ref="detailRef" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraJobLog">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import JobLogDetail from './JobLogDetail.vue'
 | 
			
		||||
import * as JobLogApi from '@/api/infra/jobLog'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraJobLog' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { query } = useRoute() // 查询参数
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,11 @@
 | 
			
		||||
    <IFrame v-if="!loading" v-loading="loading" :src="src" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraAdminServer">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraAdminServer' })
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 是否加载中
 | 
			
		||||
const src = ref(import.meta.env.VITE_BASE_URL + '/admin/applications')
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,11 @@
 | 
			
		||||
    <IFrame v-if="!loading" v-loading="loading" :src="src" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraSkyWalking">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraSkyWalking' })
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 是否加载中
 | 
			
		||||
const src = ref('http://skywalking.shop.iocoder.cn')
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,11 @@
 | 
			
		||||
    <IFrame :src="src" />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="InfraSwagger">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as ConfigApi from '@/api/infra/config'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraSwagger' })
 | 
			
		||||
 | 
			
		||||
const loading = ref(true) // 是否加载中
 | 
			
		||||
const src = ref(import.meta.env.VITE_BASE_URL + '/doc.html') // Knife4j UI
 | 
			
		||||
// const src = ref(import.meta.env.VITE_BASE_URL + '/swagger-ui') // Swagger UI
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div>index</div>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="TestDome"></script>
 | 
			
		||||
<script setup lang="ts"></script>
 | 
			
		||||
 
 | 
			
		||||
@@ -55,11 +55,13 @@
 | 
			
		||||
    </el-card>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="InfraWebSocket" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { formatDate } from '@/utils/formatTime'
 | 
			
		||||
import { useUserStore } from '@/store/modules/user'
 | 
			
		||||
import { useWebSocket } from '@vueuse/core'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'InfraWebSocket' })
 | 
			
		||||
 | 
			
		||||
const userStore = useUserStore()
 | 
			
		||||
 | 
			
		||||
const sendValue = ref('')
 | 
			
		||||
 
 | 
			
		||||
@@ -37,10 +37,13 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ProductBrandForm">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import * as ProductBrandApi from '@/api/mall/product/brand'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductBrandForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -108,11 +108,14 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <BrandForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ProductBrand">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as ProductBrandApi from '@/api/mall/product/brand'
 | 
			
		||||
import BrandForm from './BrandForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductBrand' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -50,10 +50,13 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ProductCategory">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import * as ProductCategoryApi from '@/api/mall/product/category'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductCategory' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -80,12 +80,15 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <CategoryForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ProductCategory">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { handleTree } from '@/utils/tree'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as ProductCategoryApi from '@/api/mall/product/category'
 | 
			
		||||
import CategoryForm from './CategoryForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductCategory' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,9 +20,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductPropertyForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductPropertyForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -99,11 +99,13 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <PropertyForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductProperty" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
import PropertyForm from './PropertyForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductProperty' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,9 +23,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductPropertyValueForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductPropertyValueForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -88,10 +88,13 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <ValueForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ProductPropertyValue">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
import ValueForm from './ValueForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductPropertyValue' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const { params } = useRoute() // 查询参数
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductSpuForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { cloneDeep } from 'lodash-es'
 | 
			
		||||
import { useTagsViewStore } from '@/store/modules/tagsView'
 | 
			
		||||
import { BasicInfoForm, DescriptionForm, OtherSettingsForm } from './components'
 | 
			
		||||
@@ -39,6 +39,8 @@ import { BasicInfoForm, DescriptionForm, OtherSettingsForm } from './components'
 | 
			
		||||
import * as ProductSpuApi from '@/api/mall/product/spu'
 | 
			
		||||
import { convertToInteger, formatToFraction } from '@/utils'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductSpuForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { push, currentRoute } = useRouter() // 路由
 | 
			
		||||
 
 | 
			
		||||
@@ -115,7 +115,7 @@
 | 
			
		||||
  </el-form>
 | 
			
		||||
  <ProductAttributesAddForm ref="attributesAddFormRef" :propertyList="propertyList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductSpuBasicInfoForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
import { copyValueToTarget } from '@/utils'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
@@ -127,6 +127,8 @@ import { ProductAttributes, ProductAttributesAddForm, SkuList } from './index'
 | 
			
		||||
import * as ProductCategoryApi from '@/api/mall/product/category'
 | 
			
		||||
import { getSimpleBrandList } from '@/api/mall/product/brand'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductSpuBasicInfoForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
 
 | 
			
		||||
@@ -6,13 +6,15 @@
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="DescriptionForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { SpuType } from '@/api/mall/product/spu'
 | 
			
		||||
import { Editor } from '@/components/Editor'
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { copyValueToTarget } from '@/utils'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'DescriptionForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  propFormData: {
 | 
			
		||||
 
 | 
			
		||||
@@ -51,12 +51,14 @@
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="OtherSettingsForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import type { SpuType } from '@/api/mall/product/spu'
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { copyValueToTarget } from '@/utils'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'OtherSettingsForm' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
 
 | 
			
		||||
@@ -40,10 +40,12 @@
 | 
			
		||||
  </el-col>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" name="ProductAttributes" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { ElInput } from 'element-plus'
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductAttributes' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const inputValue = ref('') // 输入框值
 | 
			
		||||
 
 | 
			
		||||
@@ -17,9 +17,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductPropertyForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as PropertyApi from '@/api/mall/product/property'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductPropertyForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -107,13 +107,15 @@
 | 
			
		||||
    </el-table-column>
 | 
			
		||||
  </el-table>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="SkuList" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { PropType } from 'vue'
 | 
			
		||||
import { copyValueToTarget } from '@/utils'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { UploadImg } from '@/components/UploadFile'
 | 
			
		||||
import type { Property, SkuType, SpuType } from '@/api/mall/product/spu'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'SkuList' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  propFormData: {
 | 
			
		||||
    type: Object as PropType<SpuType>,
 | 
			
		||||
 
 | 
			
		||||
@@ -197,7 +197,7 @@
 | 
			
		||||
    />
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="ProductSpu" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { TabsPaneContext } from 'element-plus'
 | 
			
		||||
import { cloneDeep } from 'lodash-es'
 | 
			
		||||
import { createImageViewer } from '@/components/ImageViewer'
 | 
			
		||||
@@ -209,6 +209,8 @@ import download from '@/utils/download'
 | 
			
		||||
import * as ProductSpuApi from '@/api/mall/product/spu'
 | 
			
		||||
import * as ProductCategoryApi from '@/api/mall/product/category'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ProductSpu' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const { currentRoute, push } = useRouter() // 路由跳转
 | 
			
		||||
 
 | 
			
		||||
@@ -38,10 +38,13 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="ExpressForm">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { CommonStatusEnum } from '@/utils/constants'
 | 
			
		||||
import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ExpressForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -99,12 +99,15 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <ExpressForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="Express">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import download from '@/utils/download'
 | 
			
		||||
import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
 | 
			
		||||
import ExpressForm from './ExpressForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'Express' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const total = ref(0) // 列表的总页数
 | 
			
		||||
 
 | 
			
		||||
@@ -92,12 +92,14 @@
 | 
			
		||||
  <!-- 表单弹窗:添加/修改 -->
 | 
			
		||||
  <ExpressTemplateForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="DeliveryExpressTemplate">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
import * as DeliveryExpressTemplateApi from '@/api/mall/trade/delivery/expressTemplate'
 | 
			
		||||
import ExpressTemplateForm from './ExpressTemplateForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'DeliveryExpressTemplate' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const total = ref(0) // 列表的总页数
 | 
			
		||||
 
 | 
			
		||||
@@ -68,9 +68,11 @@
 | 
			
		||||
    </template>
 | 
			
		||||
  </Dialog>
 | 
			
		||||
</template>
 | 
			
		||||
<script lang="ts" name="MpAccountForm" setup>
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as AccountApi from '@/api/mp/account'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'MpAccountForm' })
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -100,9 +100,12 @@
 | 
			
		||||
  <!-- 对话框(添加 / 修改) -->
 | 
			
		||||
  <AccountForm ref="formRef" @success="getList" />
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="MpAccount">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import * as AccountApi from '@/api/mp/account'
 | 
			
		||||
import AccountForm from './AccountForm.vue'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'MpAccount' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息弹窗
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -32,12 +32,14 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="ReplyForm">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import WxReplySelect, { type Reply } from '@/views/mp/components/wx-reply'
 | 
			
		||||
import type { FormInstance } from 'element-plus'
 | 
			
		||||
import { MsgType } from './types'
 | 
			
		||||
import { DICT_TYPE, getDictOptions, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ReplyForm' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
  modelValue: any
 | 
			
		||||
  reply: Reply
 | 
			
		||||
 
 | 
			
		||||
@@ -67,7 +67,7 @@
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
  </ContentWrap>
 | 
			
		||||
</template>
 | 
			
		||||
<script setup lang="ts" name="MpAutoReply">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import ReplyForm from '@/views/mp/autoReply/components/ReplyForm.vue'
 | 
			
		||||
import { type Reply, ReplyType } from '@/views/mp/components/wx-reply'
 | 
			
		||||
import WxAccountSelect from '@/views/mp/components/wx-account-select'
 | 
			
		||||
@@ -76,6 +76,9 @@ import { ContentWrap } from '@/components/ContentWrap'
 | 
			
		||||
import type { TabPaneName } from 'element-plus'
 | 
			
		||||
import ReplyTable from './components/ReplyTable.vue'
 | 
			
		||||
import { MsgType } from './components/types'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'MpAutoReply' })
 | 
			
		||||
 | 
			
		||||
const message = useMessage() // 消息
 | 
			
		||||
 | 
			
		||||
const accountId = ref(-1) // 公众号ID
 | 
			
		||||
 
 | 
			
		||||
@@ -4,9 +4,11 @@
 | 
			
		||||
  </el-select>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup name="WxAccountSelect">
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import * as MpAccountApi from '@/api/mp/account'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'WxAccountSelect' })
 | 
			
		||||
 | 
			
		||||
const account: MpAccountApi.AccountVO = reactive({
 | 
			
		||||
  id: -1,
 | 
			
		||||
  name: ''
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,9 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="WxLocation">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
defineOptions({ name: 'WxLocation' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps({
 | 
			
		||||
  locationX: {
 | 
			
		||||
    required: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -131,7 +131,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup name="WxMaterialSelect">
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import WxNews from '@/views/mp/components/wx-news'
 | 
			
		||||
import WxVoicePlayer from '@/views/mp/components/wx-voice-play'
 | 
			
		||||
import WxVideoPlayer from '@/views/mp/components/wx-video-play'
 | 
			
		||||
@@ -141,6 +141,8 @@ import * as MpFreePublishApi from '@/api/mp/freePublish'
 | 
			
		||||
import * as MpDraftApi from '@/api/mp/draft'
 | 
			
		||||
import { dateFormatter } from '@/utils/formatTime'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'WxMaterialSelect' })
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
    type: string
 | 
			
		||||
 
 | 
			
		||||
@@ -48,7 +48,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts" name="Msg">
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import WxVideoPlayer from '@/views/mp/components/wx-video-play'
 | 
			
		||||
import WxVoicePlayer from '@/views/mp/components/wx-voice-play'
 | 
			
		||||
import WxNews from '@/views/mp/components/wx-news'
 | 
			
		||||
@@ -57,6 +57,8 @@ import WxMusic from '@/views/mp/components/wx-music'
 | 
			
		||||
import MsgEvent from './MsgEvent.vue'
 | 
			
		||||
import { MsgType } from '../types'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'Msg' })
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
  item: any
 | 
			
		||||
}>()
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user