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
Show 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) {
...
@@ -19,3 +19,7 @@ export async function getSkins(projectId, env) {
export
async
function
sendDingTalk
()
{
export
async
function
sendDingTalk
()
{
return
await
fetchApi
(
`/polaris/sendMessage`
,
{
method
:
'post'
})
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;
...
@@ -6,11 +6,11 @@ export let API_HOST;
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
//API_HOST = '//10.10.95.74:7777';
//API_HOST = '//10.10.95.74:7777';
//API_HOST = '//192.168.1.16: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 = '//192.168.0.105:7777';
//API_HOST = '//localhost:3002';
//API_HOST = '//localhost:3002';
API_HOST
=
window
.
__data
.
apiHost
;
//
API_HOST = window.__data.apiHost;
//API_HOST = '';
//API_HOST = '
http://beacon.duiba.com.cn
';
}
else
{
}
else
{
API_HOST
=
window
.
__data
.
apiHost
;
API_HOST
=
window
.
__data
.
apiHost
;
}
}
...
...
src/views/Editor/dialogs/PublishView.vue
View file @
5337c8a5
...
@@ -42,8 +42,8 @@
...
@@ -42,8 +42,8 @@
<div
class=
"el-form-item el-form-item--mini"
style=
"padding:10px 0 10px 0"
>
<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>
<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;"
>
<div
class=
"el-form-item__content"
style=
"margin-left: 60px;"
>
<el-select
size=
"small
"
v-model=
"qa"
placeholder=
"请选择QA人员"
@
change=
"changeQA"
>
<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>
</el-select>
</div>
</div>
</div>
</div>
...
@@ -68,7 +68,6 @@
...
@@ -68,7 +68,6 @@
},
},
data
()
{
data
()
{
return
{
return
{
QAList
:
this
.
$t
(
"QAList"
),
pxEnvs
:
this
.
$t
(
"pxEnvs"
),
pxEnvs
:
this
.
$t
(
"pxEnvs"
),
tplOperates
:
this
.
$t
(
"tplOperates"
),
tplOperates
:
this
.
$t
(
"tplOperates"
),
tplTypes
:
this
.
$t
(
"tplTypes"
),
tplTypes
:
this
.
$t
(
"tplTypes"
),
...
@@ -82,7 +81,9 @@
...
@@ -82,7 +81,9 @@
skins
:
[],
skins
:
[],
pxPid
:
""
,
pxPid
:
""
,
name
:
""
,
name
:
""
,
qa
:
this
.
$t
(
"QAList"
)[
0
]
QAList
:[],
qa
:
null
,
pid
:
null
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -110,6 +111,13 @@
...
@@ -110,6 +111,13 @@
const
{
pxEnv
}
=
this
.
options
;
const
{
pxEnv
}
=
this
.
options
;
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
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
)
{
if
(
!
pxPid
)
{
this
.
$message
({
this
.
$message
({
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
...
@@ -176,16 +184,29 @@
...
@@ -176,16 +184,29 @@
return
;
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
,
projectId
:
pxPid
,
type
:
(
operate
+
1
).
toString
()
,
operate
:
operate
+
1
,
currentHtmlType
:
(
tplTyp
e
+
1
).
toString
(),
type
:(
operat
e
+
1
).
toString
(),
skinId
,
id
:
skinId
,
tp
l
,
htm
l
,
name
,
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
)
{
if
(
ret
.
success
!==
false
)
{
this
.
$message
({
this
.
$message
({
message
:
`操作成功`
,
message
:
`操作成功`
,
...
...
src/views/Editor/dialogs/PxSkinEditorDialog.vue
View file @
5337c8a5
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<span
v-if=
"env==='prod'"
>
<span
v-if=
"env==='prod'"
>
<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"
>
<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>
</el-select>
</span>
</span>
</div>
</div>
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
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
,
getDevPersons
}
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"
;
...
@@ -105,8 +105,9 @@
...
@@ -105,8 +105,9 @@
pxProjectName
:
''
,
pxProjectName
:
''
,
skins
:
[],
skins
:
[],
env
:
'dev'
,
env
:
'dev'
,
QAList
:
this
.
$t
(
"QAList"
),
QAList
:[],
qa
:
this
.
$t
(
"QAList"
)[
0
],
qa
:
null
,
pid
:
null
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -144,6 +145,10 @@
...
@@ -144,6 +145,10 @@
type
:
"success"
type
:
"success"
});
});
},
},
changeQA
(
pid
){
console
.
log
(
pid
)
this
.
pid
=
pid
},
deleteItem
(
skin
)
{
deleteItem
(
skin
)
{
try
{
try
{
this
.
saveSkin
(
skin
,
2
);
this
.
saveSkin
(
skin
,
2
);
...
@@ -174,6 +179,15 @@
...
@@ -174,6 +179,15 @@
const
{
pxEnv
}
=
this
.
options
;
const
{
pxEnv
}
=
this
.
options
;
const
pxPid
=
this
.
pxPid
=
pxEnv
[
env
];
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
)
{
if
(
!
pxPid
)
{
this
.
$message
({
this
.
$message
({
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
message
:
this
.
$t
(
'Please config projectID'
,
{
env
}),
...
@@ -211,7 +225,7 @@
...
@@ -211,7 +225,7 @@
name
,
name
,
env
,
env
,
isProd
:
true
,
isProd
:
true
,
qas
:
[
921
],
qas
:
[
this
.
pid
],
};
};
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
)
{
...
...
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