systemNotifyModel.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <div class="systemNotifyModel">
  3. <div class="m-core">
  4. <el-form :model="form"
  5. :rules="rules"
  6. ref="form"
  7. label-width="110px"
  8. style="width: 100%">
  9. <el-form-item label="标题"
  10. prop="title">
  11. <el-input v-model.trim="form.title" placeholder="请输入标题"></el-input>
  12. </el-form-item>
  13. <el-form-item label="排序值">
  14. <el-input v-model.trim="form.order" placeholder="请输入排序值" type="number"></el-input>
  15. </el-form-item>
  16. <el-form-item label="所属分部"
  17. prop="organIdList">
  18. <select-all v-model.trim="form.organIdList"
  19. style="width: 400px !important"
  20. filterable
  21. placeholder="请选择分部"
  22. multiple
  23. clearable>
  24. <el-option v-for="(item,index) in selects.branchs"
  25. :key="index"
  26. :label="item.name"
  27. :value="item.id"></el-option>
  28. </select-all>
  29. </el-form-item>
  30. <el-form-item label="是否使用外链">
  31. <el-radio-group v-model="outUrlRadio">
  32. <el-radio :label="1">是</el-radio>
  33. <el-radio :label="0">否</el-radio>
  34. </el-radio-group>
  35. </el-form-item>
  36. <el-form-item label="外链地址"
  37. prop="linkUrl"
  38. v-if="outUrlRadio == 1"
  39. :rules='[{ required: true, message: "请输入外链地址", trigger: "blur" }]'>
  40. <el-input v-model.trim="form.linkUrl" placeholder="请输入外链地址"></el-input>
  41. </el-form-item>
  42. <!-- <el-form-item label="自动开启时间" prop="actionTime" :rules="[{required: true, message: '请选择自动开启时间范围', trigger: 'change'}]">
  43. <el-date-picker style="width:400px;"
  44. v-model="form.actionTime"
  45. :clearable="false"
  46. type="datetimerange"
  47. range-separator="至"
  48. :picker-options="{ firstDayOfWeek: 1 }"
  49. start-placeholder="开始日期"
  50. end-placeholder="结束日期">
  51. </el-date-picker>
  52. </el-form-item> -->
  53. <el-form-item label="内容"
  54. prop="content"
  55. v-if="outUrlRadio == 0"
  56. :rules="[{ required: true, message: '请编辑内容', trigger: 'blur' }]">
  57. <quill-editor class="ql-editor" style="margin-top: -17px;"
  58. v-model="form.content"
  59. ref="myQuillEditor"
  60. :options="editorOption"
  61. @change="onEditorChange($event)"></quill-editor>
  62. <el-upload class="ivu-upload"
  63. :show-upload-list="false"
  64. :headers="headers"
  65. :on-success="handleSuccess"
  66. accept=".jpg, .jpeg, .png, .gif"
  67. :max-size="2048"
  68. multiple
  69. action="/api-web/uploadFile">
  70. <Button icon="ios-cloud-upload-outline"></Button>
  71. </el-upload>
  72. </el-form-item>
  73. <el-form-item>
  74. <el-button @click="onSubmit('form')"
  75. type="primary">立即{{ pageType == "create" ? '创建' : '修改' }}</el-button>
  76. <el-button @click="onReSet('form')">重置</el-button>
  77. <el-button @click="onLook">预览</el-button>
  78. </el-form-item>
  79. </el-form>
  80. </div>
  81. <el-dialog title="插入视频" :append-to-body="true"
  82. width="500px"
  83. @close="onDialogClose('diologForm')"
  84. :visible.sync="dialogFormVisible">
  85. <el-form :model="dialogForm"
  86. ref="diologForm"
  87. :rules="dialogFormRules">
  88. <el-form-item label="封面图地址"
  89. prop="poster"
  90. :rules="[{required: uploadType == 2 ? true : false, message: '请上传封面图', trigger: 'blur'}]"
  91. label-width="120px">
  92. <el-upload class="avatar-uploader"
  93. style="line-height: 0;display: inline-block"
  94. action="/api-web/uploadFile"
  95. :headers="headers"
  96. :show-file-list="false"
  97. v-loading="uploadImgLoading"
  98. accept=".jpg, .jpeg, .png, .gif"
  99. :on-success="handleImgSuccess"
  100. :on-error="handleUploadImgError"
  101. :before-upload="beforeImgUpload">
  102. <img v-if="dialogForm.poster"
  103. :src="dialogForm.poster"
  104. class="avatar" />
  105. <i v-else
  106. class="el-icon-plus avatar-uploader-icon"></i>
  107. </el-upload>
  108. </el-form-item>
  109. <el-form-item label="视频类型"
  110. label-width="120px">
  111. <el-radio-group v-model="formRadio">
  112. <el-radio :label="1">外部链接</el-radio>
  113. <el-radio :label="2">上传</el-radio>
  114. </el-radio-group>
  115. </el-form-item>
  116. <el-form-item v-if="formRadio == 1"
  117. label="视频地址"
  118. label-width="120px"
  119. prop="url">
  120. <el-input v-model="dialogForm.url"
  121. style="width: 100%;"
  122. autocomplete="off"></el-input>
  123. </el-form-item>
  124. <el-form-item v-if="formRadio == 2"
  125. label="上传视频"
  126. label-width="120px"
  127. prop="videoUrl">
  128. <el-upload class="upload-demo"
  129. style="display: inline-block"
  130. v-loading="uploadLoading"
  131. action="/api-web/uploadFile"
  132. :before-upload="beforeUpload"
  133. :on-success="handleUploadSuccess"
  134. :on-error="handleUploadError"
  135. :show-file-list="false"
  136. accept=".mp4"
  137. :file-list="fileList"
  138. :on-exceed="handleExceed">
  139. <video style="width: 120px; height: 120px"
  140. v-if="dialogForm.videoUrl"
  141. type="video/mp4"
  142. preload="auto"
  143. :src="dialogForm.videoUrl"></video>
  144. <i v-else
  145. class="el-icon-plus avatar-uploader-icon"></i>
  146. </el-upload>
  147. <p class="imageSize">
  148. <!-- 广告管理 & 广告类型为 视频 -->
  149. <span v-if="uploadType == 2 && type == 8">上传视频尺寸建议:1242px * 2208px;</span><br />
  150. 只能上传mp4文件, 且不超过100M
  151. </p>
  152. </el-form-item>
  153. </el-form>
  154. <div slot="footer"
  155. class="dialog-footer">
  156. <el-button @click="dialogFormVisible = false">取 消</el-button>
  157. <el-button type="primary"
  158. @click="onVideoComfirm('diologForm')">确 定</el-button>
  159. </div>
  160. </el-dialog>
  161. <el-dialog width="375px" title="预览" :append-to-body="true" :visible.sync="lookVisible">
  162. <div class="sd-container">
  163. <h2>{{ dataInfo.title }}</h2>
  164. <div class="titleInfo">
  165. <p>{{ typeCheck(dataInfo.type) }}</p>
  166. <p>{{ dataInfo.updateTime }}</p>
  167. </div>
  168. <div class="msgWrap quill-editor ql-editor"
  169. v-html="dataInfo.content"></div>
  170. </div>
  171. </el-dialog>
  172. </div>
  173. </template>
  174. <script>
  175. import { newsQueryId, newsAdd, newsUpdate } from "@/api/contentManager";
  176. import { getToken } from "@/utils/auth";
  177. import { vaildStudentUrl } from "@/utils/validate";
  178. import "quill/dist/quill.core.css";
  179. import "quill/dist/quill.snow.css";
  180. import "quill/dist/quill.bubble.css";
  181. import Quill from "quill";
  182. import { quillEditor } from "vue-quill-editor";
  183. // 工具栏配置
  184. const toolbarOptions = [
  185. ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
  186. ["blockquote", "code-block"], // 引用 代码块
  187. [{ header: 1 }, { header: 2 }], // 1、2 级标题
  188. [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
  189. [{ script: "sub" }, { script: "super" }], // 上标/下标
  190. [{ indent: "-1" }, { indent: "+1" }], // 缩进
  191. // [{'direction': 'rtl'}], // 文本方向
  192. [{ size: ["small", false, "large", "huge"] }], // 字体大小
  193. [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
  194. [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
  195. [{ font: [] }], // 字体种类
  196. [{ align: [] }], // 对齐方式
  197. ["clean"], // 清除文本格式
  198. ["image", "video"] // 链接、图片、视频
  199. // ["link", "image", "video"] // 链接、图片、视频
  200. ];
  201. // 标题
  202. const titleConfig = {
  203. "ql-bold": "加粗",
  204. "ql-color": "颜色",
  205. "ql-font": "字体",
  206. "ql-code": "插入代码",
  207. "ql-italic": "斜体",
  208. // 'ql-link': '添加链接',
  209. "ql-background": "背景颜色",
  210. "ql-size": "字体大小",
  211. "ql-strike": "删除线",
  212. "ql-script": "上标/下标",
  213. "ql-underline": "下划线",
  214. "ql-blockquote": "引用",
  215. "ql-header": "标题",
  216. "ql-indent": "缩进",
  217. "ql-list": "列表",
  218. "ql-align": "文本对齐",
  219. "ql-direction": "文本方向",
  220. "ql-code-block": "代码块",
  221. "ql-formula": "公式",
  222. "ql-image": "图片",
  223. "ql-video": "视频",
  224. "ql-clean": "清除字体样式",
  225. "ql-upload": "文件"
  226. };
  227. // 这里引入修改过的video模块并注册
  228. import Video from "../../quill/video.js";
  229. import dayjs from 'dayjs'
  230. Quill.register(Video, true);
  231. export default {
  232. props: ['options'],
  233. name: "contentOperation",
  234. components: {
  235. quillEditor
  236. },
  237. data () {
  238. let that = this;
  239. const query = this.options
  240. return {
  241. uploadType: 1, // 上传类型
  242. uploadStatus: false,
  243. type: query.type,
  244. pageType: query.pageType,
  245. organId: null,
  246. headers: {
  247. Authorization: getToken()
  248. },
  249. content: null,
  250. dialogFormVisible: false,
  251. formRadio: 1,
  252. lookVisible: false,
  253. dataInfo: {
  254. title: '',
  255. type: query.type,
  256. updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
  257. content: null
  258. },
  259. editorIndex: 0, // 光标位置
  260. editorOption: {
  261. placeholder: "请输入内容",
  262. modules: {
  263. toolbar: {
  264. container: toolbarOptions,
  265. handlers: {
  266. image: function (value) {
  267. if (value) {
  268. // 调用iview图片上传
  269. document.querySelector(".ivu-upload .el-upload").click();
  270. } else {
  271. this.quill.format("image", false);
  272. }
  273. },
  274. video: function (value) {
  275. if (value) {
  276. that.dialogFormVisible = true;
  277. let editor = that.$refs.myQuillEditor.quill;
  278. // 光标所在位置
  279. that.editorIndex = editor.getSelection().index;
  280. } else {
  281. this.quill.format("image", false);
  282. }
  283. }
  284. }
  285. }
  286. }
  287. },
  288. dialogForm: {
  289. poster: null,
  290. url: null,
  291. videoUrl: null
  292. },
  293. uploadLoading: false,
  294. uploadImgLoading: false,
  295. fileList: [],
  296. dialogFormRules: {
  297. url: [{ required: true, message: "请输入视频地址", trigger: "blur" }],
  298. videoUrl: [{ required: true, message: "请上传视频", trigger: 'blur' }]
  299. },
  300. outUrlRadio: 0, // 是否使用外部连接,默认不使用
  301. form: {
  302. title: null,
  303. order: null,
  304. linkUrl: null,
  305. type: query.type,
  306. status: 0,
  307. content: null,
  308. organIdList: [],
  309. },
  310. rules: {
  311. title: [
  312. { required: true, message: "请输入标题", trigger: "blur" },
  313. { min: 2, max: 30, message: "长度在 2 到 30 个字符", trigger: "blur" }
  314. ],
  315. organIdList: [{ required: true, message: "请选择分部", trigger: "change" }],
  316. },
  317. imageSize: null,
  318. };
  319. },
  320. mounted () {
  321. this.$store.dispatch("setBranchs");
  322. this.init();
  323. },
  324. methods: {
  325. init () {
  326. this.getList();
  327. this.addQuillTitle();
  328. // this.form.type
  329. let tempTitle = {
  330. 1: "468px * 552px;图片不能超过 2M;",
  331. 2: "456px * 288px; 图片不能超过 2M;",
  332. 3: "686px * 140px; 图片不能超过 2M;",
  333. 4: "图片不能超过 2M;",
  334. 5: "图片不能超过 2M;",
  335. 6: "图片不能超过 2M;",
  336. 7: "图片不能超过 2M;",
  337. 8: "1242px * 2208px; 图片不能超过 2M;"
  338. };
  339. this.imageSize = tempTitle[this.form.type];
  340. this.$refs["form"].clearValidate();
  341. },
  342. onVideoComfirm (formName) {
  343. this.$refs[formName].validate(valid => {
  344. if (valid) {
  345. let dialogForm = this.dialogForm;
  346. // 编辑器输入视频
  347. // 获取富文本组件实例
  348. let quill = this.editor;
  349. // 插入图片,res为服务器返回的图片链接地址
  350. const params = {
  351. poster: dialogForm.poster,
  352. url: this.formRadio == 1 ? dialogForm.url : dialogForm.videoUrl,
  353. }
  354. quill.insertEmbed(this.editorIndex, "video", params);
  355. // 调整光标到最后
  356. quill.setSelection(this.editorIndex + 1, { preload: false });
  357. this.dialogFormVisible = false;
  358. this.dialogForm = {
  359. poster: null,
  360. url: null,
  361. videoUrl: null
  362. };
  363. } else {
  364. return false;
  365. }
  366. });
  367. },
  368. onDialogClose (diologForm) {
  369. this.dialogForm = {
  370. poster: null,
  371. url: null,
  372. videoUrl: null
  373. }
  374. this.$refs[diologForm].resetFields()
  375. },
  376. addQuillTitle () {
  377. const oToolBar = document.querySelector(".ql-toolbar"),
  378. aButton = oToolBar.querySelectorAll("button"),
  379. aSelect = oToolBar.querySelectorAll("select");
  380. aButton.forEach(function (item) {
  381. if (item.className === "ql-script") {
  382. item.value === "sub" ? (item.title = "下标") : (item.title = "上标");
  383. } else if (item.className === "ql-indent") {
  384. item.value === "+1"
  385. ? (item.title = "向右缩进")
  386. : (item.title = "向左缩进");
  387. } else {
  388. item.title = titleConfig[item.classList[0]];
  389. }
  390. });
  391. aSelect.forEach(function (item) {
  392. item.parentNode.title = titleConfig[item.classList[0]];
  393. });
  394. },
  395. onSubmit (formName) {
  396. this.$refs[formName].validate(async (valid) => {
  397. if (valid) {
  398. let { organIdList, linkUrl, content, ...rest } = this.form
  399. if(this.outUrlRadio == 1) {
  400. content = null
  401. } else {
  402. linkUrl = null
  403. }
  404. let form = {
  405. ...rest,
  406. linkUrl,
  407. content,
  408. organIdList: organIdList ? organIdList.join(',') : null
  409. }
  410. if (this.pageType == "create") {
  411. if (form.id) {
  412. // 判断有没有Id,如果有则删除
  413. delete form.id;
  414. }
  415. // return false
  416. await newsAdd(form).then(res => {
  417. this.messageTips("添加", res);
  418. });
  419. } else if (this.pageType == "update") {
  420. await newsUpdate(form).then(res => {
  421. this.messageTips("修改", res);
  422. });
  423. }
  424. } else {
  425. this.$nextTick(() => {
  426. let isError = document.getElementsByClassName('is-error')
  427. isError[0].scrollIntoView({
  428. block: 'center',
  429. behavior: 'smooth',
  430. })
  431. })
  432. return false;
  433. }
  434. });
  435. },
  436. messageTips (title, res) {
  437. if (res.code == 200) {
  438. this.$message.success(title + "成功");
  439. this.$listeners.submited()
  440. this.$listeners.close()
  441. } else {
  442. this.$message.error(res.msg);
  443. }
  444. },
  445. handleSuccess (res) {
  446. // 获取富文本组件实例
  447. let quill = this.editor;
  448. // 如果上传成功
  449. if (res.code) {
  450. // 获取光标所在位置
  451. let length = quill.getSelection().index;
  452. // 插入图片,res为服务器返回的图片链接地址
  453. quill.insertEmbed(length, "image", res.data.url);
  454. // 调整光标到最后
  455. quill.setSelection(length + 1);
  456. } else {
  457. // 提示信息,需引入Message
  458. this.$message.error("图片插入失败");
  459. }
  460. },
  461. onReSet (formName) {
  462. const query = this.$route.query
  463. this.form = {
  464. title: null,
  465. order: null,
  466. linkUrl: null,
  467. type: query.type,
  468. status: 1,
  469. content: null,
  470. organIdList: []
  471. };
  472. this.$refs[formName].resetFields();
  473. },
  474. onLook () {
  475. // 预览
  476. let dataInfo = this.dataInfo
  477. dataInfo.title = this.form.title
  478. dataInfo.content = this.form.content
  479. // 处理图片显示问题
  480. setTimeout(() => {
  481. let imgNode = document.querySelectorAll(".msgWrap img");
  482. if (imgNode.length > 0) {
  483. imgNode.forEach(item => {
  484. item.style.width = "100%";
  485. });
  486. }
  487. let videoNode = document.querySelectorAll(".msgWrap .ql-video");
  488. if (videoNode.length > 0) {
  489. videoNode.forEach(item => {
  490. item.style.width = "100%";
  491. item.style.height = "195px";
  492. });
  493. }
  494. }, 500);
  495. this.lookVisible = true
  496. },
  497. async getList () {
  498. if (this.pageType == "create") {
  499. return;
  500. } else {
  501. await newsQueryId({ id: this.options.id }).then(res => {
  502. if (res.code == 200) {
  503. let result = res.data;
  504. let organ = result.organIdList ? result.organIdList.split(',') : []
  505. // 是否使用外部链接
  506. if(result.linkUrl) {
  507. this.outUrlRadio = 1
  508. } else {
  509. this.outUrlRadio = 0
  510. }
  511. this.form = {
  512. id: result.id,
  513. title: result.title,
  514. order: result.order,
  515. linkUrl: result.linkUrl,
  516. type: result.type,
  517. status: result.status,
  518. organIdList: organ.map(item => { return +item }),
  519. content: result.content
  520. };
  521. this.dataInfo.updateTime = result.updateTime
  522. }
  523. });
  524. }
  525. },
  526. handleUploadImgError (file) {
  527. this.uploadImgLoading = false
  528. this.$message.error('上传失败')
  529. },
  530. handleImgSuccess (res, file) {
  531. this.uploadImgLoading = false
  532. if (res.code == 200) {
  533. this.dialogForm.poster = res.data.url
  534. } else {
  535. this.$message.error('上传失败')
  536. }
  537. },
  538. beforeImgUpload (file) {
  539. const imageType = {
  540. "image/png": true,
  541. "image/jpeg": true,
  542. "image/gif": true
  543. };
  544. const isImage = imageType[file.type];
  545. const isLt2M = file.size / 1024 / 1024 < 2;
  546. if (!isImage) {
  547. this.$message.error("只能上传图片格式!");
  548. }
  549. if (!isLt2M) {
  550. this.$message.error("上传图片大小不能超过 2MB!");
  551. }
  552. if (isImage && isLt2M) {
  553. this.uploadImgLoading = true
  554. }
  555. return isImage && isLt2M;
  556. },
  557. typeCheck (type) {
  558. let params = {
  559. 1: '精彩活动',
  560. 2: '热门资讯',
  561. 4: '专项训练',
  562. 7: '知识库',
  563. 19: '系统通知',
  564. }
  565. return params[type] ? params[type] : '大雅乐盟'
  566. },
  567. typeIndex (type) {
  568. let tempTitle = {
  569. 1: 0,
  570. 2: 1,
  571. 3: 4,
  572. 4: 2,
  573. 5: 3,
  574. 6: 5,
  575. 7: 6,
  576. 8: 7,
  577. 19: 8
  578. };
  579. return tempTitle[type];
  580. },
  581. onEditorChange ({ quill, html, text }) {
  582. this.form.content = html;
  583. },
  584. beforeUpload (file) {
  585. // const isJPG = file.type === 'image/jpeg';
  586. const isLt2M = file.size / 1024 / 1024 < 100;
  587. // if (!isJPG) {
  588. // this.$message.error('上传头像图片只能是 JPG 格式!');
  589. // }
  590. if (!isLt2M) {
  591. this.$message.error('上传视频大小不能超过 100MB!');
  592. }
  593. this.uploadLoading = true
  594. return isLt2M;
  595. },
  596. handleUploadError (file) {
  597. this.uploadLoading = false
  598. this.$message.error('上传视频失败')
  599. },
  600. handleUploadSuccess (file, fileList) {
  601. this.uploadLoading = false
  602. if (file.code == 200) {
  603. this.$message.success('上传视频成功')
  604. this.dialogForm.videoUrl = file.data.url;
  605. } else {
  606. this.$message.error('上传视频失败')
  607. }
  608. },
  609. handleExceed (files, fileList) {
  610. this.$message.error('您已上传过视频')
  611. }
  612. },
  613. computed: {
  614. editor () {
  615. return this.$refs.myQuillEditor.quill;
  616. }
  617. }
  618. };
  619. </script>
  620. <style lang="scss" scoped>
  621. .systemNotifyModel {
  622. min-width: 100%;
  623. }
  624. .el-input {
  625. width: 400px;
  626. }
  627. /deep/.ql-editor {
  628. min-height: 300px;
  629. padding: 0;
  630. }
  631. /deep/.ql-container .ql-editor {
  632. max-height: 500px;
  633. padding: 15px;
  634. }
  635. .el-button--primary {
  636. background: #14928a;
  637. border-color: #14928a;
  638. color: #fff;
  639. &:hover,
  640. &:active,
  641. &:focus {
  642. background: #14928a;
  643. border-color: #14928a;
  644. color: #fff;
  645. }
  646. }
  647. .el-row {
  648. margin-top: 40px;
  649. }
  650. .el-col {
  651. display: flex;
  652. align-items: center;
  653. margin-bottom: 20px;
  654. justify-content: flex-end;
  655. margin-right: 50%;
  656. }
  657. .el-input-group {
  658. width: 200px;
  659. margin: 0 20px;
  660. }
  661. /deep/.el-tree-node__content {
  662. height: 40px !important;
  663. }
  664. /deep/.avatar-uploader .el-upload,
  665. /deep/.upload-demo .el-upload {
  666. border-radius: 6px;
  667. cursor: pointer;
  668. position: relative;
  669. overflow: hidden;
  670. }
  671. .avatar-uploader .el-upload:hover {
  672. border-color: #409eff;
  673. }
  674. .avatar-uploader-icon {
  675. border: 1px dashed #d9d9d9;
  676. font-size: 28px;
  677. color: #8c939d;
  678. width: 120px;
  679. height: 120px;
  680. line-height: 120px;
  681. text-align: center;
  682. }
  683. .avatar {
  684. width: 120px;
  685. height: 120px;
  686. display: block;
  687. }
  688. .ivu-upload {
  689. display: none;
  690. }
  691. .sd-container {
  692. // padding: 15px;
  693. h2 {
  694. height: auto;
  695. font-weight: 500;
  696. color: rgba(68, 68, 68, 1);
  697. line-height: 37px;
  698. font-size: 26px;
  699. margin-bottom: 10px;
  700. }
  701. .titleInfo {
  702. height: 15px;
  703. line-height: 15px;
  704. display: flex;
  705. flex-direction: row;
  706. justify-content: space-between;
  707. color: #444;
  708. margin-bottom: 25px;
  709. }
  710. .imgWrap {
  711. /* width: 100;
  712. height: 1.45rem; */
  713. margin-bottom: 0.15rem;
  714. p {
  715. font-size: 0.16rem;
  716. font-family: PingFangSC;
  717. font-weight: 400;
  718. color: rgba(68, 68, 68, 1);
  719. line-height: 0.28rem;
  720. text-indent: 0.32rem;
  721. }
  722. img {
  723. width: 100%;
  724. }
  725. }
  726. }
  727. .imageSize {
  728. color: red;
  729. line-height: 1.5;
  730. }
  731. </style>