| | |
| | | <Icon icon="ep:link"/> |
| | | 查看关联模型 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="publish(scope.row.id,scope.row.version)" |
| | | > |
| | | <Icon icon="ep:upload"/> |
| | | 发布 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | <!-- 分页 --> |
| | | <Pagination |
| | | :total="total" |
| | | v-model:page="queryParams.pageNo" |
| | | v-model:limit="queryParams.pageSize" |
| | | v-model:page="queryParams.page" |
| | | v-model:limit="queryParams.limit" |
| | | @pagination="getList" |
| | | /> |
| | | </ContentWrap> |
| | |
| | | import * as ProjectApi from '@/api/model/mpk/project' |
| | | import {dateFormatter} from '@/utils/formatTime' |
| | | import PackageModel from './ProjectPackageModelDialog.vue' |
| | | import * as MpkApi from "@/api/model/mpk/mpk"; |
| | | |
| | | defineOptions({name: 'ProjectPackageHistory'}) |
| | | |
| | |
| | | const total = ref(0) // 列表的总页数 |
| | | const list = ref([]) // 列表的数据 |
| | | const queryParams = reactive({ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | | page: 1, |
| | | limit: 10, |
| | | projectId: route.params.projectId, |
| | | startTime: undefined, |
| | | endTime: undefined, |
| | |
| | | } |
| | | } |
| | | |
| | | watch(() => queryParams.projectId, (newVal, oldVal) => { |
| | | handleQuery() |
| | | }) |
| | | |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | queryParams.pageNo = 1 |
| | | queryParams.page = 1 |
| | | getList() |
| | | } |
| | | |
| | |
| | | packageModelRef.value.open('package',id) |
| | | } |
| | | |
| | | // 发布 |
| | | const publish = async (historyId,version) => { |
| | | // 发布的二次确认 |
| | | await message.confirm('确认发布 ' + projectList.value.find(e => e.id === queryParams.projectId).projectName + '【' + version + '】') |
| | | |
| | | // 发布 |
| | | await MpkApi.publish({historyId,projectId: queryParams.projectId}) |
| | | |
| | | message.success('发布成功'); |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(async () => { |
| | | await getList() |