import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
        stage: null,
        layer:null,
        mode: '',
        uploadUrl: '',
        newboardUrl: 'https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/pdffiles/20200708/1280687394751905792/白板PDF_20200708101723.pdf',
        //newboardUrl:'https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/pdffiles%2F20200708%2F1280750011705065472%2FMS-PPTX.pdf',
        // uploadUrl:'',
        imgArr: [],
        imgArrOld: [],
        addNew: false,
        deletePage:false, //刪除一頁
        deletePageNum:0,
        pen: null,//画笔方法
        textSize: 20,
        textColor: 'red',
        penType: 'pencil-alt',
        penType2: 'pencil-alt',
        strokeColor: 'red',
        strokeWidth: 1,
        laserColor: '#B2028A',
        laserStrokeWidth: 5,
        shapeTypeIcon: 'shapes',
        shapeType: 'circle',
        shapeColor: '',
        shapeBorderColor: 'red',
        ques: '',
        zoom: 1,//放大
        zoomType: 'hand',
        eraser: 'eraser',
        question: {//提问的选项
            submit: '0',
            text: '1',
            textselectA: '11',
            textselectB: '12',
            textselectC: '13',
            textselectD: '14',
        },
        irsBack:
            [
                //{ id: "匿名", studentName: "匿名", sendTime: "2020-01-08 16:02", value: "哈喽，示例" },
            ],
        pdftext:[],//当前PDF内的文字收集内容
        totalcontent: [],//所有页面IRS与文字模式内容
        checkvalue:'checkbtn',//选择按钮的值
        students: [
            // {
            //   sort:1,
            //   id:'123',
            //   studentName:'王明',
            //   sendTime:'123456546',
            //   headImg:'https://cdn.quasar.dev/img/avatar.png',
            //   singScore:10,
            //   totalScore:20,
            //   option:'A',
            // },
            // {
            //   sort:2,
            //   id:'123',
            //   studentName:'张明2',
            //   sendTime:'123456546',
            //   headImg:'https://cdn.quasar.dev/img/avatar.png',
            //   singScore:10,
            //   totalScore:20,
            //   option:'A',
            // },
            // {
            //   sort:3,
            //   id:'123',
            //   studentName:'李明3',
            //   sendTime:'123456546',
            //   headImg:'https://cdn.quasar.dev/img/avatar.png',
            //   singScore:10,
            //   totalScore:20,
            //   option:'A',
            // },
        ],
        answernum: '0',
        noanswernum: '0',
        rightanswernum: '0',
        erroranswernum: '0',
        carousel: '',
        carouselSlide: 1,//当前页数
        totalpage:'1',
        oldSlide: 1,
        answerstatus: 0,
        dynamicanswerstatus: 0,
        echartbaranswer: '',
        answervalue: '',
        userLoginStatus:'',
        userLogin: { //用户信息，刷新后保持登录状态
            token: '',
            userdeviceid: '',
            userloginBack: '',
            usermqtt: '',
            userClassNum:'',
        },
        stickyNoteDatas:[], 
        //关联CSS的value
        cssvalue: '0',
        //设定答案状态值
        answerpattern: 'letter',
        //IRS开关值 
        IRSswitch: true,
        //柱状图默认选项呈现
        AnswerSelect: ["A","B","C","D"],
        AnswerNumselect: ["1", "2", "3", "4"],
        //PPTX解析
        fileAnalysis: '',
        AfterParsing: {},
        //作品收集
        worksArr: [],
        //作品收集开关
        workswitch:false,
  mutations: {

        }
  },
  actions: {
    increment(context, payload) {
      context.commit('increment', payload)
    }
  },
    userinformation: {
        deviceId: '',
        classNum: '',
        TWtoken: '',
        mqtts: '',
        loginBack: '',
        serviceUrl:''
    }
})
