Commit a192110c by yangfangfang

标签审核

parent 67f42a68
......@@ -297,7 +297,6 @@
}
};
//多选
function selectMoreList(){
return {
restrict: 'E',
......@@ -311,7 +310,8 @@
meauRefresh:"=", //强制刷新下拉框
keyname:"@", //显示名
keyid:"@",//传递ID
meauRed:"="//红色框
meauRed:"=",//红色框
meauDis:"="
},
link: function($scope,$element) {
$scope.ischeckall = false;
......@@ -327,6 +327,7 @@
$scope.clickMeau = function(meau){
$scope.meauRed = false;
var idx = $scope.selIDS.indexOf(meau[$scope.keyid]);
if($scope.selIDS.length==2 && idx==-1 && $scope.keyid=='itemCode') return;
if(idx>-1){
$scope.selIDS.splice(idx,1);
$scope.selNames.splice(idx,1);
......@@ -342,10 +343,14 @@
$scope.selme = false;
}
$scope.$watch("selme",function(){
if(!$scope.selme && $scope.keyid=='eventName' && $scope.selIDS){
if(!$scope.selme && ( $scope.keyid=='eventName'|| $scope.keyid=='itemCode') && $scope.selIDS){
$scope.$emit($scope.meauId,{info:$scope.selIDS.join(",")});
}
});
$scope.showMenu = function() {
if($scope.meauDis) return;
$scope.selme = true;
}
$scope.$watch("meauData+meauName+meauRefresh+meauInfo",function(){
$scope.selIDS = [];
$scope.selNames = [];
......
......@@ -87,11 +87,22 @@
function appDetailCtrl($scope,$rootScope,HttpService,ToolService,UtilService,$q,$state,$stateParams,$filter,$timeout){
var infoId = $scope.infoId = $scope.id = $stateParams.aid;
$scope.isLog = isLog;
if(!infoId){
$scope.tagType = 'game';
}
$scope.typeinit = '请选择游戏类型';
$scope.themeinit = '请选择游戏题材';
$scope.styleinit = '请选择美术风格';
$scope.firstinit = '请选择应用分类';
$scope.secondinit = '应用分类-细分分类';
var boundOldID = "",oldName = "";
var gameTypeId = 38;
var tagPM = HttpService.getInfo("/dic/findbycampaign");
tagPM.then(function(data){
$scope.tagList = data;
init();
});
if(!$scope.isLog){
var typePM = HttpService.getInfo("mng/app/find/getcategorys");
typePM.then(function(data){
......@@ -124,7 +135,26 @@
$scope.gameGenre = msg.info.categoryid;
$scope.gameGenreName = msg.info.categoryname;
});
$scope.$on("typeIds",function(e,msg){
$scope.typeIds = msg.info;
});
$scope.$on("themeIds",function(e,msg){
$scope.themeIds = msg.info;
});
$scope.$on("styleIds",function(e,msg){
$scope.styleIds = msg.info;
});
$scope.$on("firstId",function(e,msg){
$scope.firstId = msg.info.itemCode;
$scope.tagList.app.filter(function(item){
if($scope.firstId == item.itemCode){
$scope.secondList = item.child;
}
});
});
$scope.$on("secondId",function(e,msg){
$scope.secondId = msg.info.itemCode;
});
$scope.ckSync = function(){
$scope.sync = !$scope.sync;
......@@ -151,9 +181,35 @@
$scope.sync = false;
$scope.bundleid = boundOldID = data.bundleid;
if($scope.stepflag == 3){
ToolService.hideLoading();
$scope.queryLogInfo();
$scope.appTagList = data.appTagList;
var stemp = [], ttemp = [], etemp = [];
if(data.tagType=="02"){
$scope.appTagList.filter(function(item) {
if(item.parentTagId == $scope.tagList.game[0].itemCode){
stemp.push(item.tagId);
$scope.typeinitIds = stemp.join(',');
$scope.typeIds = stemp.join(',');
}else if(item.parentTagId == $scope.tagList.game[1].itemCode){
ttemp.push(item.tagId);
$scope.themeinitIds = ttemp.join(',');
$scope.themeIds = ttemp.join(',');
}else if(item.parentTagId == $scope.tagList.game[2].itemCode){
etemp.push(item.tagId);
$scope.styleinitIds = etemp.join(',');
$scope.styleIds = etemp.join(',');
}
});
$scope.tagType = "game";
}else if(data.tagType=="04"){
$scope.secondinitId = $scope.appTagList[0].tagId;
$scope.tagList.app.filter(function(p) {
if($scope.appTagList[0].parentTagId == p.itemCode){
$scope.firstinitId = p.itemCode;
}
});
$scope.tagType = "app";
}else if(data.tagType=="00"){
$scope.tagType = "test";
}
});
if($scope.stepflag == 1){
......@@ -170,7 +226,6 @@
$scope.sync = false;
}
}
init();
$scope.nameHas = false;
$scope.exixtName = function(){
......@@ -242,12 +297,51 @@
if($scope.nameHas || $scope.bundleHas){
return false;
}
var appTagList = [], isnull = false, tag = "00";
console.log($scope.tagType,$scope.typeIds,$scope.themeIds,$scope.styleIds)
if($scope.tagType == 'game'){
$scope.typenull = !$scope.typeIds;
$scope.themenull = !$scope.themeIds;
$scope.stylenull = !$scope.styleIds;
if($scope.typenull || $scope.themenull || $scope.stylenull){
isnull = true;
}else{
tag = "02";
$scope.typeIds.split(",").filter(function(item){
appTagList.push({tagId:item});
});
$scope.themeIds.split(",").filter(function(item){
appTagList.push({tagId:item});
});
$scope.styleIds.split(",").filter(function(item){
appTagList.push({tagId:item});
});
}
}
else if($scope.tagType == 'app'){
$scope.firstnull = !$scope.firstId;
if($scope.firstId){
$scope.secondnull = !$scope.secondId;
}
if($scope.firstnull || $scope.secondnull){
isnull = true;
}else{
tag = "04";
$scope.secondId.split(",").filter(function(item){
appTagList.push({tagId:item});
});
}
}
var par = {
platform: $scope.platform,
name: $scope.name,
appGenre: $scope.appGenre,
sync: $scope.sync,
url: $scope.url
url: $scope.url,
appTagList: appTagList,
tagType: tag
};
if($scope.appGenre == gameTypeId){
par.gameGenre = $scope.gameGenre;
......
......@@ -2451,6 +2451,14 @@ textarea.iptform{
box-sizing: border-box;
width:100%;
}
.tagWrap.datawrap{
padding: 10px;
margin-left: 100px;
width: 90%;
}
.tagWrap.datawrap .searchWrap .searchIpt{
width: 188px;
}
.channel .datawrap .selectList{
height:250px;
max-height:250px;
......
......@@ -64,13 +64,61 @@
</div>
<div class="formDetailItem">
<div class="iptlabel must">产品类别:</div>
<input type="text" class="iptform" ng-model="appGenreName" ng-disabled="true" ng-if="id">
<select-list meau-info="typeList" meau-id="appGenre" meau-data="appGenreInit" keyid="categoryid" ng-show="!id"></select-list>
<input type="text" class="iptform" ng-model="appGenreName" ng-disabled="true" ng-if="id && !tagType">
<select-list meau-info="typeList" meau-id="appGenre" meau-data="appGenreInit" keyid="categoryid" ng-show="!tagType && !id"></select-list>
<div class="radioWrap" ng-show="id && tagType=='game'">
<span class="label">游戏</span>
</div>
<div class="radioWrap" ng-show="id && tagType=='app'">
<span class="label">应用</span>
</div>
<div class="radioWrap" ng-show="id && tagType=='test'">
<span class="label">测试</span>
</div>
<div class="radioWrap" ng-show="!id">
<div class="radiolabel" ng-click="tagType='game'">
<span class="radio" ng-class="{'active':tagType=='game'}"></span>
游戏
</div>
<div class="radiolabel" ng-click="tagType='app'">
<span class="radio" ng-class="{'active':tagType=='app'}"></span>
应用
</div>
<div class="radiolabel" ng-click="tagType='test'">
<span class="radio" ng-class="{'active':tagType=='test'}"></span>
测试
</div>
</div>
<div class="tagWrap datawrap" ng-show="tagType=='game'">
<span class="ml10 mt10">类型:</span>
<select-more-list style="width:160px;margin-top:-5px;" meau-info="tagList.game[0].child" meau-id="typeIds"
meau-name="typeinit" keyid="itemCode" keyname="itemValue" meau-data="typeinitIds"
meau-red="typenull" meau-dis="id"></select-more-list>
<span class="ml10" ng-show="(themeinitIds && id) || !id">题材:</span>
<select-more-list style="width:160px;margin-top:-5px;" meau-info="tagList.game[1].child" meau-id="themeIds"
meau-name="themeinit" keyid="itemCode" keyname="itemValue" meau-data="themeinitIds"
meau-red="themenull" meau-dis="id" ng-show="(themeinitIds && id) || !id"></select-more-list>
<span class="ml10" ng-show="(styleinitIds && id) || !id">美术风格:</span>
<select-more-list style="width:160px;margin-top:-5px;" meau-info="tagList.game[2].child" meau-id="styleIds"
meau-name="styleinit" keyid="itemCode" keyname="itemValue" meau-data="styleinitIds"
meau-red="stylenull" meau-dis="id" ng-show="(styleinitIds && id) || !id"></select-more-list>
</div>
<div class="tagWrap datawrap" ng-show="tagType=='app'">
<select-list style="width:160px;" meau-info="tagList.app" meau-id="firstId"
meau-name="firstinit" keyid="itemCode" keyname="itemValue" meau-data="firstinitId"
meau-red="firstnull" meau-dis="id"></select-list>
<select-list style="width:160px;" ng-if="firstId" meau-info="secondList" meau-id="secondId"
meau-name="secondinit" keyid="itemCode" keyname="itemValue" meau-data="secondinitId"
meau-red="secondnull" meau-dis="id"></select-list>
</div>
<div class="iptwrap desc" style="display:block;">
产品类别选择后将不能再做修改,请谨慎填写。
</div>
</div>
<div class="formDetailItem" ng-show="showGame">
<div class="iptlabel must">游戏类别:</div>
<input type="text" class="iptform" ng-model="gameGenreName" ng-disabled="true" ng-if="id">
<select-list meau-info="gameList" meau-id="gameGenre" meau-data="gameGenreInit" keyid="categoryid" ng-show="!id"></select-list>
<input type="text" class="iptform" ng-model="gameGenreName" ng-disabled="true" ng-if="id && appTagList.length==0">
<select-list meau-info="gameList" meau-id="gameGenre" meau-data="gameGenreInit" keyid="categoryid" ng-show="!tagType && !id"></select-list>
</div>
<div class="formDetailItem">
<div class="iptlabel must">下载地址:</div>
......
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