Merge remote-tracking branch 'origin/test' into test
| | |
| | | </div> |
| | | <div class="item"> |
| | | <div class="itemchild">关联算法:</div> |
| | | <TaskAlgorithmBusiness :setWidth="186 +'px'" :showAlgorithm="true" @algorithmChange="algorithmChange" /> |
| | | <TaskAlgorithmBusiness :setWidth="186" :showAlgorithm="true" @algorithmChange="algorithmChange" /> |
| | | </div> |
| | | </div> |
| | | <div class="search-btn"> |
| | |
| | | |
| | | <script setup> |
| | | import { getMultipleDictionary } from '@/api/job/task' |
| | | import { pxToRem } from '@/utils/rem' |
| | | import { pxToRem } from '@/utils/rem'; |
| | | |
| | | // 接收父组件传参 |
| | | const props = defineProps({ |
| | |
| | | <el-table-column prop="creator_name" label="创建人" align="center" show-overflow-tooltip /> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <div v-if="scope.row.status === 2" class="btnItem turnBack" link type="primary" |
| | | @click="turnBack(scope.row)"> |
| | | <div |
| | | v-if="scope.row.status === 2" |
| | | class="btnItem" |
| | | link |
| | | type="primary" |
| | | @click="turnBack(scope.row)" |
| | | > |
| | | 返航 |
| | | </div> |
| | | <div v-if="scope.row.status === 1" class="btnItem cancelTask" link type="primary" |
| | | @click="cancelTask(scope.row)"> |
| | | <div |
| | | v-if="scope.row.status === 1" |
| | | class="btnItem" |
| | | link |
| | | type="primary" |
| | | @click="cancelTask(scope.row)" |
| | | > |
| | | 取消任务 |
| | | </div> |
| | | <div class="btnItem" link type="primary" @click="handleDetail(scope.row)">查看</div> |
| | |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination class="ztzf-pagination" popper-class="custom-pagination-dropdown" |
| | | v-model:current-page="jobListParams.current" v-model:page-size="jobListParams.size" |
| | | :page-sizes="[10, 20, 30, 40]" layout="prev, pager, next, sizes, jumper" :total="total" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange" /> |
| | | <el-pagination |
| | | class="ztzf-pagination" |
| | | popper-class="custom-pagination-dropdown" |
| | | background |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :size="size" |
| | | v-model:current-page="jobListParams.current" |
| | | v-model:page-size="jobListParams.size" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <!-- 添加任务 --> |
| | |
| | | |
| | | :deep(.el-pagination) { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | justify-content: right; |
| | | } |
| | | |
| | | :deep(.el-pagination button) { |
| | |
| | | <!-- filepath: /d:/work/drone-web-manage/src/views/license/upload.vue --> |
| | | <template> |
| | | <basic-container> |
| | | <!-- <basic-container> |
| | | <el-upload |
| | | class="upload-demo" |
| | | drag |
| | |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip">仅支持扩展名:lic</div> |
| | | </el-upload> |
| | | </basic-container> |
| | | </basic-container> --> |
| | | <!-- 密钥上传 --> |
| | | <div class="upload-file"> |
| | | <img v-if="isSuccess === 'success'" :src="uploadSuccess" alt="" /> |
| | | <div v-if="isSuccess === 'success'">上传成功</div> |
| | | <img v-if="isSuccess === 'error'" :src="uploadError" alt="" /> |
| | | <div v-if="isSuccess === 'error'">上传失败</div> |
| | | <el-upload |
| | | action="/upload" |
| | | accept=".lic" |
| | | :show-file-list="false" |
| | | :before-upload="handleUpload" |
| | | > |
| | | <div class="upload-btn">密钥上传</div> |
| | | </el-upload> |
| | | <div class="password-time">密钥有效期:{{ passwordTime || '永久有效' }}</div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { uploadLicense } from '@/api/license/uploadLicense'; |
| | | import { findLicenseDate } from '@/api/system/dict'; |
| | | import uploadSuccess from '@/assets/images/uoload-success.png'; |
| | | import uploadError from '@/assets/images/upload-error.png'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | isSuccess: '', // 上传状态 |
| | | passwordTime: '', // 密钥有效期 |
| | | uploadSuccess, // 上传成功图片 |
| | | uploadError, // 上传失败图片 |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getFindLicenseDate(); |
| | | }, |
| | | methods: { |
| | | async customUpload({ file }) { |
| | | try { |
| | | const response = await uploadLicense(file); |
| | | if (response.data.success) { |
| | | this.$message.success('文件上传成功'); |
| | | } else { |
| | | this.$message.error(response.data.message || '文件上传失败'); |
| | | } |
| | | } catch (error) { |
| | | console.error('上传失败:', error); |
| | | this.$message.error('文件上传失败'); |
| | | } |
| | | handleUpload(file) { |
| | | uploadLicense(file) |
| | | .then(res => { |
| | | console.log(res.data.code,'444') |
| | | if (res.data.code !== 200) return this.$message.error('上传失败'); |
| | | this.$message.success('上传成功'); |
| | | this.isSuccess = 'success'; |
| | | this.getFindLicenseDate(); |
| | | }) |
| | | .catch(err => { |
| | | this.isSuccess = 'error'; |
| | | this.$message.error('上传失败'); |
| | | }); |
| | | }, |
| | | getFindLicenseDate() { |
| | | findLicenseDate() |
| | | .then(res => { |
| | | if (res.data.code !== 0) return this.$message.error('上传失败'); |
| | | this.passwordTime = res.data.data; |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error('获取失败失败'); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .upload-demo { |
| | | width: 100%; |
| | | border: 2px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | background-color: #fafafa; |
| | | <style scoped lang="scss"> |
| | | .upload-file { |
| | | text-align: center; |
| | | margin-top: 60px; |
| | | .upload-btn { |
| | | width: 93px; |
| | | height: 38px; |
| | | background: #DDEBFF; |
| | | border-radius: 8px 8px 8px 8px; |
| | | border: 1px solid #409EFF; |
| | | text-align: center; |
| | | padding: 40px 20px; |
| | | } |
| | | .el-upload__text { |
| | | font-size: 16px; |
| | | color: #606266; |
| | | } |
| | | .el-upload__tip { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | color: #228CFA; |
| | | line-height: 38px; |
| | | text-align: center; |
| | | margin-top: 10px; |
| | | } |
| | | .password-time { |
| | | margin-top: 50px; |
| | | width: 100%; |
| | | height: 16px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #2d9dff; |
| | | line-height: 16px; |
| | | // text-align: left; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-button @click="reset">重置</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 密钥上传 --> |
| | | <div class="upload-file" v-else-if="checked === 2"> |
| | | <img v-if="isSuccess === 'success'" :src="uploadSuccess" alt="" /> |
| | | <div v-if="isSuccess === 'success'">上传成功</div> |
| | | <img v-if="isSuccess === 'error'" :src="uploadError" alt="" /> |
| | | <div v-if="isSuccess === 'error'">上传失败</div> |
| | | <el-upload |
| | | action="/upload" |
| | | accept=".lic" |
| | | :show-file-list="false" |
| | | :before-upload="handleUpload" |
| | | > |
| | | <div class="upload-btn">密钥上传</div> |
| | | </el-upload> |
| | | <div class="password-time">密钥有效期:{{ passwordTime || '永久有效' }}</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import request from '@/axios'; |
| | | import { getUserInfo, updateInfo, updatePassword } from '@/api/system/user'; |
| | | import { findLicenseDate } from '@/api/system/dict'; |
| | | import { uploadLicense } from '@/api/license/uploadLicense'; |
| | | import uploadSuccess from '@/assets/images/uoload-success.png'; |
| | | import uploadError from '@/assets/images/upload-error.png'; |
| | | import cancel1 from '@/assets/images/task/cancel1.png'; |
| | |
| | | const token = getToken(); |
| | | const userinforShow = defineModel('show'); |
| | | const userInfoAs = computed(() => store.state.user.userInfo); |
| | | const titleList = ref(['个人信息', '修改密码', '密钥上传']); |
| | | const titleList = ref(['个人信息', '修改密码']); |
| | | const checked = ref(0); |
| | | const uploadUrl = computed( |
| | | () => `${import.meta.env.VITE_APP_API_URL}/blade-resource/oss/endpoint/put-file` |
| | |
| | | |
| | | const titleClick = (item, index) => { |
| | | checked.value = index; |
| | | if (index === 2) { |
| | | getFindLicenseDate(); |
| | | } |
| | | }; |
| | | const getUserInfoData = () => { |
| | | getUserInfo().then(res => { |
| | |
| | | }; |
| | | const isSuccess = ref(''); |
| | | const passwordTime = ref(''); |
| | | const handleUpload = file => { |
| | | const formData = new FormData(); |
| | | formData.append('file', file); |
| | | uploadLicense(formData) |
| | | .then(res => { |
| | | if (res.data.code !== 200) return ElMessage.error('上传失败'); |
| | | ElMessage.success('上传成功'); |
| | | isSuccess.value = 'success'; |
| | | getFindLicenseDate(); |
| | | }) |
| | | .catch(err => { |
| | | isSuccess.value = 'error'; |
| | | ElMessage.error('上传失败'); |
| | | }); |
| | | }; |
| | | const getFindLicenseDate = () => { |
| | | findLicenseDate() |
| | | .then(res => { |
| | |
| | | .passwordBox { |
| | | margin-top: 40px; |
| | | } |
| | | .upload-file { |
| | | text-align: center; |
| | | margin-top: 60px; |
| | | .upload-btn { |
| | | width: 93px; |
| | | height: 38px; |
| | | background: #DDEBFF; |
| | | border-radius: 8px 8px 8px 8px; |
| | | border: 1px solid #409EFF; |
| | | text-align: center; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | color: #228CFA; |
| | | line-height: 38px; |
| | | text-align: center; |
| | | margin-top: 10px; |
| | | } |
| | | .password-time { |
| | | margin-top: 50px; |
| | | width: 100%; |
| | | height: 16px; |
| | | font-family: Source Han Sans CN, Source Han Sans CN; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #2d9dff; |
| | | line-height: 16px; |
| | | // text-align: left; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="附件图片" prop="photos" required class="upload-wrapper"> |
| | | <el-upload ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | <el-upload v-if="createoredit === 1" ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="form.photos" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | <!-- <i class="el-icon-plus">+</i> --> |
| | | <div class="el-icon-plus"> |
| | | <span>+</span> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <el-upload v-else ref="upload" :action="'#'" :auto-upload="false" list-type="picture-card" |
| | | :on-change="handleFileChange" :on-remove="handleUploadRemove" :before-upload="beforeUpload" |
| | | :file-list="popupShowImage(form.photos)" :limit="1" accept="image/*" class="create-upload"> |
| | | <template v-if="form.photos.length < 1"> |
| | | |
| | | <div class="el-icon-plus"> |
| | | <span>+</span> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getSmallImg,getShowImg } from '@/utils/util'; |
| | | import { ElMessageBox, ElLoading } from 'element-plus' |
| | | import { calculateDefaultRange } from '@/utils/util' |
| | | import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation' |
| | |
| | | } from '@/api/tickets/ticket' |
| | | import { export_json_to_excel } from '@/utils/exportExcel' |
| | | import geoJson from '@/assets/geoJson.json' |
| | | |
| | | import { mapGetters } from 'vuex' |
| | | import { getAdcodeObj } from '@/utils/disposeData' |
| | | function regExp (label, name) { |
| | |
| | | dispatchLoading: false, |
| | | completeLoading: false, |
| | | finalizeLoading: false, |
| | | createoredit:'', |
| | | activeTab: 'all', |
| | | // tabs 只保留静态结构,不做权限判断 |
| | | tabs: [ |
| | |
| | | return '/' |
| | | } |
| | | }, |
| | | |
| | | popupShowImage () { |
| | | return (list) => { |
| | | |
| | | return list.map(item => ({ |
| | | ...item, |
| | | url: getShowImg(item.url) |
| | | })) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | }, |
| | | |
| | | handleAdd () { |
| | | |
| | | this.createoredit =1 |
| | | this.dialogVisible = true |
| | | this.mapParams.center = null |
| | | this.form.location = [] |
| | |
| | | }, |
| | | |
| | | async handleViewDetail (row) { |
| | | |
| | | // 找到当前行在tableData中的索引 |
| | | this.currentIndex = this.tableData.findIndex(item => item.id === row.id) |
| | | // 先设置workType,直接从row读取 |
| | |
| | | |
| | | // 添加编辑方法 |
| | | handleEdit (row) { |
| | | this.createoredit = 2 |
| | | console.log('编辑原始数据:', row) |
| | | |
| | | // 尝试从row.dept_id或通过部门名称查找对应的部门ID |
| | |
| | | address: row.address || '', |
| | | content: row.content, |
| | | photos: [], |
| | | |
| | | } |
| | | |
| | | let curLocation = [] |