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
5337c8a5
Commit
5337c8a5
authored
Apr 15, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑器添加QA
parent
3c50201e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
19 deletions
+58
-19
polaris.js
src/api/polaris.js
+4
-0
config.js
src/config.js
+3
-3
PublishView.vue
src/views/Editor/dialogs/PublishView.vue
+32
-11
PxSkinEditorDialog.vue
src/views/Editor/dialogs/PxSkinEditorDialog.vue
+19
-5
No files found.
src/api/polaris.js
View file @
5337c8a5
...
...
@@ -19,3 +19,7 @@ export async function getSkins(projectId, env) {
export
async
function
sendDingTalk
()
{
return
await
fetchApi
(
`/polaris/sendMessage`
,
{
method
:
'post'
})
}
export
async
function
getDevPersons
(){
return
await
fetchApi
(
'/api/editor/devPersons'
,
{
method
:
'get'
});
}
\ No newline at end of file
src/config.js
View file @
5337c8a5
...
...
@@ -6,11 +6,11 @@ export let API_HOST;
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
//API_HOST = '//10.10.95.74:7777';
//API_HOST = '//192.168.1.16:7777';
//API_HOST = '//10.10.93.88:7777
';
API_HOST
=
'//10.10.35.210:3000
'
;
//API_HOST = '//192.168.0.105:7777';
//API_HOST = '//localhost:3002';
API_HOST
=
window
.
__data
.
apiHost
;
//API_HOST = '';
//
API_HOST = window.__data.apiHost;
//API_HOST = '
http://beacon.duiba.com.cn
';
}
else
{
API_HOST
=
window
.
__data
.
apiHost
;
}
...
...
src/views/Editor/dialogs/PublishView.vue
View file @
5337c8a5
...
...
@@ -42,8 +42,8 @@
<div
class=
"el-form-item el-form-item--mini"
style=
"padding:10px 0 10px 0"
>
<label
class=
"el-form-item__label"
style=
"width: 60px;text-align: left;padding-right:0px"
>
QA人员:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 60px;"
>
<el-select
size=
"small
"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
<el-option
v-for=
"item in QAList"
:key=
"item
"
:label=
"item"
:value=
"item
"
></el-option>
<el-select
class=
"env-select"
size=
"mini
"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
<el-option
v-for=
"item in QAList"
:key=
"item
.id"
:label=
"item.name"
:value=
"item.pid
"
></el-option>
</el-select>
</div>
</div>
...
...
@@ -68,7 +68,6 @@
},
data
()
{
return
{
QAList
:
this
.
$t
(
"QAList"
),
pxEnvs
:
this
.
$t
(
"pxEnvs"
),
tplOperates
:
this
.
$t
(
"tplOperates"
),
tplTypes
:
this
.
$t
(
"tplTypes"
),
...
...
@@ -82,7 +81,9 @@
skins
:
[],
pxPid
:
""
,
name
:
""
,
qa
:
this
.
$t
(
"QAList"
)[
0
]
QAList
:[],
qa
:
null
,
pid
:
null
,
};
},
computed
:
{
...
...
@@ -110,6 +111,13 @@
const
{
pxEnv
}
=
this
.
options
;
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
console
.
log
(
"getDevPersons"
,
getDevPersons
())
this
.
QAList
=
await
getDevPersons
()
this
.
qa
=
this
.
QAList
[
0
]
this
.
pid
=
this
.
QAList
[
0
].
pid
;
if
(
!
pxPid
)
{
this
.
$message
({
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
...
...
@@ -176,16 +184,29 @@
return
;
}
}
const
data
=
{
// const data = {
// projectId: pxPid,
// type: (operate + 1).toString(),
// currentHtmlType: (tplType + 1).toString(),
// skinId,
// tpl,
// name,
// env: env
// };
const
{
html
}
=
skin
;
const
params
=
{
projectId
:
pxPid
,
type
:
(
operate
+
1
).
toString
()
,
currentHtmlType
:
(
tplTyp
e
+
1
).
toString
(),
skinId
,
tp
l
,
operate
:
operate
+
1
,
type
:(
operat
e
+
1
).
toString
(),
id
:
skinId
,
htm
l
,
name
,
env
:
env
env
,
isProd
:
true
,
qas
:
[
this
.
pid
],
};
const
{
ret
}
=
await
saveSkin
(
data
);
//const {ret} = await saveSkin(data);
const
{
ret
}
=
await
saveSkin
(
params
);
if
(
ret
.
success
!==
false
)
{
this
.
$message
({
message
:
`操作成功`
,
...
...
src/views/Editor/dialogs/PxSkinEditorDialog.vue
View file @
5337c8a5
...
...
@@ -15,7 +15,7 @@
<span
v-if=
"env==='prod'"
>
<span
style=
"padding-left:10px;"
>
QA人员:
</span>
<el-select
class=
"env-select"
size=
"mini"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
<el-option
v-for=
"item in QAList"
:key=
"item
"
:label=
"item"
:value=
"item
"
></el-option>
<el-option
v-for=
"item in QAList"
:key=
"item
.id"
:label=
"item.name"
:value=
"item.pid
"
></el-option>
</el-select>
</span>
</div>
...
...
@@ -89,7 +89,7 @@
import
EnabledSetter
from
"../components/EnabledSetter"
;
import
MonacoEditor
from
"vue-monaco"
;
import
PxConfigPopover
from
"../components/PxConfigPopover"
;
import
{
getSkins
,
saveSkin
}
from
"../../../api/polaris"
;
import
{
getSkins
,
saveSkin
,
getDevPersons
}
from
"../../../api/polaris"
;
import
{
playWaiting
,
pxHostMapping
}
from
"../../../utils"
;
import
copy
from
"copy-to-clipboard"
;
import
PxSkinEditor
from
"./PxSkinEditor"
;
...
...
@@ -105,8 +105,9 @@
pxProjectName
:
''
,
skins
:
[],
env
:
'dev'
,
QAList
:
this
.
$t
(
"QAList"
),
qa
:
this
.
$t
(
"QAList"
)[
0
],
QAList
:[],
qa
:
null
,
pid
:
null
,
}
},
computed
:
{
...
...
@@ -144,6 +145,10 @@
type
:
"success"
});
},
changeQA
(
pid
){
console
.
log
(
pid
)
this
.
pid
=
pid
},
deleteItem
(
skin
)
{
try
{
this
.
saveSkin
(
skin
,
2
);
...
...
@@ -174,6 +179,15 @@
const
{
pxEnv
}
=
this
.
options
;
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
console
.
log
(
"getDevPersons"
,
getDevPersons
())
this
.
QAList
=
await
getDevPersons
()
this
.
QAList
=
this
.
QAList
.
filter
((
item
)
=>
{
return
item
.
level
!=
1
})
this
.
qa
=
this
.
QAList
[
0
]
this
.
pid
=
this
.
QAList
[
0
].
pid
;
if
(
!
pxPid
)
{
this
.
$message
({
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
...
...
@@ -211,7 +225,7 @@
name
,
env
,
isProd
:
true
,
qas
:
[
921
],
qas
:
[
this
.
pid
],
};
const
{
ret
}
=
await
playWaiting
(
saveSkin
(
params
),
this
.
$t
(
'In processing'
));
if
(
ret
.
success
!==
false
)
{
...
...
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