123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <template>
- <div class="app-manage">
- <div class="part-box part-box-filter part-box-flex">
- <el-form ref="FilterForm" label-position="left" label-width="80px" inline>
- <el-form-item label="模糊查询">
- <el-input
- v-model="filter.nameStartWith"
- placeholder="名称前缀"
- ></el-input>
- </el-form-item>
- <el-form-item label="编码">
- <el-input v-model="filter.code" placeholder="编码"></el-input>
- </el-form-item>
- <el-form-item label-width="0px">
- <el-button type="primary" icon="ios-search" @click="toPage(1)"
- >查询</el-button
- >
- <el-button
- v-if="checkPrivilege('APP_INSERT')"
- type="success"
- icon="md-add"
- @click="toAdd"
- >新增</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- <div class="part-box part-box-pad">
- <el-table ref="TableList" :data="dataList">
- <el-table-column prop="id" label="ID" width="80"></el-table-column>
- <el-table-column prop="name" label="名称"> </el-table-column>
- <el-table-column prop="code" label="编码"> </el-table-column>
- <el-table-column prop="masterVersionName" label="主干版本" width="120">
- </el-table-column>
- <el-table-column
- v-if="checkPrivilege('APP_EDIT')"
- label="操作"
- width="80"
- class-name="action-column"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toEdit(scope.row)"
- >编辑</el-button
- >
- </template>
- </el-table-column>
- <el-table-column label="管理" width="360" class-name="action-column">
- <template slot-scope="scope">
- <!-- <el-button
- class="btn-primary"
- type="text"
- @click="toEditUser(scope.row)"
- >用户</el-button
- > -->
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditDeploy(scope.row)"
- >部署</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditModule(scope.row)"
- >模块</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditVersion(scope.row)"
- >版本</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditEnv(scope.row)"
- >环境</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditConfig(scope.row)"
- >程序配置</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toEditConfigNginx(scope.row)"
- >nginx配置</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="part-page">
- <el-pagination
- background
- layout="total,prev, pager, next"
- :current-page="current"
- :total="total"
- :page-size="size"
- @current-change="toPage"
- >
- </el-pagination>
- </div>
- </div>
- <!-- modify-app -->
- <modify-app
- v-if="checkPrivilege('APP_INSERT') || checkPrivilege('APP_EDIT')"
- ref="ModifyApp"
- :instance="curRow"
- @modified="getList"
- >
- </modify-app>
- <!-- AppUserManage -->
- <app-user-manage ref="AppUserManage" :app="curRow"></app-user-manage>
- <!-- AppDeployManage -->
- <app-deploy-manage ref="AppDeployManage" :app="curRow"></app-deploy-manage>
- <!-- AppModuleManage -->
- <app-module-manage ref="AppModuleManage" :app="curRow"></app-module-manage>
- <!-- AppVersionManage -->
- <app-version-manage
- ref="AppVersionManage"
- :app="curRow"
- @master-change="getList"
- ></app-version-manage>
- <!-- AppEnvManage -->
- <app-env-manage ref="AppEnvManage" :app="curRow"></app-env-manage>
- <!-- AppConfigManage -->
- <app-config-manage ref="AppConfigManage" :app="curRow"></app-config-manage>
- <!-- AppNginxManage -->
- <app-nginx-manage ref="AppNginxManage" :app="curRow"></app-nginx-manage>
- </div>
- </template>
- <script>
- import { appQuery } from "../api";
- import ModifyApp from "./ModifyApp";
- import AppUserManage from "../app-user/AppUserManage.vue";
- import AppDeployManage from "../app-deploy/AppDeployManage.vue";
- import AppModuleManage from "../app-module/AppModuleManage.vue";
- import AppVersionManage from "../app-version/AppVersionManage.vue";
- import AppEnvManage from "../app-version/AppVersionManage.vue";
- import AppConfigManage from "../app-config/AppConfigManage.vue";
- import AppNginxManage from "../app-nginx/AppNginxManage.vue";
- export default {
- name: "app-manage",
- components: {
- ModifyApp,
- AppUserManage,
- AppDeployManage,
- AppModuleManage,
- AppVersionManage,
- AppEnvManage,
- AppConfigManage,
- AppNginxManage,
- },
- data() {
- return {
- filter: {
- nameStartWith: "",
- code: "",
- },
- current: 1,
- size: this.GLOBAL.pageSize,
- total: 0,
- dataList: [],
- curRow: {},
- loading: false,
- };
- },
- created() {
- this.initData();
- },
- methods: {
- initData() {
- this.toPage(1);
- },
- async getList() {
- const datas = {
- ...this.filter,
- pageNumber: this.current,
- pageSize: this.size,
- };
- const data = await appQuery(datas);
- this.dataList = data.records;
- this.total = data.total;
- },
- toPage(page) {
- this.current = page;
- this.getList();
- },
- toAdd() {
- this.curRow = {};
- this.$refs.ModifyApp.open();
- },
- toEdit(row) {
- this.curRow = row;
- this.$refs.ModifyApp.open();
- },
- toEditUser(row) {
- this.curRow = row;
- this.$refs.AppUserManage.open();
- },
- toEditDeploy(row) {
- this.curRow = row;
- this.$refs.AppDeployManage.open();
- },
- toEditModule(row) {
- this.curRow = row;
- this.$refs.AppModuleManage.open();
- },
- toEditVersion(row) {
- this.curRow = row;
- this.$refs.AppVersionManage.open();
- },
- toEditEnv(row) {
- this.curRow = row;
- this.$refs.AppEnvManage.open();
- },
- toEditConfig(row) {
- this.curRow = row;
- this.$refs.AppConfigManage.open();
- },
- toEditConfigNginx(row) {
- this.curRow = row;
- this.$refs.AppNginxManage.open();
- },
- },
- };
- </script>
|