Commit 86c5f3f0 authored by rockyl's avatar rockyl

发布增加publishType和remarks字段

parent 457bb750
......@@ -224,6 +224,8 @@
env,
isProd: true,
qas: [this.qa],
publishType: 3,
remarks: '项目迭代',
};
//const {ret} = await saveSkin(data);
const {ret} = await saveSkin(params);
......
......@@ -11,7 +11,7 @@
<el-select class="env-select" size="mini" v-model="env" @change="changeEnv">
<el-option v-for="(item, key) in pxEnvs" :key="key" :label="item" :value="key"></el-option>
</el-select>
<span class="px-project-name">{{pxProjectName}}</span>
<span class="px-project-name">{{ pxProjectName }}</span>
<span v-if="env==='prod'&&isProd">
<span style="padding-left:10px;">QA人员:</span>
<el-select class="env-select" size="mini" v-model="qa" placeholder="请选择QA人员" @change="changeQA">
......@@ -29,7 +29,7 @@
:label="$t('Type')"
width="100">
<template slot-scope="scope">
<span>{{tplTypes[scope.row.type - 1]}}</span>
<span>{{ tplTypes[scope.row.type - 1] }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -42,13 +42,13 @@
size="mini" plain
type="primary"
@click="editItem(scope.row)"
>{{$t('Edit')}}
>{{ $t('Edit') }}
</el-button>
<el-button
size="mini" plain
type="success"
@click="copyUrl(scope.row)"
>{{$t('Copy url')}}
>{{ $t('Copy url') }}
</el-button>
<el-popconfirm :title="$t('Are you sure to delete this item?')"
@onConfirm="deleteItem(scope.row)"
......@@ -57,7 +57,7 @@
slot="reference"
size="mini" plain
type="danger"
>{{$t('Delete')}}
>{{ $t('Delete') }}
</el-button>
</el-popconfirm>
</div>
......@@ -67,9 +67,9 @@
<div slot="footer" class="dialog-footer">
<div>
<el-dropdown trigger="click" @command="onAdd" placement="top" size="small">
<el-button size="mini" icon="el-icon-plus" type="primary">{{$t('Add')}}</el-button>
<el-button size="mini" icon="el-icon-plus" type="primary">{{ $t('Add') }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(type, index) of tplTypes" :command="index" :key="index">{{type}}
<el-dropdown-item v-for="(type, index) of tplTypes" :command="index" :key="index">{{ type }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -77,7 +77,7 @@
<px-config-popover @save="onSavePxConfig"/>
</div>
<div>
<el-button size="mini" @click="onClose">{{$t('Close')}}</el-button>
<el-button size="mini" @click="onClose">{{ $t('Close') }}</el-button>
</div>
</div>
<px-skin-editor ref="pxSkinEditor" @input="onSaveSkin"/>
......@@ -85,17 +85,17 @@
</template>
<script>
import {mapGetters, mapMutations, mapActions} from 'vuex'
import EnabledSetter from "../components/EnabledSetter";
import MonacoEditor from "vue-monaco";
import PxConfigPopover from "../components/PxConfigPopover";
import {getSkins, saveSkin,} from "../../../api/polaris";
import {playWaiting, pxHostMapping} from "../../../utils";
import copy from "copy-to-clipboard";
import PxSkinEditor from "./PxSkinEditor";
import {getDevPersons} from "../../../api/editor";
import {mapGetters, mapMutations, mapActions} from 'vuex'
import EnabledSetter from "../components/EnabledSetter";
import MonacoEditor from "vue-monaco";
import PxConfigPopover from "../components/PxConfigPopover";
import {getSkins, saveSkin,} from "../../../api/polaris";
import {playWaiting, pxHostMapping} from "../../../utils";
import copy from "copy-to-clipboard";
import PxSkinEditor from "./PxSkinEditor";
import {getDevPersons} from "../../../api/editor";
export default {
export default {
name: "PxSkinEditorDialog",
components: {PxSkinEditor, PxConfigPopover, MonacoEditor, EnabledSetter},
data() {
......@@ -106,9 +106,9 @@
pxProjectName: '',
skins: [],
env: 'dev',
QAList:[],
qa:null,
isProd:null
QAList: [],
qa: null,
isProd: null
}
},
computed: {
......@@ -146,7 +146,7 @@
type: "success"
});
},
changeQA(pid){
changeQA(pid) {
console.log(this.qa)
},
deleteItem(skin) {
......@@ -159,7 +159,7 @@
async onSaveSkin(skin, operate) {
try {
await this.saveSkin(skin, operate);
let oldSkin = this.skins.find(s=>s.id === skin.id);
let oldSkin = this.skins.find(s => s.id === skin.id);
oldSkin.name = skin.name;
oldSkin.html = skin.html;
this.$refs.pxSkinEditor.onSaveSuccess();
......@@ -179,12 +179,12 @@
const {pxEnv} = this.options;
const pxPid = this.pxPid = pxEnv[env];
this.QAList=await getDevPersons()
this.QAList=this.QAList.filter((item)=>{
return item.level==1
this.QAList = await getDevPersons()
this.QAList = this.QAList.filter((item) => {
return item.level == 1
})
console.log(this.qa)
this.qa=this.QAList[0].pid
this.qa = this.QAList[0].pid
if (!pxPid) {
this.$message({
......@@ -195,14 +195,14 @@
}
try {
const data = await getSkins(pxPid, env);
this.isProd=data.isProd
this.isProd = data.isProd
this.pxProjectName = data.name;
this.skins = data.skins;
} catch (e) {
this.invalidTicketNotice();
}
},
async invalidTicketNotice(){
async invalidTicketNotice() {
const {env} = this;
this.pxProjectName = '';
this.skins = [];
......@@ -228,6 +228,8 @@
env,
isProd: true,
qas: [this.qa],
publishType: 3,
remarks: '项目迭代',
};
const {ret} = await playWaiting(saveSkin(params), this.$t('In processing'));
if (ret.success !== false) {
......@@ -250,7 +252,7 @@
'setMockServeEnabled',
]),
}
}
}
</script>
<style scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment