Merge remote-tracking branch 'origin/master'
| | |
| | | import { computed, ref, watch } from 'vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { alarmLogApi, areaDivideListApi } from '@/api/dataCockpit' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { getDictLabel,dateRangeFormat } from '@ztzf/utils' |
| | | |
| | | const props = defineProps({ |
| | | modelValue: { |
| | |
| | | total.value = 0 |
| | | return |
| | | } |
| | | const [startTime, endTime] = searchParams.value.dateRange || [] |
| | | const [startTime, endTime] = dateRangeFormat(searchParams.value.dateRange) || [] |
| | | const keyword = (searchParams.value.keyword || '').trim() |
| | | const params = { |
| | | alarmType: '2', |
| | |
| | | async function getList() { |
| | | loading.value = true |
| | | try { |
| | | const params = { ...searchParams.value, startTime: dateRange.value[0], endTime: dateRange.value[1] } |
| | | const range = dateRangeFormat(dateRange.value) |
| | | const params = { ...searchParams.value, startTime: range[0], endTime: range[1] } |
| | | const res = await getOperationLogPage(params) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="排序" prop="sort"> |
| | | <el-input-number class="command-input" v-model="formData.sort" :min="0" :controls="false" placeholder="请输入" /> |
| | | <el-input-number class="command-input" v-model="formData.sort" :min="0" :max="999" :controls="false" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | deptCategory: fieldRules(true), |
| | | deptNature: fieldRules(true), |
| | | areaCode: fieldRules(true), |
| | | sort: fieldRules(true), |
| | | // sort: fieldRules(true), |
| | | } |
| | | |
| | | function normalizeAreaCode(value) { |
| | |
| | | ...formData.value, |
| | | areaCode: normalizeAreaCode(formData.value.areaCode), |
| | | } |
| | | payload.sort = Number(payload.sort || 0) |
| | | if (dialogMode.value === 'edit') { |
| | | await update(payload) |
| | | } else { |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="角色排序" prop="sort"> |
| | | <el-input-number class="command-input" v-model="formData.sort" :min="0" :controls="false" placeholder="请输入" /> |
| | | <el-input-number class="command-input" v-model="formData.sort" :min="0" :max="999" :controls="false" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | roleName: fieldRules(true, 50), |
| | | roleAlias: fieldRules(true, 50), |
| | | parentId: fieldRules(false), |
| | | sort: fieldRules(true), |
| | | // sort: fieldRules(true), |
| | | } |
| | | |
| | | function handleCancel() { |
| | |
| | | if (!isValid) return |
| | | submitting.value = true |
| | | try { |
| | | formData.value.sort = Number(formData.value.sort || 0) |
| | | if (dialogMode.value === 'edit') { |
| | | await update(formData.value) |
| | | saveOperationLog({ |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="任务发起人" prop=""> |
| | | <el-form-item label="任务发起人" prop="taskInitiatorId"> |
| | | <el-select |
| | | class="gd-select gray" |
| | | popper-class="gd-select-popper" |
| | |
| | | <view class="container"> |
| | | <view class="pageBg"></view> |
| | | <div class="avatarBox"> |
| | | <u-avatar @click="uploadAvatar" :src="userInfo.avatar ? userInfo.avatar : showDefaultHeader" size="114" mode="aspectFill" /> |
| | | <u-avatar :src="userInfo.avatar ? userInfo.avatar : showDefaultHeader" size="114" mode="aspectFill" /> |
| | | <!-- <u-avatar @click="uploadAvatar" :src="userInfo.avatar ? userInfo.avatar : showDefaultHeader" size="114" mode="aspectFill" />--> |
| | | </div> |
| | | <view class="detailBox"> |
| | | <div class="detailCon"> |
| | |
| | | // 提交文件 |
| | | function afterReadFile(event) { |
| | | console.log('上传的文件:', event); |
| | | |
| | | |
| | | // 准备上传参数 |
| | | const uploadParams = { |
| | | name: event.name, // 服务器端接收文件的字段名 |
| | | file: event.file, // 传入文件对象 |
| | | filePath: event.filePath, // 文件路径 |
| | | }; |
| | | |
| | | |
| | | // 调用上传文件接口 |
| | | uploadFileApi(uploadParams).then(res => { |
| | | uni.hideLoading(); |
| | | |
| | | |
| | | console.log('上传成功结果:', res); |
| | | |
| | | |
| | | // 根据接口返回的数据结构处理结果 |
| | | if (res.data && res.data.code === 200) { |
| | | const uploadResult = res.data.data; |
| | | userInfo.value.avatar = uploadResult.fileUrl || '文件上传成功'; |
| | | |
| | | |
| | | uni.showToast({ |
| | | title: '上传成功', |
| | | icon: 'success' |
| | |
| | | const pathWithoutProtocol = filePath.replace(/^file:\/\//, ''); |
| | | fileName = pathWithoutProtocol.split('/').pop() || 'unknown.png'; |
| | | } |
| | | |
| | | |
| | | // 显示加载中 |
| | | uni.showLoading({ |
| | | title: '上传中...' |
| | |
| | | } |
| | | |
| | | }); |
| | | |
| | | |
| | | }; |
| | | onShow(async () => { |
| | | getUserInfoData() |
| | |
| | | |
| | | .custom-style { |
| | | width: 276rpx; |
| | | height: 76rpx; |
| | | height: 76rpx; |
| | | } |
| | | :deep(.u-button.data-v-461e713c){ |
| | | width: 276rpx !important; |
| | |
| | | color: #1D6FE9; |
| | | margin-top: 40rpx; |
| | | } |
| | | </style> |
| | | </style> |