Commit d4bcbf04 authored by wangqinghua's avatar wangqinghua

color

parent 1c2cc2ef
......@@ -7,6 +7,7 @@
<excludeFolder url="file://$MODULE_DIR$/platforms/android" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/www" />
</content>
<content url="file://$MODULE_DIR$/platforms/android" />
<orderEntry type="inheritedJdk" />
......
......@@ -167,3 +167,12 @@ ionic cordova plugin add cordova-plugin-badge
"proxyUrl": "http://10.10.200.11:8080/wisdomgroup"
如果build android 报错了请在platforms/build.gradle里面的最后添加如下代码:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}}
//app自动更新安装打开功能中 android 8以上的权限有限制;需要在 platforms/android/app/src/main/AndroidManifest.xml文件里面
将 targetSdkVersion的值改为23即可;android SDK版本降低可以
......@@ -35,8 +35,8 @@
<div class="button-right" >
<!--是否报名了>时间是否截止->人数是否满了->-->
<ng-container *ngIf="batch.order">
<span *ngIf="!isFlag" class="button-btn button-btn2" (click)="sureCancelOrder()">取消报名</span>
<span *ngIf="isFlag" class="button-btn button-btn1" (click)="reelectBatch()">订单确认</span>
<span *ngIf="batch.order.orderstate == 1" class="button-btn button-btn2" (click)="sureCancelOrder()">取消报名</span>
<span *ngIf="batch.order.orderstate == 2" class="button-btn button-btn1" (click)="reelectBatch()">订单确认</span>
</ng-container>
<ng-container *ngIf="!batch.order">
<!--时间截止-->
......
......@@ -14,8 +14,6 @@ declare var Swiper;
})
export class BatchDetailPage {
@ViewChild('contentSlides') contentSlides: Slides;
isFlag = false; //是否过截止日期
batch={
batchEndDate:'',
signUp:true,
......@@ -42,14 +40,6 @@ export class BatchDetailPage {
this.order = this.batch.order;
}
//判断是否过截止日期
const nowDate = new Date().getTime();
const endDate = new Date(this.batch.batchEndDate).getTime();
console.log(this.batch);
if( nowDate > endDate ){
this.isFlag = true; //已过截止日期
}
}
initSwiper(){
......
......@@ -2,7 +2,11 @@
<ion-navbar>
<ion-title>值班情况</ion-title>
<span (click)="sigUp()" float-right class="margin-right-10 color-fff">值班签到</span>
<ion-buttons end>
<button ion-button (click)="sigUp()">
<span ion-text class="color-fff margin-right-10" >值班签到</span>
</button>
</ion-buttons>
</ion-navbar>
<div class="duty">
......
......@@ -11,26 +11,42 @@
<ion-list>
<ng-container *ngIf="list.length > 0">
<ng-container *ngFor="let item of list" >
<ng-container *ngIf="item?.writeSelf != 0">
<ion-item class="item-list margin-bottom-10" >
<div class="item" >
<div class="item" (click)="goToResult(item)">
<div class="item-header padding-15-0">
<div class="item-header-style">
<span class="item-title">{{item.title}}</span>
<!--<span float-right class="done" *ngIf="item.state==1 ">未发布</span>-->
<span *ngIf="item?.writeSelf != 0" float-right class="done">已完成</span>
<span *ngIf="item?.writeSelf == 0" float-right class="done">未完成</span>
<!--<span float-right class="done" *ngIf="item.state==3 ">已过期</span>-->
<span float-right class="done">已完成</span>
</div>
</div>
<div class="content-button padding-15-0">
<span>参与人员:</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span *ngIf="item?.writeSelf == 0" float-right class="join" (click)="geToWrite(item)">参与</span>
<span *ngIf="item?.writeSelf != 0" float-right class="look" (click)="goToResult(item)">查看</span>
<span float-right class="look">查看</span>
</div>
</div>
</ion-item>
</ng-container>
<ng-container *ngIf="item?.writeSelf == 0">
<ion-item class="item-list margin-bottom-10">
<div class="item" (click)="geToWrite(item)" >
<div class="item-header padding-15-0">
<div class="item-header-style">
<span class="item-title">{{item.title}}</span>
<span float-right class="done">未完成</span>
</div>
</div>
<div class="content-button padding-15-0">
<span>参与人员:</span>
<span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span>
<span float-right class="join">参与</span>
</div>
</div>
</ion-item>
</ng-container>
</ng-container>
</ng-container>
</ion-list>
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {IonicPage, LoadingController, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../../service/appHttpService";
import {Storage} from "@ionic/storage";
......@@ -12,17 +12,35 @@ export class SurveryPage {
userId;
list = [];
loading;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public storage: Storage) {}
public appService: AppService,public storage: Storage,
public loadingCtrl:LoadingController) {}
ionViewDidLoad(){
this.loading = this.loadingCtrl.create({
content: '请稍等...',
// dismissOnPageChange: true,
enableBackdropDismiss: true
});
this.loading.present();
this.getList();
}
ionViewDidEnter() {
this.getList();
}
getList(){
this.storage.get("user").then((res)=>{
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/findQuesByUserId/',res.id)
.subscribe((res)=>{
if(this.loading){
this.loading.dismiss();
}
this.list = res.json().datalist;
})
});
// this.getSurveyList()
}
getSurveyList(){
......
......@@ -45,7 +45,8 @@
</div>
</ion-list>
<ng-container *ngIf="survey?.isOpenName == '否'">
<!--0 不公开 1 公开-->
<ng-container *ngIf="survey?.isopen == 1">
<button class="submit-btn submit" (click)="goToResult()">查看问卷结果</button>
</ng-container>
</ion-content>
<ion-header>
<ion-navbar>
<ion-title>问卷回答</ion-title>
</ion-navbar>
<ion-navbar>
<ion-title>问卷回答</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label class="padding-left-16">{{item?.title}}</ion-label>
</ion-item>
<div class="question-list">
<ion-item *ngFor="let item of ansArr;let i = index">
<div class="item-content">
<!--判断题-->
<p><span class="color-red" *ngIf="item.isAns == 1">*</span>
{{i +1}}、
<span *ngIf="item.quesType == 1">(判断)</span>
<span *ngIf="item.quesType == 2">(单选)</span>
<span *ngIf="item.quesType == 3">(多选)</span>
<span *ngIf="item.quesType == 4">(问答)</span>
{{item.title}}
</p>
<div class="padding-0-30">
<ng-container *ngIf="item.quesType == 1">
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="0" type="radio">
<span class="input-radio"></span>
</label>
</p>
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="1" type="radio">
<span class="input-radio"></span>
</label>
</p>
</ng-container>
<!--单选题-->
<ng-container *ngIf="item.quesType == 2">
<ng-container *ngFor=" let option1 of item.quesDesc;let optIndex = index;">
<p>
<label>
<input [(ngModel)]="item.answerdesc" type="radio" value="{{optIndex}}" name="{{item.questionQueId}}">{{option1.option_title}}
<span class="input-radio"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--多选题-->
<ng-container *ngIf="item.quesType == 3">
<ng-container *ngFor=" let option2 of item.quesDesc;let quesIndex = index;">
<p>
<label>
<input type="checkbox" (change)="mutiSelect(i,quesIndex)" value="{{quesIndex}}">{{option2.option_title}}
<span class="input-check"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--问答题-->
<ng-container *ngIf="item.quesType == 4">
<textarea [(ngModel)]="item.answerdesc" class="content-textarea"></textarea>
</ng-container>
</div>
<ion-list>
<ion-item>
<ion-label class="padding-left-16">{{item?.title}}</ion-label>
</ion-item>
<div class="question-list">
<ion-item *ngFor="let item of ansArr;let i = index">
<div class="item-content">
<!--判断题-->
<p><span class="color-red" *ngIf="item.isAns == 1">*</span>
{{i +1}}、
<span *ngIf="item.quesType == 1">(判断)</span>
<span *ngIf="item.quesType == 2">(单选)</span>
<span *ngIf="item.quesType == 3">(多选)</span>
<span *ngIf="item.quesType == 4">(问答)</span>
{{item.title}}
</p>
<div class="padding-0-30">
<ng-container *ngIf="item.quesType == 1">
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="0"
type="radio">
<span class="input-radio"></span>
</label>
</p>
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="1"
type="radio">
<span class="input-radio"></span>
</label>
</p>
</ng-container>
<!--单选题-->
<ng-container *ngIf="item.quesType == 2">
<ng-container *ngFor=" let option1 of item.quesDesc;let optIndex = index;">
<p>
<label>
<input [(ngModel)]="item.answerdesc" type="radio" value="{{optIndex}}"
name="{{item.questionQueId}}">{{option1.option_title}}
<span class="input-radio"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--多选题-->
<ng-container *ngIf="item.quesType == 3">
<ng-container *ngFor=" let option2 of item.quesDesc;let quesIndex = index;">
<p>
<label>
<input type="checkbox" (change)="mutiSelect(i,quesIndex)" value="{{quesIndex}}">{{option2.option_title}}
<span class="input-check"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--问答题-->
<ng-container *ngIf="item.quesType == 4">
<textarea [(ngModel)]="item.answerdesc" class="content-textarea"></textarea>
</ng-container>
</div>
</div>
</ion-item>
</div>
</ion-item>
</div>
</ion-list>
</ion-list>
<p class="text-center">
<label>
<input type="checkbox" [(ngModel)]="isans">
<span class="input-check"></span>
<span>匿名回答</span>
</label>
</p>
<button class="submit-btn submit" (click)="confirm()">提交</button>
<button class="submit-btn submit" (click)="confirm()">提交</button>
</ion-content>
......@@ -49,6 +49,7 @@ page-survey-write {
position: absolute;
width: 10px;
top: -4px;
left: 0px;
height: 10px;
font-size: 1.5rem;
font-weight: bold;
......
......@@ -10,6 +10,7 @@ import {AppService} from "../../../../service/appHttpService";
})
export class SurveyWritePage {
isans;
item;
temp;
ansArr = [];
......@@ -25,9 +26,9 @@ export class SurveyWritePage {
getDetail() {
const id = '';
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/findQuesByQuestionId/', this.item.id)
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/edit/', this.item.id)
.subscribe((res) => {
this.temp = res.json().datalist;
this.temp = res.json().data.ques.datalist;
for (let i = 0; i < this.temp.length; i++) {
const data = {
'questionId': this.temp[i].questionId,
......@@ -52,7 +53,6 @@ export class SurveyWritePage {
} else {
this.ansArr[i].answerdesc += "," + index;
}
console.log(this.ansArr[i]);
}
confirm(){
......@@ -68,6 +68,11 @@ export class SurveyWritePage {
}
let arrData = [];
if(this.isans){
this.isans = 1;
}else{
this.isans = 2;
}
for (let i = 0; i < this.ansArr.length; i++) {
if (this.ansArr[i].quesType == 3) {
let length = this.ansArr[i].answerdesc.length;
......@@ -77,14 +82,13 @@ export class SurveyWritePage {
'questionId': this.ansArr[i].questionId,
'questionQueId': this.ansArr[i].questionQueId,
'answerdesc': this.ansArr[i].answerdesc,
'isans': this.ansArr[i].isAns
'isans': this.isans
};
arrData.push(data);
}
console.log(arrData);
const qData = {
'array': JSON.stringify(arrData)
}
};
this.appService.ObserverHttpPost('/wisdomgroup/modules/question/create/quesuser', qData)
.subscribe((res) => {
this.navCtrl.pop();
......
......@@ -13,15 +13,16 @@ import {CreatePage} from "../create/create";
})
export class EditPage {
tempId;
editIndex;
temp = {
title: '',
id: '',
explai:'', //问卷说明
usergroup:null, //用户组id
isopen:null, //是否公开
isans:null, //是否匿名
state:null //状态
explai: '', //问卷说明
usergroup: null, //用户组id
isopen: null, //是否公开
isans: null, //是否匿名
state: null //状态
};
contentList = [];
......@@ -31,19 +32,22 @@ export class EditPage {
}
ionViewDidEnter() {
this.temp = this.navParams.get('temp');
console.log(this.temp);
this.tempId = this.navParams.get('temp').id;
this.getDetail();
const length = this.navCtrl.length();
if(length > 5){
this.navCtrl.remove(3, length-4);
if (length > 5) {
this.navCtrl.remove(3, length - 4);
}
}
//问卷详情
getDetail() {
this.appService.ObserverHttpGet('/wisdomgroup/modules/question/findQuesByQuestionId', {id: this.temp.id})
//问卷详情
this.appService.ObserverHttpPostAdd('/wisdomgroup/modules/question/edit/', this.tempId).subscribe((res) => {
this.temp = res.json().data;
});
//问卷题目详情
this.appService.ObserverHttpGet('/wisdomgroup/modules/question/findQuesByQuestionId', {id: this.tempId})
.subscribe(
(res) => {
this.contentList = res.json().datalist;
......@@ -66,12 +70,12 @@ export class EditPage {
this.editIndex = index;
}
goEdit(index){
goEdit(index) {
console.log(index);
this.navCtrl.push('CreatePage',{
edit:this.contentList,
index:index,
temp:this.temp
this.navCtrl.push('CreatePage', {
edit: this.contentList,
index: index,
temp: this.temp
});
}
......@@ -82,18 +86,18 @@ export class EditPage {
//上移
itemUp(index) {
if(index!= 0){
this.swapArray(this.contentList, index, index-1);
}else{
if (index != 0) {
this.swapArray(this.contentList, index, index - 1);
} else {
alert('已经处于置底,无法下移');
}
}
//下移
itemDown(index) {
if(index+1 != this.contentList.length){
this.swapArray(this.contentList, index, index+1);
}else{
if (index + 1 != this.contentList.length) {
this.swapArray(this.contentList, index, index + 1);
} else {
// alert('已经处于置顶,无法上移');
}
}
......@@ -131,7 +135,7 @@ export class EditPage {
//设置
set() {
this.navCtrl.push('SetPage', {
temp: this.temp
id: this.temp.id
});
}
......@@ -139,18 +143,17 @@ export class EditPage {
save() {
const bodyData = {
title:this.temp.title, //问卷标题
explai:this.temp.explai, //问卷说明
usergroup:this.temp.usergroup, //用户组id
isopen:this.temp.isopen, //是否公开
isans:this.temp.isans, //是否匿名
state:this.temp.state //状态
title: this.temp.title, //问卷标题
explai: this.temp.explai, //问卷说明
usergroup: this.temp.usergroup, //用户组id
isopen: this.temp.isopen, //是否公开
isans: this.temp.isans, //是否匿名
state: this.temp.state //状态
};
//更新问卷信息
this.appService.ObserverHttpForm('/wisdomgroup/modules/question/update/',this.temp.id,bodyData).
subscribe((res)=>{
this.appService.ObserverHttpForm('/wisdomgroup/modules/question/update/', this.temp.id, bodyData).subscribe((res) => {
},(err)=>{
}, (err) => {
});
......
......@@ -13,12 +13,12 @@
<ion-item>
<ion-label>问卷结果公开</ion-label>
<ion-toggle [(ngModel)]="temp.isopen"></ion-toggle>
<ion-toggle [(ngModel)]="isopen"></ion-toggle>
</ion-item>
<ion-item>
<ion-label>匿名回答</ion-label>
<ion-toggle [(ngModel)]="temp.isans"></ion-toggle>
<ion-toggle [(ngModel)]="isans"></ion-toggle>
</ion-item>
</ion-list>
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppService} from "../../../../service/appHttpService";
@IonicPage()
@Component({
selector: 'page-set',
templateUrl: 'set.html',
selector: 'page-set',
templateUrl: 'set.html',
})
export class SetPage {
id; // 问卷ID;
isans; //匿名
isopen; //公开
temp = {
id:'',
isopen:null,
isans:null,
title:'',
explai:'',
usergroup:'',
state:''
id: '',
isopen: null,
isans: null,
title: '',
explai: '',
usergroup: '',
state: ''
};
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.temp = this.navParams.get('temp');
console.log(this.temp);
}
save(){
if( this.temp.isans == true || this.temp.isans == 1 ){
this.temp.isans = 1;
}else{
this.temp.isans = 0;
}
if( this.temp.isopen == true || this.temp.isopen == 1 ){
this.temp.isopen = 1;
}else{
this.temp.isopen = 0;
}
const data = {
id:this.temp.id,
title:this.temp.title, //问卷标题
explai:this.temp.explai, //问卷说明
usergroup:this.temp.usergroup, //用户组id
isopen:this.temp.isopen, //是否公开
isans: this.temp.isans, //是否匿名
state:this.temp.state //状态
};
console.log(this.temp);
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
}
ionViewDidLoad() {
this.id = this.navParams.get('id');
this.appService.ObserverHttpPostAdd('/wisdomgroup/modules/question/edit/', this.id).subscribe((res) => {
this.temp = res.json().data;
if (this.temp.isans == 1) {
this.isans = true;
} else {
this.isans = false;
}
if (this.temp.isopen == 1) {
this.isopen = true;
} else {
this.isopen = false;
}
});
}
save() {
//是否匿名
console.log(this.isans);
if (this.isans == true || this.isans == 1) {
this.temp.isans = 1;
} else {
this.temp.isans = 2;
}
console.log(this.temp.isans);
//是否公开问卷结果
if (this.isopen == true || this.isopen == 1) {
this.temp.isopen = 1;
} else {
this.temp.isopen = 0;
}
const data = {
id: this.temp.id,
title: this.temp.title, //问卷标题
explai: this.temp.explai, //问卷说明
usergroup: this.temp.usergroup, //用户组id
isopen: this.temp.isopen, //是否公开
isans: this.temp.isans, //是否匿名
state: this.temp.state //状态
};
this.appService.ObserverHttpPost('/wisdomgroup/modules/question/updateOnApp', data)
.subscribe((res)=>{
if(res){
.subscribe((res) => {
if (res) {
this.navCtrl.pop();
}
})
}
}
}
......@@ -54,7 +54,7 @@
<p class="survey-title">{{temp?.title}}</p>
<div class="footter-opr">
<div *ngIf="swiperIndex == 0" (click)="edit()"><span>编辑</span></div>
<div *ngIf="swiperIndex == 1" (click)="look()"><span>查看</span></div>
<div *ngIf="swiperIndex == 1" (click)="edit()"><span>查看</span></div>
<div *ngIf="swiperIndex == 1" (click)="overDue()"><span>设为过期</span></div>
<div *ngIf="swiperIndex == 0" (click)="release()"><span>发布</span></div>
<div *ngIf="swiperIndex == 1 || swiperIndex == 2" (click)="result()"><span>结果</span></div>
......
......@@ -139,7 +139,23 @@ export class ListPage {
})
}
)
}
//取消发布
cancel(){
// 0 清除 1 不清除
const data = {
'isdelete':'0'
}
this.appService.alert('确定取消发布该问卷吗',
(res) => {
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/cancel/', this.temp.id)
.subscribe((res) => {
this.appService.popToastView('取消发布成功','middle',1000);
this.selectPageMenu(this.swiperIndex);
})
}
)
}
//结果
......
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