Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
59bcc2bc
Commit
59bcc2bc
authored
Nov 21, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
1ddef255
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
4 deletions
+28
-4
bigdata/app/base/controller/impl/common/companyCtl.js
+6
-0
bigdata/app/base/db/impl/common/appDao.js
+4
-1
bigdata/app/base/service/impl/common/companySve.js
+7
-0
bigdata/app/front/vues/pages/apps/apps.js
+10
-2
bigdata/app/front/vues/pages/companyinfo/companyinfo.js
+1
-1
No files found.
bigdata/app/base/controller/impl/common/companyCtl.js
View file @
59bcc2bc
...
@@ -37,6 +37,12 @@ class CompanyCtl extends CtlBase {
...
@@ -37,6 +37,12 @@ class CompanyCtl extends CtlBase {
req
.
session
.
tocompany
=
cmpfind
;
req
.
session
.
tocompany
=
cmpfind
;
return
system
.
getResult
(
cmpfind
.
apps
);
return
system
.
getResult
(
cmpfind
.
apps
);
}
}
async
giveupApp
(
p
,
q
,
req
){
var
comid
=
p
.
compid
;
var
appid
=
p
.
appid
;
await
this
.
service
.
giveupApp
(
comid
,
appid
);
return
system
.
getResult
({});
}
//设置当前用户选择的公司为当前公司
//设置当前用户选择的公司为当前公司
async
settocompany
(
p
,
q
,
req
){
async
settocompany
(
p
,
q
,
req
){
p
.
isCurrent
=
true
;
p
.
isCurrent
=
true
;
...
...
bigdata/app/base/db/impl/common/appDao.js
View file @
59bcc2bc
...
@@ -77,7 +77,10 @@ class AppDao extends Dao {
...
@@ -77,7 +77,10 @@ class AppDao extends Dao {
async
findAndCountAll
(
qobj
,
t
)
{
async
findAndCountAll
(
qobj
,
t
)
{
if
(
qobj
.
codepath
.
indexOf
(
"comapps"
)
>=
0
){
if
(
qobj
.
codepath
.
indexOf
(
"comapps"
)
>=
0
){
var
rtn
=
{};
var
rtn
=
{};
var
cas
=
await
this
.
db
.
models
.
companyapp
.
findAndCountAll
({
where
:{
company_id
:
qobj
.
tocompanyid
}});
var
comp
=
await
this
.
db
.
models
.
company
.
findById
(
qobj
.
search
.
company_id
);
var
apps
=
await
comp
.
getApps
();
rtn
.
results
=
{
rows
:
apps
,
count
:
apps
.
length
};
rtn
.
aggresult
=
{};
return
rtn
;
return
rtn
;
}
else
{
}
else
{
return
super
.
findAndCountAll
(
qobj
,
t
);
return
super
.
findAndCountAll
(
qobj
,
t
);
...
...
bigdata/app/base/service/impl/common/companySve.js
View file @
59bcc2bc
...
@@ -34,6 +34,13 @@ class CompanyService extends ServiceBase {
...
@@ -34,6 +34,13 @@ class CompanyService extends ServiceBase {
return
rtn
;
return
rtn
;
});
});
}
}
async
giveupApp
(
comid
,
appid
){
return
this
.
db
.
transaction
(
async
function
(
t
){
//检查当前company_id下面是否有
await
this
.
db
.
models
.
companyapp
.
destroy
({
where
:{
company_id
:
comid
,
app_id
:
appid
}});
return
{};
});
}
async
buyApp
(
p
,
cmid
,
user
){
async
buyApp
(
p
,
cmid
,
user
){
var
self
=
this
;
var
self
=
this
;
var
appid
=
p
.
id
;
var
appid
=
p
.
id
;
...
...
bigdata/app/front/vues/pages/apps/apps.js
View file @
59bcc2bc
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
return
callback
();
return
callback
();
};
};
return
{
return
{
selCompanyid
:
''
,
bizCode
:
''
,
bizCode
:
''
,
currow
:
null
,
currow
:
null
,
adminExist
:
false
,
adminExist
:
false
,
...
@@ -46,7 +47,9 @@
...
@@ -46,7 +47,9 @@
}
}
},
},
mounted
:
function
(){
mounted
:
function
(){
var
cmpid
=
this
.
$router
.
history
.
current
.
query
.
compid
;
this
.
selCompanyid
=
cmpid
;
this
.
$refs
.
cgrid
.
linkInInitQuery
(
"company_id"
,
cmpid
);
},
},
created
:
function
(){
created
:
function
(){
if
(
this
.
codePath
.
indexOf
(
"myapps"
)
>=
0
){
if
(
this
.
codePath
.
indexOf
(
"myapps"
)
>=
0
){
...
@@ -56,7 +59,8 @@
...
@@ -56,7 +59,8 @@
this
.
bizCode
=
"allapps"
;
this
.
bizCode
=
"allapps"
;
}
}
if
(
this
.
codePath
.
indexOf
(
"comapps"
)
>=
0
){
if
(
this
.
codePath
.
indexOf
(
"comapps"
)
>=
0
){
this
.
bizCode
=
"allapps"
;
this
.
bizCode
=
"comapps"
;
}
}
},
},
methods
:{
methods
:{
...
@@ -153,6 +157,10 @@
...
@@ -153,6 +157,10 @@
path
:
"/appconfig"
path
:
"/appconfig"
});
});
}
}
if
(
key
==
"giveup"
){
var
d
=
await
this
.
$root
.
postReq
(
"/web/common/companyCtl/giveupApp"
,
{
compid
:
this
.
selCompanyid
,
appid
:
row
.
id
});
this
.
$refs
.
cgrid
.
linkInInitQuery
(
"company_id"
,
this
.
selCompanyid
);
}
this
.
currow
=
row
;
this
.
currow
=
row
;
}
}
...
...
bigdata/app/front/vues/pages/companyinfo/companyinfo.js
View file @
59bcc2bc
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
}
}
}
}
if
(
key
=
"comapps"
){
if
(
key
=
"comapps"
){
this
.
$router
.
push
(
"/comapps"
);
this
.
$router
.
push
(
{
path
:
"/comapps"
,
query
:{
"compid"
:
row
.
id
}}
);
}
}
},
},
onColFormater
(
row
,
column
,
cellvalue
,
index
){
onColFormater
(
row
,
column
,
cellvalue
,
index
){
...
...
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