SuperAdmin.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. <!-- 活动解析 -->
  2. <template>
  3. <div>
  4. <!-- table 表格 -->
  5. <el-row :gutter="20" class="main-items" >
  6. <!--数据监控-->
  7. <el-col :span="20" class="main" :offset="2">
  8. <el-row :gutter="20" class="main-header">
  9. <el-col :span="3"><div class="main-header-item" >注册老师数:18人</div></el-col>
  10. <el-col :span="3"><div class="main-header-item">活跃老师数:16人</div></el-col>
  11. <el-col :span="4"><div class="main-header-item">注册用户数:1128人</div></el-col>
  12. <el-col :span="4"><div class="main-header-item">活跃用户数:1008人</div></el-col>
  13. </el-row>
  14. <el-table
  15. :data="dataList"
  16. highlight-current-row
  17. size="medium"
  18. border
  19. stripe
  20. >
  21. <el-table-column
  22. label="小组管理员"
  23. header-align="center"
  24. >
  25. <template scope="scope">
  26. <img :src="scope.row.img" alt="" class="table-img">
  27. </template>
  28. </el-table-column>
  29. <el-table-column
  30. prop="names"
  31. label="小组人数"
  32. header-align="center"
  33. >
  34. </el-table-column>
  35. <el-table-column
  36. prop="number"
  37. label="老师出勤率"
  38. header-align="center"
  39. ></el-table-column>
  40. <el-table-column
  41. prop="time"
  42. label="作业批改总份数"
  43. header-align="center">
  44. </el-table-column>
  45. <el-table-column
  46. prop="allTime"
  47. label="作业批改总张数"
  48. header-align="center"
  49. >
  50. </el-table-column>
  51. <el-table-column
  52. prop="rate"
  53. label="批改平均用时"
  54. header-align="center"></el-table-column>
  55. <el-table-column
  56. prop="status"
  57. label="家长平均评分"
  58. header-align="center"></el-table-column>
  59. <el-table-column
  60. prop="status"
  61. label="是否在线"
  62. header-align="center"></el-table-column>
  63. <el-table-column prop="status" label="" header-align="center" width="250">
  64. <template scope="scope">
  65. <el-button type="success" plain @click="isShow(1)">小组详情</el-button>
  66. <el-button type="success" >管理员详情</el-button>
  67. </template>
  68. </el-table-column>
  69. </el-table>
  70. </el-col>
  71. <!-- 分页显示 -->
  72. <!--<el-pagination-->
  73. <!--background-->
  74. <!--class="all_pagination"-->
  75. <!--@size-change="handleSizeChange"-->
  76. <!--@current-change="pageChange"-->
  77. <!--:page-sizes="[10, 20, 30, 40]"-->
  78. <!--:page-size="10"-->
  79. <!--layout="total, sizes, prev, pager, next, jumper"-->
  80. <!--:total="filters.count">-->
  81. <!--</el-pagination>-->
  82. </el-row>
  83. <!--可分配老师-->
  84. <div class='showModel' @click="allShowModel(1)" v-if="hiddenModel"></div>
  85. <div class='model' v-if="hiddenModel">
  86. <div class='model-text'>
  87. <div class="model-manager">
  88. <div>校区管理员</div>
  89. <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)"></div>
  90. </div>
  91. <div class="model-items">
  92. <div class="model-items-first">
  93. <div>
  94. <img src="../../assets/img/user.jpg" alt="" class="model-items-first-img">
  95. <div class="model-items-first-left">
  96. <div>程歌(在线)</div>
  97. <div class="model-items-first-left-down">南方科技大学</div>
  98. </div>
  99. </div>
  100. <div>
  101. <el-button type="danger" plain round @click="isShow(2)"><i class="el-icon-bottom"></i><span>降级</span></el-button>
  102. </div>
  103. </div>
  104. <div class="model-items-other model-active">批改科目 : 语文、英语</div>
  105. <div class="model-items-other">批改年级 : 1~2年级、3~4年级</div>
  106. <div class="model-items-other model-active">可批改时间:<el-button type="info" round>周一</el-button></div>
  107. <div class="model-items-other">手机号 : 18832340987</div>
  108. <div class="model-items-other model-active-last">上次登录时间 : 2019.05.14 18:02</div>
  109. </div>
  110. </div>
  111. </div>
  112. <!--所有未批改作业-->
  113. <div class='showModel' @click="allShowModel(2)" v-if="isPigai"></div>
  114. <div class='model' v-if="isPigai">
  115. <div class='model-text'>
  116. <div class="model-text-items">
  117. <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(2)" class="model-text-items-close"></div>
  118. <div>是否要将程歌老师降级为普通批改老师?</div>
  119. </div>
  120. <div class="model-btn">
  121. <div class="model-btn-items main-gay">是</div>
  122. <div class="model-btn-items model-grdeen">否</div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </template>
  128. <script>
  129. import { mapGetters, mapActions } from "vuex";
  130. export default {
  131. components: { },
  132. name: "actvResolveLabel",
  133. props: {},
  134. data() {
  135. return {
  136. hiddenModel:false,
  137. isPigai:false,
  138. ItemList: [
  139. {
  140. text:'数据监控'
  141. },
  142. {
  143. text:'当天'
  144. },
  145. {
  146. text:'当月'
  147. },
  148. ],
  149. dataList:[
  150. {
  151. img:'../../assets/img/user.jpg',
  152. names:'阿三',
  153. number:'3',
  154. time:'14:22',
  155. allTime:'14:22',
  156. rate:'222',
  157. status:'22'
  158. },
  159. {
  160. img:'../../assets/img/user.jpg',
  161. names:'阿三',
  162. number:'3',
  163. time:'14:22',
  164. allTime:'14:22',
  165. rate:'222',
  166. status:'22'
  167. }
  168. ],
  169. filters: {
  170. actvNm: "",
  171. actvCrtUserId: "",
  172. actvType: "",
  173. actvSmallType: "",
  174. // 排序
  175. pageNo: 1,
  176. pageSize: 10,
  177. count: 0,
  178. orderField: "",
  179. orderAD: ""
  180. }
  181. };
  182. },
  183. watch: {},
  184. computed: {
  185. ...mapGetters(["getUser"])
  186. },
  187. methods: {
  188. ...mapActions(["setUser"]),
  189. selectTitle(k) {
  190. console.log(k);
  191. this.checkindex = k;
  192. },
  193. isShow(str){
  194. let _this = this;
  195. console.log(str)
  196. if (str == 1){
  197. _this.hiddenModel = true;
  198. _this.isPigai = false;
  199. } else if (str == 2){
  200. _this.isPigai = true;
  201. _this.hiddenModel = false;
  202. }
  203. },
  204. //关闭弹框
  205. allShowModel(str) {
  206. let _this = this;
  207. if (str == 1){
  208. _this.hiddenModel = false;
  209. } else if (str == 2){
  210. _this.isPigai = false;
  211. }
  212. },
  213. // 输入框按键方法
  214. keyCodeMethod(e) {
  215. if (e.keyCode === 13) return this.itemListReshow();
  216. },
  217. expandChange(row, expandRows) {
  218. for (let item of expandRows) {
  219. if (row === item) {
  220. this.expandRowKeys = [row.nodId];
  221. }
  222. }
  223. },
  224. // 分页
  225. pageChange(val) {
  226. this.filters.pageNo = val;
  227. this.itemListReshow();
  228. },
  229. changeDateSlot(dateSlot) {
  230. if (dateSlot) {
  231. this.filters.startDate = dateSlot[0];
  232. this.filters.endDate = dateSlot[1];
  233. } else {
  234. this.filters.startDate = null;
  235. this.filters.endDate = null;
  236. }
  237. },
  238. actvTypeChange(typeList) {
  239. switch (typeList.length) {
  240. case 1:
  241. this.filters.actvType = typeList[0];
  242. this.filters.actvSmallType = null;
  243. break;
  244. case 2:
  245. this.filters.actvType = null;
  246. this.filters.actvSmallType = typeList[1];
  247. break;
  248. default:
  249. this.filters.actvType = null;
  250. this.filters.actvSmallType = null;
  251. break;
  252. }
  253. },
  254. handleSizeChange(val) {
  255. this.filters.pageSize = val;
  256. this.itemListReshow();
  257. },
  258. // 排序
  259. sortChange(sort) {
  260. this.filters.orderField = sort.prop;
  261. this.filters.orderAD = sort.order != null ? sort.order : "";
  262. this.itemListReshow();
  263. },
  264. clearSearch() {
  265. this.filters.actvNm = null;
  266. this.filters.actvCrtUserId = null;
  267. this.filters.actvType = null;
  268. this.filters.actvSmallType = null;
  269. this.filtersActvType = [];
  270. this.createDateSlot = null;
  271. },
  272. // 获取创建人列表
  273. // async getUserNameList() {
  274. // let {
  275. // userNameList = []
  276. // } = await this.$dao.actv.marketActDao.getUserNameList();
  277. // this.userNameList = userNameList || [];
  278. // let { list = [] } = await this.$dao.bsnsActvTypeAllList();
  279. // this.actvTypeList = list || [];
  280. // }
  281. },
  282. mounted() {
  283. // this.getsetDictByType2();
  284. // this.getUserNameList();
  285. // this.itemListReshow();
  286. }
  287. };
  288. </script>
  289. <!-- Add "scoped" attribute to limit CSS to this component only -->
  290. <style scoped>
  291. .main{
  292. background-color: #fff;
  293. margin-top: 16px;
  294. padding: 0 !important;
  295. border: 1px solid #E1E1E1;
  296. min-height: 980px;
  297. }
  298. .table-aside{
  299. color: #666666;
  300. font-size: 18px;
  301. text-align: center;
  302. line-height: 60px;
  303. }
  304. el-table{
  305. color: #999999;
  306. font-size: 18px;
  307. }
  308. .main-items{
  309. color: #393939;
  310. text-align: center;
  311. line-height: 80px;
  312. }
  313. .main-header-item{
  314. font-size: 16px;
  315. color: #7E7E7E;
  316. }
  317. .main-header-link{
  318. color: #52CC60;
  319. font-size: 18px;
  320. margin-left: 10px;
  321. text-decoration:underline
  322. }
  323. .el-select{
  324. width: 100px;
  325. margin: 0 5px;
  326. }
  327. .input-with-select .el-input-group__prepend {
  328. background-color: #fff;
  329. }
  330. .active{
  331. background-color: #52CC60;
  332. color: #fff;
  333. }
  334. .el-input__inner{
  335. height: 32px;
  336. }
  337. .cell{
  338. font-size: 18px !important;
  339. }
  340. .table-img{
  341. width:36px;
  342. height:36px;
  343. border-radius:6px;
  344. }
  345. .showModel{
  346. width: 100%;
  347. height: 100%;
  348. position: fixed;
  349. top: 0;
  350. left: 0;
  351. background: #000000;
  352. opacity: 0.2;
  353. overflow: hidden;
  354. z-index: 1000;
  355. color: #fff;
  356. }
  357. .model{
  358. z-index: 1001;
  359. width:40%;
  360. height:auto;
  361. position: fixed;
  362. top: 30%;
  363. left: 30%;
  364. margin:auto;
  365. background: #fff;
  366. border-radius:30px;
  367. text-align: center;
  368. }
  369. .model-items-first{
  370. padding: 0 34px;
  371. display: flex;
  372. justify-content: space-between;
  373. }
  374. .model-items-first-img{
  375. width: 68px;
  376. height: 68px;
  377. border-radius: 8px;
  378. position: relative;
  379. bottom: 20px;
  380. }
  381. .model-items-first-left{
  382. display: inline-block;
  383. color: #393939;
  384. font-size: 24px;
  385. margin-left: 14px;
  386. text-align: left;
  387. }
  388. .model-items-first-left-down{
  389. color: #7E7E7E;
  390. font-size: 18px;
  391. }
  392. .model-text{
  393. background:rgba(255,255,255,1);
  394. border-radius:10px;
  395. }
  396. .model-items-other{
  397. height: 60px;
  398. line-height: 60px;
  399. color: #393939;
  400. font-size: 20px;
  401. text-align: left;
  402. padding: 0 34px;
  403. }
  404. .model-active{
  405. background-color: #F6F7FB;
  406. }
  407. .model-active-last{
  408. border-radius:0 0 30px 30px;
  409. background-color: #F6F7FB;
  410. }
  411. .model-text-head{
  412. padding: 40px 50px;
  413. display: flex;
  414. color: #393939;
  415. font-size: 24px;
  416. justify-content: space-between;
  417. }
  418. .model-manager{
  419. display: flex;
  420. justify-content: space-between;
  421. margin: 30px;
  422. color: #393939;
  423. font-size: 24px;
  424. }
  425. .model-btn{
  426. display: flex;
  427. justify-content: space-around;
  428. margin-bottom: 44px;
  429. }
  430. .model-btn-items{
  431. width:154px;
  432. height:50px;
  433. line-height: 50px;
  434. text-align: center;
  435. font-size: 18px;
  436. border-radius:4px;
  437. }
  438. .main-gay{
  439. background:rgba(246,247,251,1);
  440. color: #7E7E7E;
  441. }
  442. .model-grdeen{
  443. background-color: #52CC60;
  444. color: #fff;
  445. }
  446. .model-text-items-close{
  447. position: absolute;
  448. top: 10px;
  449. right: 15px;
  450. }
  451. .model-text-items{
  452. position: relative;
  453. color: #000000;
  454. font-size: 24px;
  455. text-align: center;
  456. padding: 40px 0 50px 0;
  457. }
  458. </style>