Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-editor
Commits
86c5f3f0
Commit
86c5f3f0
authored
Aug 11, 2021
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布增加publishType和remarks字段
parent
457bb750
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
165 deletions
+169
-165
PublishView.vue
src/views/Editor/dialogs/PublishView.vue
+2
-0
PxSkinEditorDialog.vue
src/views/Editor/dialogs/PxSkinEditorDialog.vue
+167
-165
No files found.
src/views/Editor/dialogs/PublishView.vue
View file @
86c5f3f0
...
@@ -224,6 +224,8 @@
...
@@ -224,6 +224,8 @@
env
,
env
,
isProd
:
true
,
isProd
:
true
,
qas
:
[
this
.
qa
],
qas
:
[
this
.
qa
],
publishType
:
3
,
remarks
:
'项目迭代'
,
};
};
//const {ret} = await saveSkin(data);
//const {ret} = await saveSkin(data);
const
{
ret
}
=
await
saveSkin
(
params
);
const
{
ret
}
=
await
saveSkin
(
params
);
...
...
src/views/Editor/dialogs/PxSkinEditorDialog.vue
View file @
86c5f3f0
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<el-select
class=
"env-select"
size=
"mini"
v-model=
"env"
@
change=
"changeEnv"
>
<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-option
v-for=
"(item, key) in pxEnvs"
:key=
"key"
:label=
"item"
:value=
"key"
></el-option>
</el-select>
</el-select>
<span
class=
"px-project-name"
>
{{
pxProjectName
}}
</span>
<span
class=
"px-project-name"
>
{{
pxProjectName
}}
</span>
<span
v-if=
"env==='prod'&&isProd"
>
<span
v-if=
"env==='prod'&&isProd"
>
<span
style=
"padding-left:10px;"
>
QA人员:
</span>
<span
style=
"padding-left:10px;"
>
QA人员:
</span>
<el-select
class=
"env-select"
size=
"mini"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
<el-select
class=
"env-select"
size=
"mini"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
:label=
"$t('Type')"
:label=
"$t('Type')"
width=
"100"
>
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
tplTypes
[
scope
.
row
.
type
-
1
]
}}
</span>
<span>
{{
tplTypes
[
scope
.
row
.
type
-
1
]
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -42,13 +42,13 @@
...
@@ -42,13 +42,13 @@
size=
"mini"
plain
size=
"mini"
plain
type=
"primary"
type=
"primary"
@
click=
"editItem(scope.row)"
@
click=
"editItem(scope.row)"
>
{{
$t('Edit')
}}
>
{{
$t('Edit')
}}
</el-button>
</el-button>
<el-button
<el-button
size=
"mini"
plain
size=
"mini"
plain
type=
"success"
type=
"success"
@
click=
"copyUrl(scope.row)"
@
click=
"copyUrl(scope.row)"
>
{{
$t('Copy url')
}}
>
{{
$t('Copy url')
}}
</el-button>
</el-button>
<el-popconfirm
:title=
"$t('Are you sure to delete this item?')"
<el-popconfirm
:title=
"$t('Are you sure to delete this item?')"
@
onConfirm=
"deleteItem(scope.row)"
@
onConfirm=
"deleteItem(scope.row)"
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
slot=
"reference"
slot=
"reference"
size=
"mini"
plain
size=
"mini"
plain
type=
"danger"
type=
"danger"
>
{{
$t('Delete')
}}
>
{{
$t('Delete')
}}
</el-button>
</el-button>
</el-popconfirm>
</el-popconfirm>
</div>
</div>
...
@@ -67,9 +67,9 @@
...
@@ -67,9 +67,9 @@
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div>
<div>
<el-dropdown
trigger=
"click"
@
command=
"onAdd"
placement=
"top"
size=
"small"
>
<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-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-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<px-config-popover
@
save=
"onSavePxConfig"
/>
<px-config-popover
@
save=
"onSavePxConfig"
/>
</div>
</div>
<div>
<div>
<el-button
size=
"mini"
@
click=
"onClose"
>
{{
$t('Close')
}}
</el-button>
<el-button
size=
"mini"
@
click=
"onClose"
>
{{
$t('Close')
}}
</el-button>
</div>
</div>
</div>
</div>
<px-skin-editor
ref=
"pxSkinEditor"
@
input=
"onSaveSkin"
/>
<px-skin-editor
ref=
"pxSkinEditor"
@
input=
"onSaveSkin"
/>
...
@@ -85,17 +85,17 @@
...
@@ -85,17 +85,17 @@
</template>
</template>
<
script
>
<
script
>
import
{
mapGetters
,
mapMutations
,
mapActions
}
from
'vuex'
import
{
mapGetters
,
mapMutations
,
mapActions
}
from
'vuex'
import
EnabledSetter
from
"../components/EnabledSetter"
;
import
EnabledSetter
from
"../components/EnabledSetter"
;
import
MonacoEditor
from
"vue-monaco"
;
import
MonacoEditor
from
"vue-monaco"
;
import
PxConfigPopover
from
"../components/PxConfigPopover"
;
import
PxConfigPopover
from
"../components/PxConfigPopover"
;
import
{
getSkins
,
saveSkin
,}
from
"../../../api/polaris"
;
import
{
getSkins
,
saveSkin
,}
from
"../../../api/polaris"
;
import
{
playWaiting
,
pxHostMapping
}
from
"../../../utils"
;
import
{
playWaiting
,
pxHostMapping
}
from
"../../../utils"
;
import
copy
from
"copy-to-clipboard"
;
import
copy
from
"copy-to-clipboard"
;
import
PxSkinEditor
from
"./PxSkinEditor"
;
import
PxSkinEditor
from
"./PxSkinEditor"
;
import
{
getDevPersons
}
from
"../../../api/editor"
;
import
{
getDevPersons
}
from
"../../../api/editor"
;
export
default
{
export
default
{
name
:
"PxSkinEditorDialog"
,
name
:
"PxSkinEditorDialog"
,
components
:
{
PxSkinEditor
,
PxConfigPopover
,
MonacoEditor
,
EnabledSetter
},
components
:
{
PxSkinEditor
,
PxConfigPopover
,
MonacoEditor
,
EnabledSetter
},
data
()
{
data
()
{
...
@@ -106,9 +106,9 @@
...
@@ -106,9 +106,9 @@
pxProjectName
:
''
,
pxProjectName
:
''
,
skins
:
[],
skins
:
[],
env
:
'dev'
,
env
:
'dev'
,
QAList
:
[],
QAList
:
[],
qa
:
null
,
qa
:
null
,
isProd
:
null
isProd
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
type
:
"success"
type
:
"success"
});
});
},
},
changeQA
(
pid
)
{
changeQA
(
pid
)
{
console
.
log
(
this
.
qa
)
console
.
log
(
this
.
qa
)
},
},
deleteItem
(
skin
)
{
deleteItem
(
skin
)
{
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
async
onSaveSkin
(
skin
,
operate
)
{
async
onSaveSkin
(
skin
,
operate
)
{
try
{
try
{
await
this
.
saveSkin
(
skin
,
operate
);
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
.
name
=
skin
.
name
;
oldSkin
.
html
=
skin
.
html
;
oldSkin
.
html
=
skin
.
html
;
this
.
$refs
.
pxSkinEditor
.
onSaveSuccess
();
this
.
$refs
.
pxSkinEditor
.
onSaveSuccess
();
...
@@ -179,12 +179,12 @@
...
@@ -179,12 +179,12 @@
const
{
pxEnv
}
=
this
.
options
;
const
{
pxEnv
}
=
this
.
options
;
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
this
.
QAList
=
await
getDevPersons
()
this
.
QAList
=
await
getDevPersons
()
this
.
QAList
=
this
.
QAList
.
filter
((
item
)
=>
{
this
.
QAList
=
this
.
QAList
.
filter
((
item
)
=>
{
return
item
.
level
==
1
return
item
.
level
==
1
})
})
console
.
log
(
this
.
qa
)
console
.
log
(
this
.
qa
)
this
.
qa
=
this
.
QAList
[
0
].
pid
this
.
qa
=
this
.
QAList
[
0
].
pid
if
(
!
pxPid
)
{
if
(
!
pxPid
)
{
this
.
$message
({
this
.
$message
({
...
@@ -195,14 +195,14 @@
...
@@ -195,14 +195,14 @@
}
}
try
{
try
{
const
data
=
await
getSkins
(
pxPid
,
env
);
const
data
=
await
getSkins
(
pxPid
,
env
);
this
.
isProd
=
data
.
isProd
this
.
isProd
=
data
.
isProd
this
.
pxProjectName
=
data
.
name
;
this
.
pxProjectName
=
data
.
name
;
this
.
skins
=
data
.
skins
;
this
.
skins
=
data
.
skins
;
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
invalidTicketNotice
();
this
.
invalidTicketNotice
();
}
}
},
},
async
invalidTicketNotice
()
{
async
invalidTicketNotice
()
{
const
{
env
}
=
this
;
const
{
env
}
=
this
;
this
.
pxProjectName
=
''
;
this
.
pxProjectName
=
''
;
this
.
skins
=
[];
this
.
skins
=
[];
...
@@ -228,6 +228,8 @@
...
@@ -228,6 +228,8 @@
env
,
env
,
isProd
:
true
,
isProd
:
true
,
qas
:
[
this
.
qa
],
qas
:
[
this
.
qa
],
publishType
:
3
,
remarks
:
'项目迭代'
,
};
};
const
{
ret
}
=
await
playWaiting
(
saveSkin
(
params
),
this
.
$t
(
'In processing'
));
const
{
ret
}
=
await
playWaiting
(
saveSkin
(
params
),
this
.
$t
(
'In processing'
));
if
(
ret
.
success
!==
false
)
{
if
(
ret
.
success
!==
false
)
{
...
@@ -250,7 +252,7 @@
...
@@ -250,7 +252,7 @@
'setMockServeEnabled'
,
'setMockServeEnabled'
,
]),
]),
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment