tempUser.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <div class="context">
  3. <div class="panel">
  4. <h5>临时会员</h5>
  5. <div class="panel-body">
  6. <div class="panel_control">
  7. <el-row :gutter="20">
  8. <el-col :span="5">
  9. <em>姓名:</em>
  10. <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
  11. </el-col>
  12. <el-col :span="5">
  13. <em>手机号:</em>
  14. <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
  15. </el-col>
  16. <el-col :span="3">
  17. <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
  18. </el-button>
  19. </el-col>
  20. </el-row>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="change">
  25. <el-button @click="addMember" type="primary" size="mini">新增临时会员</el-button>
  26. <el-button @click="delList" size="mini">删除临时会员</el-button>
  27. </div>
  28. <div class="table">
  29. <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
  30. element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
  31. @current-change="clickChange">
  32. >
  33. <el-table-column label="选择" width="55" fixed>
  34. <template slot-scope="scope">
  35. <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="序号" type="index" width="50" align="center" fixed>
  39. <template scope="scope">
  40. <span>{{(start) + scope.$index + 1}}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column prop="UserName" label="会员名" width="90" fixed>
  44. </el-table-column>
  45. <el-table-column prop="Phone" label="手机号" width="110" fixed>
  46. </el-table-column>
  47. <el-table-column prop="UserInfo.head" label="头像" width="50">
  48. <template slot-scope="scope">
  49. <div class="demo-image__preview" v-if="scope.row.Head">
  50. <el-image style="width: 25px; height: 25px" :src="scope.row.Head"
  51. :preview-src-list="[scope.row.Head]">
  52. </el-image>
  53. </div>
  54. <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="StaticHr" label="静态心率" width="110" sortable>
  58. </el-table-column>
  59. <el-table-column prop="Height" label="身高(CM)" width="110" sortable>
  60. </el-table-column>
  61. <el-table-column prop="Weight" label="体重(KG)" width="110" sortable>
  62. <template slot-scope="scope">
  63. <span>{{scope.row.Weight / 10}}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="Sex" label="类型" align="center" width="80px" sortable>
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.Sex == 1">男</span>
  69. <span v-if="scope.row.Sex == 2">女</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column prop="Birthday" label="生日" width="110" :formatter="filterFmtDate" sortable>
  73. </el-table-column>
  74. <!--<el-table-column-->
  75. <!--prop="ClassInfo"-->
  76. <!--label="会员课程"-->
  77. <!--width="220px"-->
  78. <!--&gt;-->
  79. <!--<template slot-scope="scope">-->
  80. <!--<span class="lessonSpan" :style="{background:lesson.ClassColor}"-->
  81. <!--v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>-->
  82. <!--</template>-->
  83. <!--</el-table-column>-->
  84. <el-table-column prop="UserInfo.Memo" label="备注">
  85. <template slot-scope="scope">
  86. <el-popover placement="top" title="" width="200" trigger="hover" :content="scope.row.Memo">
  87. <span slot="reference" v-if="scope.row.Memo.length > 6">{{ scope.row.Memo.substr(0, 6) }}
  88. ....</span>
  89. </el-popover>
  90. <span v-if="scope.row.Memo.length <= 6">{{ scope.row.Memo }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column prop="UserInfo.Status" label="操作" width="160px">
  94. <template slot-scope="scope">
  95. <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
  96. v-if="userLevel != 4">编辑
  97. </el-button>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <br>
  102. <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
  103. @current-change="pageChange"
  104. :current-page.sync="cur_page"
  105. ></el-pagination>
  106. </div>
  107. <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" :width="form.btnType == 1 ?'650px':'650px'">
  108. <div class="dialogContent">
  109. <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
  110. <el-form ref="form" :model="form" label-width="80px">
  111. <el-form-item label="手机号" :required="true">
  112. <el-input v-model="form.phone"></el-input>
  113. </el-form-item>
  114. <el-form-item label="会员名" :required="true">
  115. <el-input v-model="form.name"></el-input>
  116. </el-form-item>
  117. <el-form-item label="备注">
  118. <el-input v-model="form.memo"></el-input>
  119. </el-form-item>
  120. <el-form-item label="身高" :required="true">
  121. <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
  122. </el-form-item>
  123. <el-form-item label="体重" :required="true">
  124. <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
  125. </el-form-item>
  126. <el-form-item label="静态心率">
  127. <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
  128. </el-form-item>
  129. <el-form-item label="性别" :required="true">
  130. <el-select v-model="form.sex " placeholder="">
  131. <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
  132. :value="item.value"></el-option>
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item label="出生年份" :required="true">
  136. <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
  137. </el-date-picker>
  138. </el-form-item>
  139. <el-form-item label="头像">
  140. <div class="upload">
  141. <el-upload class="avatar-uploader" :action=domain :http-request=upqiniu
  142. :show-file-list="false" :before-upload="beforeUpload">
  143. <!--<i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
  144. </el-upload>
  145. <img v-if="imageUrl" :src="imageUrl" class="avatar">
  146. <cropper :width="300" :height="300" :fixed-number="[1,1]"
  147. @subUploadSucceed="getShopImages"></cropper>
  148. <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
  149. </div>
  150. </el-form-item>
  151. </el-form>
  152. </div>
  153. </div>
  154. <div class="dialogFooter">
  155. <el-button :disabled="addDisabled" :loading="addDisabled" type="primary" size="small"
  156. v-if="form.btnType == 0" @click="confirmMember">确定
  157. </el-button>
  158. <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
  159. </el-button>
  160. <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
  161. </div>
  162. </el-dialog>
  163. </div>
  164. </template>
  165. <script>
  166. import Global from '../Global.js'
  167. import ImgCutter from 'vue-img-cutter'
  168. import {
  169. TmpUserQuery,
  170. TmpUserAdd,
  171. TmpUserEdit,
  172. TmpUserDel,
  173. testTable,
  174. testSelect
  175. } from "../api/getApiRes";
  176. import cropper from '@/components/cropper.vue'
  177. let qs = require('qs');
  178. export default {
  179. data() {
  180. return {
  181. imageUrl: '',
  182. token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
  183. domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
  184. qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
  185. tableData: [],
  186. tableRadio: [],
  187. userLevel: localStorage.userLevel,
  188. serachBtnStatus: false,
  189. addDisabled: false,
  190. start: 0,
  191. draw: 1,
  192. dialogTitle: '新增临时会员',
  193. dialogMemberVisible: false,//新增会员dialog
  194. sexOptions: [
  195. { value: 1, label: '男' },//性别 1:男, 2:女
  196. { value: 2, label: '女' },
  197. ],
  198. panel: {
  199. usercode: '',
  200. username: '',
  201. compname: '',
  202. keyword: '',
  203. USERCODE: '',
  204. endType: '',
  205. taskstatus: 99,
  206. draw: 1,
  207. start: 0,
  208. recordsTotal: 0,
  209. tableData: [],
  210. allTableData: [],
  211. limit: '10',
  212. multipleSort: false,
  213. loading: false,
  214. fileList: [],
  215. multipleSelection: [],
  216. detectedmac: '',
  217. vipType: '',
  218. expDay: '',
  219. vipOptions: vipOptions(0),
  220. endTypeOptions: endTypeOptions(),
  221. time1: globalBt(),
  222. },
  223. multipleSelection: [],
  224. pageination: {
  225. pageItem: 10,
  226. pageoptions: pageOptions(),
  227. total: 100,
  228. pageIndex: 1,
  229. },
  230. form: {
  231. phone: '',
  232. name: '',
  233. userCode: '',
  234. shopId: '',
  235. Id: '',
  236. userId: '',
  237. height: '',
  238. weight: '',
  239. staticHr: '',
  240. head: '',
  241. birthday: '',
  242. sex: 1,
  243. vipType: 1,
  244. normalhour: 0,
  245. newnormalhour: 0,
  246. gifthour: 0,
  247. newgifthour: 0,
  248. btnType: 0,//0新建,1编辑编辑
  249. memo: '',
  250. expTime: '',
  251. classlist: [],
  252. dialogdata: [],//穿梭待选
  253. dialogValue: [],//穿梭已选
  254. },
  255. }
  256. },
  257. mounted() {
  258. // 读取列表
  259. this.getTableQuery();
  260. },
  261. watch: {
  262. $route(to) {
  263. if (to.name == 'tempUser') {
  264. // 读取列表
  265. this.getTableQuery();
  266. }
  267. },
  268. },
  269. methods: {
  270. addMember() {
  271. this.clearForm();
  272. this.dialogMemberVisible = true;
  273. this.btnType = 0;
  274. this.form.btnType = 0;
  275. this.dialogTitle = '新增临时会员'
  276. },
  277. delList() {
  278. let that = this;
  279. if (this.tableRadio.length == 0) {
  280. that.$message.error("请先选中一条记录");
  281. return false
  282. }
  283. let detectorid = this.tableRadio.TuId;
  284. let param = {
  285. token: localStorage.token,
  286. tuId: detectorid,
  287. };
  288. let postdata = qs.stringify(param);
  289. this.$confirm('此操作将永久删除该临时会员, 是否继续?', '提示', {
  290. confirmButtonText: '确定',
  291. cancelButtonText: '取消',
  292. type: 'warning'
  293. }).then(() => {
  294. TmpUserDel(postdata).then(res => {
  295. let json = res;
  296. if (json.Code == 0) {
  297. that.$message({
  298. showClose: true,
  299. message: '选中的临时会员已删除!',
  300. type: 'success'
  301. });
  302. // 重载列表
  303. that.getTableQuery();
  304. } else {
  305. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  306. }
  307. });
  308. }).catch(() => {
  309. this.$message({
  310. type: 'info',
  311. message: '已取消删除'
  312. });
  313. });
  314. },
  315. clickChange(item) {
  316. this.tableRadio = item
  317. },
  318. // 确认提交新增会员
  319. confirmMember() {
  320. let that = this;
  321. // checkNum
  322. if (!that.form.phone) {
  323. this.$message.error('错了哦,手机号不能为空');
  324. return false
  325. }
  326. if (!globalCheckPhone(that.form.phone)) {
  327. this.$message.error('错了哦,手机号格式不正确');
  328. return false
  329. }
  330. if (!that.form.name) {
  331. this.$message.error('错了哦,会员名不能为空');
  332. return false
  333. }
  334. if (that.form.name.length > 8) {
  335. this.$message.error('错了哦,会员名字数超过8个字');
  336. return false
  337. }
  338. if (that.form.memo) {
  339. if (that.form.memo.length > 200) {
  340. this.$message.error('错了哦,备注字数超过200个字');
  341. return false
  342. }
  343. }
  344. if (!that.form.height) {
  345. this.$message.error('错了哦,身高不能为空');
  346. return false
  347. }
  348. if (!that.form.weight) {
  349. this.$message.error('错了哦,体重不能为空');
  350. return false
  351. }
  352. // if (!that.form.staticHr) {
  353. // this.$message.error('错了哦,静态心率不能为空');
  354. // return false
  355. // }
  356. if (!that.form.birthday) {
  357. this.$message.error('错了哦,出生年份不能为空');
  358. return false
  359. }
  360. let param = {
  361. token: localStorage.token,
  362. shopId: localStorage.shopId,
  363. phone: that.form.phone,
  364. name: that.form.name,
  365. sex: that.form.sex,
  366. birthday: nonTfmtDatetoLength(that.form.birthday, 10),
  367. height: that.form.height,
  368. weight: that.form.weight,
  369. staticHr: that.form.staticHr,
  370. head: that.form.head,
  371. memo: that.form.memo,
  372. };
  373. let postdata = qs.stringify(param);
  374. TmpUserAdd(postdata).then(res => {
  375. let json = res;
  376. if (json.Code == 0) {
  377. // 关闭弹窗
  378. that.dialogMemberVisible = false;
  379. // 重载列表
  380. that.getTableQuery();
  381. that.$message({
  382. showClose: true,
  383. message: '临时会员添加成功!',
  384. type: 'success'
  385. });
  386. } else {
  387. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  388. }
  389. })
  390. },
  391. // 编辑
  392. editMember(row) {
  393. let that = this;
  394. this.clearForm();
  395. this.form.phone = row.Phone;
  396. this.form.name = row.UserName;
  397. this.form.memo = row.Memo;
  398. this.imageUrl = row.Head;
  399. this.form.height = row.Height;
  400. this.form.weight = parseInt(row.Weight) / 10;
  401. this.form.staticHr = row.StaticHr;
  402. this.form.sex = row.Sex;
  403. this.form.birthday = row.Birthday;
  404. this.form.tuId = row.TuId;
  405. this.form.btnType = 1;
  406. this.form.shopId = localStorage.shopId;
  407. this.form.Id = row.Id;
  408. this.dialogMemberVisible = true;
  409. this.dialogTitle = '编辑会员'
  410. },
  411. confirmEditMember() {
  412. let that = this;
  413. // checkNum
  414. if (!that.form.phone) {
  415. this.$message.error('错了哦,手机号不能为空');
  416. return false
  417. }
  418. if (!globalCheckPhone(that.form.phone)) {
  419. this.$message.error('错了哦,手机号格式不正确');
  420. return false
  421. }
  422. if (!that.form.name) {
  423. this.$message.error('错了哦,会员名不能为空');
  424. return false
  425. }
  426. if (that.form.name.length > 8) {
  427. this.$message.error('错了哦,会员名字数超过8个字');
  428. return false
  429. }
  430. if (that.form.memo) {
  431. if (that.form.memo.length > 200) {
  432. this.$message.error('错了哦,备注字数超过200个字');
  433. return false
  434. }
  435. }
  436. if (!that.form.height) {
  437. this.$message.error('错了哦,身高不能为空');
  438. return false
  439. }
  440. if (!that.form.weight) {
  441. this.$message.error('错了哦,体重不能为空');
  442. return false
  443. }
  444. // if (!that.form.staticHr) {
  445. // this.$message.error('错了哦,静态心率不能为空');
  446. // return false
  447. // }
  448. if (!that.form.birthday) {
  449. this.$message.error('错了哦,出生年份不能为空');
  450. return false
  451. }
  452. let param = {
  453. token: localStorage.token,
  454. shopId: that.form.shopId,
  455. userId: that.form.Id,
  456. phone: that.form.phone,
  457. name: that.form.name,
  458. memo: that.form.memo,
  459. head: that.form.head,
  460. height: that.form.height,
  461. weight: that.form.weight,
  462. staticHr: that.form.staticHr,
  463. sex: that.form.sex,
  464. birthday: nonTfmtDatetoLength(that.form.birthday, 10),
  465. tuId: that.form.tuId
  466. };
  467. let postdata = qs.stringify(param);
  468. TmpUserEdit(postdata).then(res => {
  469. let json = res;
  470. if (json.Code == 0) {
  471. // 关闭弹窗
  472. that.dialogMemberVisible = false;
  473. // 重载列表
  474. that.getTableQuery();
  475. that.$message({
  476. showClose: true,
  477. message: '会员信息编辑成功!',
  478. type: 'success'
  479. });
  480. } else {
  481. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  482. }
  483. })
  484. },
  485. // 验证文件合法性
  486. beforeUpload(file) {
  487. const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
  488. const isLt2M = file.size / 1024 / 1024 < 70;
  489. if (!isJPG) {
  490. this.$message.error('上传头像图片只能是 JPG 格式!')
  491. }
  492. if (!isLt2M) {
  493. this.$message.error('上传头像图片大小不能超过 70MB!')
  494. }
  495. return isJPG && isLt2M
  496. },
  497. cutDown(e) {
  498. console.log(e);
  499. this.imageUrl = e.dataURL;
  500. this.upqiniu(e);
  501. },
  502. // 上传文件到七牛云
  503. upqiniu(req) {
  504. let that = this;
  505. const config = {
  506. headers: { 'Content-Type': 'multipart/form-data' }
  507. };
  508. let filetype = '';
  509. if (req.file.type === 'image/png') {
  510. filetype = 'png'
  511. } else {
  512. filetype = 'jpg'
  513. }
  514. // 重命名要上传的文件
  515. const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
  516. // 从后端获取上传凭证token
  517. let param = {
  518. token: localStorage.token,
  519. };
  520. let postdata = qs.stringify(param);
  521. this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
  522. const formdata = new FormData();
  523. formdata.append('file', req.file);
  524. formdata.append('token', res.data.QiNinToken);
  525. formdata.append('key', keyname);
  526. // 获取到凭证之后再将文件上传到七牛云空间
  527. this.axios.post(this.domain, formdata, config).then(res => {
  528. this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
  529. this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
  530. })
  531. })
  532. },
  533. // 查询按钮
  534. query() {
  535. let that = this;
  536. that.start = 0;
  537. that.cur_page = 1;
  538. that.serachBtnStatus = true;
  539. that.getTableQuery();
  540. that.$message.success('查询完毕');
  541. let totalTime = 2
  542. let clock = window.setInterval(() => {
  543. totalTime--
  544. if (totalTime < 0) {
  545. totalTime = 2;
  546. that.serachBtnStatus = false;
  547. }
  548. }, 1000)
  549. },
  550. // 页面数据查询
  551. getTableQuery() {
  552. let that = this;
  553. that.loading = true;
  554. let param = {
  555. token: localStorage.token,
  556. shopId: that.panel.shopId,//
  557. name: that.panel.name,//
  558. expDay: that.panel.expDay,//
  559. start: that.start,//
  560. tableMax: 10,//
  561. };
  562. let postdata = qs.stringify(param);
  563. TmpUserQuery(postdata).then(res => {
  564. let json = res;
  565. if (json.Code == 0) {
  566. that.loading = false;
  567. if (json.Rs) {
  568. that.allTableData = json.Rs;
  569. that.recordsTotal = json.PageCount * that.pageination.pageItem;
  570. } else {
  571. that.allTableData = [];
  572. that.recordsTotal = 0;
  573. }
  574. // 设置分页数据
  575. that.setPaginations();
  576. } else {
  577. that.$message.error(json.Memo + ' 错误码:' + json.Code);
  578. }
  579. })
  580. },
  581. clearForm() {
  582. // clear
  583. this.form.name = '';
  584. this.form.head = '';
  585. this.imageUrl = '';
  586. this.form.phone = '';
  587. this.form.memo = '';
  588. this.form.normalhour = 0;
  589. this.form.gifthour = 0;
  590. this.form.height = '';
  591. this.form.weight = '';
  592. this.form.staticHr = '';
  593. this.form.sex = 1;
  594. this.form.birthday = '';
  595. this.form.userCode = '';
  596. this.form.shopId = '';
  597. this.form.classlist = [];
  598. },
  599. handleSelectionChange(val) {
  600. this.multipleSelection = val;
  601. },
  602. // 设置分页数据
  603. setPaginations() {
  604. // 分页属性
  605. let that = this;
  606. that.pageination.total = that.recordsTotal;
  607. // 默认分页
  608. that.tableData = that.allTableData.filter((item, index) => {
  609. return index < that.pageination.pageItem;
  610. });
  611. },
  612. // 每页显示数量
  613. handleSizeChange() {
  614. let that = this;
  615. that.tableData = that.allTableData.filter((item, index) => {
  616. return index < that.pageination.pageItem;
  617. });
  618. that.draw = that.pageination.pageItem;
  619. // that.getTableQuery();
  620. },
  621. // 翻页
  622. pageChange(pageIndex) {
  623. let that = this;
  624. // 获取当前页
  625. let index = that.pageination.pageItem * (pageIndex - 1);
  626. // 数据总数
  627. let nums = that.pageination.pageItem * pageIndex;
  628. // 容器
  629. let tables = [];
  630. for (var i = index; i < nums; i++) {
  631. if (that.allTableData[i]) {
  632. tables.push(that.allTableData[i])
  633. }
  634. this.tableData = tables;
  635. }
  636. that.start = index * that.draw;
  637. console.log(index);
  638. console.log(that.draw);
  639. that.getTableQuery();
  640. },
  641. // 过滤时间
  642. filterFmtDate(value, row, column) {
  643. return nonTfmtDatetoLength(column, 11);
  644. },
  645. // 海报上传成功
  646. getShopImages(url) {
  647. this.imageUrl = url;
  648. this.form.head = url;
  649. }
  650. },
  651. components: {
  652. cropper
  653. }
  654. }
  655. </script>
  656. <style scoped>
  657. @import "../assets/css/panel.css";
  658. .context {
  659. border-radius: 12px;
  660. /* height: 770px; */
  661. overflow-y: scroll;
  662. display: block;
  663. margin: 0 auto;
  664. background-color: #fff !important;
  665. padding: 30px;
  666. padding-bottom: 30px;
  667. }
  668. .panel-body {
  669. padding: 20px;
  670. background: #F0F2F5;
  671. }
  672. .change {
  673. width: 100%;
  674. overflow: hidden;
  675. display: block;
  676. margin: 0 auto;
  677. padding-top: 10px;
  678. padding-bottom: 10px;
  679. }
  680. .change button {
  681. float: left;
  682. }
  683. .change button.pull-right {
  684. float: right;
  685. }
  686. .dialogContent {
  687. width: 100%;
  688. overflow: hidden;
  689. display: block;
  690. margin: 0 auto;
  691. }
  692. .dialogContent .pull-left {
  693. width: 100%;
  694. float: left;
  695. }
  696. .el-form-item {
  697. width: 50%;
  698. float: left;
  699. }
  700. </style>