WHeader.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. <template>
  2. <div class="w-header">
  3. <div v-if="tabActive" class="w-header-row">
  4. <div class="w-header-row-left">
  5. <Dropdown class="m768-show" @on-click="tabPage" trigger="click" transfer>
  6. <Icon type="md-menu" class="dropdown-menu"/>
  7. <DropdownMenu slot="list">
  8. <DropdownItem name="todo">{{$L('待办')}}</DropdownItem>
  9. <DropdownItem name="project">{{$L('项目')}}</DropdownItem>
  10. <DropdownItem name="docs">{{$L('知识库')}}</DropdownItem>
  11. <DropdownItem name="team">{{$L('团队')}}</DropdownItem>
  12. </DropdownMenu>
  13. </Dropdown>
  14. <ul class="m768-hide">
  15. <li :class="tabActive==='todo'?'active':''">
  16. <a href="javascript:void(0)" @click="tabPage('todo')"><i class="ft icon">&#xe89e;</i>{{$L('待办')}}</a>
  17. </li><li :class="tabActive==='project'?'active':''">
  18. <a href="javascript:void(0)" @click="tabPage('project')"><i class="ft icon">&#xe6b8;</i>{{$L('项目')}}</a>
  19. </li><li :class="tabActive==='docs'?'active':''">
  20. <a href="javascript:void(0)" @click="tabPage('docs')"><i class="ft icon">&#xe915;</i>{{$L('知识库')}}</a>
  21. </li><li :class="tabActive==='team'?'active':''">
  22. <a href="javascript:void(0)" @click="tabPage('team')"><i class="ft icon">&#xe90d;</i>{{$L('团队')}}</a>
  23. </li>
  24. </ul>
  25. </div>
  26. <div class="w-header-row-right">
  27. <Dropdown class="right-info" trigger="click" @on-click="setRightSelect" placement="bottom-end" transfer>
  28. <div>
  29. <UserImg class="userimg" :info="usrInfo"/>
  30. <span class="username">{{$L('欢迎您')}}, {{(usrInfo.nickname || usrInfo.username) || $L('尊敬的会员')}}</span>
  31. <Icon type="md-arrow-dropdown"/>
  32. </div>
  33. <Dropdown-menu slot="list">
  34. <Dropdown-item v-if="isAdmin" name="system">{{$L('系统设置')}}</Dropdown-item>
  35. <Dropdown-item name="user">{{$L('个人中心')}}</Dropdown-item>
  36. <Dropdown-item name="out">{{$L('退出登录')}}</Dropdown-item>
  37. </Dropdown-menu>
  38. </Dropdown>
  39. <div class="right-info" @click="chatDrawerShow=true">
  40. <Icon class="right-mticon-9" type="md-text" size="24"/>
  41. <em v-if="chatUnreadTotal > 0" class="right-info-num">{{chatUnreadTotal > 99 ? '99+' : chatUnreadTotal}}</em>
  42. </div>
  43. <Dropdown class="right-info" trigger="click" @on-click="setLanguage" transfer>
  44. <div>
  45. <Icon class="right-mticon" type="md-globe" size="24"/>
  46. <Icon type="md-arrow-dropdown"/>
  47. </div>
  48. <Dropdown-menu slot="list">
  49. <Dropdown-item name="zh" :selected="getLanguage() === 'zh'">中文</Dropdown-item>
  50. <Dropdown-item name="en" :selected="getLanguage() === 'en'">English</Dropdown-item>
  51. </Dropdown-menu>
  52. </Dropdown>
  53. </div>
  54. </div>
  55. <WDrawer v-model="systemDrawerShow" maxWidth="640" :title="$L('系统设置')">
  56. <Form ref="formSystem" :model="formSystem" :label-width="150" @submit.native.prevent>
  57. <FormItem :label="$L('首页Logo')">
  58. <ImgUpload v-model="formSystem.logo" :num="1"></ImgUpload>
  59. <span style="color:#777">{{$L('建议尺寸:%', '300x52')}}</span>
  60. </FormItem>
  61. <FormItem :label="$L('Github/Gitee图标')">
  62. <RadioGroup v-model="formSystem.github">
  63. <Radio label="show">{{$L('显示')}}</Radio>
  64. <Radio label="hidden">{{$L('隐藏')}}</Radio>
  65. </RadioGroup>
  66. </FormItem>
  67. <FormItem :label="$L('允许注册')">
  68. <RadioGroup v-model="formSystem.reg">
  69. <Radio label="open">{{$L('允许')}}</Radio>
  70. <Radio label="close">{{$L('禁止')}}</Radio>
  71. </RadioGroup>
  72. </FormItem>
  73. <FormItem :label="$L('音视频通话')">
  74. <RadioGroup v-model="formSystem.callav">
  75. <Radio label="open">{{$L('开启')}}</Radio>
  76. <Radio label="close">{{$L('关闭')}}</Radio>
  77. </RadioGroup>
  78. </FormItem>
  79. <FormItem :label="$L('完成自动归档')">
  80. <RadioGroup :value="formSystem.autoArchived" @on-change="formArchived">
  81. <Radio label="open">{{$L('开启')}}</Radio>
  82. <Radio label="close">{{$L('关闭')}}</Radio>
  83. </RadioGroup>
  84. <Tooltip v-if="formSystem.autoArchived=='open'" class="setting-auto-day" placement="right">
  85. <Input v-model="formSystem.archivedDay" type="number">
  86. <span slot="append">{{$L('天')}}</span>
  87. </Input>
  88. <div slot="content">{{$L('任务完成 % 天后自动归档。', formSystem.archivedDay)}}</div>
  89. </Tooltip>
  90. </FormItem>
  91. <FormItem>
  92. <Button :loading="loadIng > 0" type="primary" @click="handleSubmit('formSystem')">{{$L('提交')}}</Button>
  93. <Button :loading="loadIng > 0" @click="handleReset('formSystem')" style="margin-left: 8px">{{$L('重置')}}</Button>
  94. </FormItem>
  95. </Form>
  96. </WDrawer>
  97. <WDrawer v-model="userDrawerShow" maxWidth="1000">
  98. <Tabs v-model="userDrawerTab">
  99. <TabPane :label="$L('个人资料')" name="personal">
  100. <Form ref="formDatum" :model="formDatum" :rules="ruleDatum" :label-width="80" @submit.native.prevent>
  101. <FormItem :label="$L('头像')" prop="userimg">
  102. <ImgUpload v-model="formDatum.userimg" :num="1"></ImgUpload>
  103. <span style="color:#777">{{$L('建议尺寸:%', '200x200')}}</span>
  104. </FormItem>
  105. <FormItem :label="$L('账号')">
  106. <Input v-model="usrInfo.username" :disabled="true"></Input>
  107. </FormItem>
  108. <FormItem :label="$L('昵称')" prop="nickname">
  109. <Input v-model="formDatum.nickname"></Input>
  110. </FormItem>
  111. <FormItem :label="$L('职位/职称')" prop="profession">
  112. <Input v-model="formDatum.profession"></Input>
  113. </FormItem>
  114. <FormItem>
  115. <Button :loading="loadIng > 0" type="primary" @click="handleSubmit('formDatum')">{{$L('提交')}}</Button>
  116. <Button :loading="loadIng > 0" @click="handleReset('formDatum')" style="margin-left: 8px">{{$L('重置')}}</Button>
  117. </FormItem>
  118. </Form>
  119. </TabPane>
  120. <TabPane :label="$L('偏好设置')" name="setting">
  121. <Form ref="formSetting" :model="formSetting" :label-width="100" @submit.native.prevent>
  122. <FormItem :label="$L('系统皮肤')" prop="bgid">
  123. <ul class="setting-bg">
  124. <li v-for="i in [1,2,3,4,5,6,7,8,9,10,11,12]"
  125. :key="i"
  126. :style="`background-image:${getBgUrl(i, true)}`"
  127. :class="{active:formSetting.bgid==i}"
  128. @click="formSetting.bgid=i"></li>
  129. </ul>
  130. </FormItem>
  131. <FormItem>
  132. <Button :loading="loadIng > 0" type="primary" @click="handleSubmit('formSetting')">{{$L('提交')}}</Button>
  133. <Button :loading="loadIng > 0" @click="handleReset('formSetting')" style="margin-left: 8px">{{$L('重置')}}</Button>
  134. </FormItem>
  135. </Form>
  136. </TabPane>
  137. <TabPane :label="$L('账号密码')" name="account">
  138. <Alert v-if="usrInfo.changepass" type="warning" showIcon>{{$L('请先修改登录密码!')}}</Alert>
  139. <Form ref="formPass" :model="formPass" :rules="rulePass" :label-width="100" @submit.native.prevent>
  140. <FormItem :label="$L('旧密码')" prop="oldpass">
  141. <Input v-model="formPass.oldpass" type="password"></Input>
  142. </FormItem>
  143. <FormItem :label="$L('新密码')" prop="newpass">
  144. <Input v-model="formPass.newpass" type="password"></Input>
  145. </FormItem>
  146. <FormItem :label="$L('确认新密码')" prop="checkpass">
  147. <Input v-model="formPass.checkpass" type="password"></Input>
  148. </FormItem>
  149. <FormItem>
  150. <Button :loading="loadIng > 0" type="primary" @click="handleSubmit('formPass')">{{$L('提交')}}</Button>
  151. <Button :loading="loadIng > 0" @click="handleReset('formPass')" style="margin-left: 8px">{{$L('重置')}}</Button>
  152. </FormItem>
  153. </Form>
  154. </TabPane>
  155. <TabPane :label="$L('我创建的任务')" name="createtask">
  156. <header-create :canload="userDrawerShow && userDrawerTab == 'createtask'"></header-create>
  157. </TabPane>
  158. <TabPane :label="$L('我归档的任务')" name="archivedtask">
  159. <header-archived :canload="userDrawerShow && userDrawerTab == 'archivedtask'"></header-archived>
  160. </TabPane>
  161. </Tabs>
  162. </WDrawer>
  163. <WDrawer v-model="chatDrawerShow" :closable="false" maxWidth="1080" class="w-header-chat-draver">
  164. <chat-index v-model="chatUnreadTotal" :openWindow="chatDrawerShow" @on-open-notice="chatDrawerShow=true"></chat-index>
  165. <div class="w-header-chat-close" @click="chatDrawerShow=false"><Icon type="ios-close" /></div>
  166. </WDrawer>
  167. </div>
  168. </template>
  169. <style lang="scss">
  170. .w-header-chat-draver {
  171. .ivu-drawer-wrap,
  172. .ivu-drawer-mask {
  173. z-index: 1001;
  174. }
  175. .w-header-chat-close {
  176. position: absolute;
  177. bottom: 0;
  178. left: 0;
  179. z-index: 1;
  180. color: #ffffff;
  181. font-size: 32px;
  182. width: 68px;
  183. height: 58px;
  184. line-height: 58px;
  185. text-align: center;
  186. cursor: pointer;
  187. @media (max-width: 768px) {
  188. width: 50px;
  189. height: 50px;
  190. line-height: 50px;
  191. }
  192. > i {
  193. transition: all 0.2s;
  194. }
  195. &:hover {
  196. > i {
  197. transform: scale(1.12) rotate(90deg);
  198. }
  199. }
  200. }
  201. }
  202. </style>
  203. <style lang="scss" scoped>
  204. .w-header {
  205. z-index: 15;
  206. position: fixed;
  207. left: 0;
  208. top: 0;
  209. right: 0;
  210. font-size: 14px;
  211. background: #0396f2 linear-gradient(45deg, #0396f2 0%, #0285d7 100%);
  212. box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.25);
  213. .icon {
  214. font-size: 16px;
  215. margin-right: 3px;
  216. }
  217. .w-header-row {
  218. display: flex;
  219. color: #fff;
  220. height: 40px;
  221. position: relative;
  222. z-index: 10;
  223. margin: 0 32px;
  224. .w-header-row-left {
  225. flex: 1;
  226. white-space: nowrap;
  227. overflow: hidden;
  228. overflow-x: auto;
  229. -webkit-backface-visibility: hidden;
  230. -webkit-overflow-scrolling: touch;
  231. li {
  232. line-height: 40px;
  233. color: #fff;
  234. display: inline-block;
  235. a {
  236. color: #fff;
  237. display: block;
  238. min-width: 116px;
  239. text-align: center;
  240. &:visited {
  241. color: #fff;
  242. }
  243. &:hover {
  244. color: #f2f2f2;
  245. }
  246. }
  247. }
  248. li:hover, li.active {
  249. background: #0277c0;
  250. }
  251. }
  252. .w-header-row-right {
  253. white-space: nowrap;
  254. text-align: right;
  255. line-height: 40px;
  256. margin-right: -5px;
  257. .right-info {
  258. display: inline-block;
  259. position: relative;
  260. padding-left: 10px;
  261. padding-right: 10px;
  262. margin-right: -5px;
  263. cursor: pointer;
  264. &:hover {
  265. background: #0277c0;
  266. }
  267. .right-mticon {
  268. vertical-align: top;
  269. margin-top: 8px;
  270. }
  271. .right-mticon-9 {
  272. vertical-align: top;
  273. margin-top: 9px;
  274. }
  275. .right-info-num {
  276. position: absolute;
  277. top: 2px;
  278. left: 22px;
  279. height: auto;
  280. line-height: normal;
  281. color: #ffffff;
  282. background-color: #ff0000;
  283. text-align: center;
  284. border-radius: 10px;
  285. padding: 1px 5px;
  286. font-size: 12px;
  287. transform: scale(0.9);
  288. z-index: 1;
  289. }
  290. .userimg {
  291. display: none;
  292. width: 26px;
  293. height: 26px;
  294. margin-top: 7px;
  295. vertical-align: top;
  296. border-radius: 50%;
  297. }
  298. .username {
  299. display: inline-block;
  300. }
  301. }
  302. }
  303. @media (max-width: 768px) {
  304. margin: 0 16px;
  305. .w-header-row-left {
  306. .dropdown-menu {
  307. font-size: 28px;
  308. vertical-align: top;
  309. margin-top: 6px;
  310. }
  311. }
  312. .w-header-row-right {
  313. .right-info {
  314. padding-left: 8px;
  315. padding-right: 8px;
  316. .userimg {
  317. display: inline-block;
  318. }
  319. .username {
  320. display: none;
  321. }
  322. }
  323. }
  324. }
  325. }
  326. }
  327. .setting-auto-day {
  328. display: block;
  329. width: 110px;
  330. margin-top: 12px;
  331. line-height: 32px;
  332. margin-bottom: -10px;
  333. }
  334. .setting-bg {
  335. margin-top: 6px;
  336. margin-bottom: -24px;
  337. &:after,
  338. &:before {
  339. display: table;
  340. content: "";
  341. }
  342. li {
  343. margin: 0 16px 16px 0;
  344. width: 160px;
  345. height: 124px;
  346. display: inline-block;
  347. cursor: pointer;
  348. border: solid 2px #fff;
  349. background-repeat: no-repeat;
  350. background-position: center;
  351. background-size: cover;
  352. transition: all 0.2s;
  353. &.active,
  354. &:hover {
  355. border-color: #0396f2;
  356. transform: scale(1.02);
  357. }
  358. }
  359. }
  360. </style>
  361. <script>
  362. import ImgUpload from "./ImgUpload";
  363. import HeaderCreate from "./project/header/create";
  364. import HeaderArchived from "./project/header/archived";
  365. import ChatIndex from "./chat/Index";
  366. import WDrawer from "./iview/WDrawer";
  367. export default {
  368. name: 'WHeader',
  369. components: {WDrawer, ChatIndex, HeaderArchived, HeaderCreate, ImgUpload},
  370. data() {
  371. return {
  372. tabActive: '',
  373. loadIng: 0,
  374. isAdmin: false,
  375. systemDrawerShow: false,
  376. userDrawerShow: false,
  377. userDrawerTab: 'personal',
  378. formSystem: {
  379. github: 'show',
  380. reg: 'open',
  381. callav: 'open',
  382. autoArchived: 'close',
  383. archivedDay: 7,
  384. },
  385. formDatum: {
  386. userimg: '',
  387. nickname: '',
  388. profession: ''
  389. },
  390. ruleDatum: { },
  391. formPass: {
  392. oldpass: '',
  393. newpass: '',
  394. checkpass: '',
  395. },
  396. rulePass: { },
  397. formSetting: {
  398. bgid: 0,
  399. },
  400. chatDrawerShow: false,
  401. chatUnreadTotal: 0,
  402. }
  403. },
  404. mounted() {
  405. this.isAdmin = $A.identity('admin');
  406. this.formatDatum();
  407. //
  408. this.tabActive = this.$route.meta.tabActive;
  409. //
  410. if ($A.urlParameter("open") === 'chat' && $A.getToken() !== false) {
  411. this.chatDrawerShow = true;
  412. }
  413. },
  414. watch: {
  415. '$route' () {
  416. this.tabActive = this.$route.meta.tabActive;
  417. this.systemDrawerShow = false;
  418. this.chatDrawerShow = $A.urlParameter("open") === 'chat' && $A.getToken() !== false;
  419. if (!this.usrInfo.changepass) {
  420. this.userDrawerShow = false;
  421. }
  422. },
  423. usrName() {
  424. this.isAdmin = $A.identity('admin');
  425. this.formatDatum();
  426. }
  427. },
  428. methods: {
  429. initLanguage() {
  430. this.ruleDatum = {
  431. nickname: [
  432. { required: true, message: this.$L('请输入昵称!'), trigger: 'change' },
  433. { type: 'string', min: 2, message: this.$L('昵称长度至少2位!'), trigger: 'change' }
  434. ]
  435. };
  436. this.rulePass = {
  437. oldpass: [
  438. { required: true, message: this.$L('请输入旧密码!'), trigger: 'change' },
  439. { type: 'string', min: 6, message: this.$L('密码长度至少6位!'), trigger: 'change' }
  440. ],
  441. newpass: [
  442. {
  443. validator: (rule, value, callback) => {
  444. if (value === '') {
  445. callback(new Error(this.$L('请输入新密码!')));
  446. } else {
  447. if (this.formPass.checkpass !== '') {
  448. this.$refs.formPass.validateField('checkpass');
  449. }
  450. callback();
  451. }
  452. },
  453. required: true,
  454. trigger: 'change'
  455. },
  456. { type: 'string', min: 6, message: this.$L('密码长度至少6位!'), trigger: 'change' }
  457. ],
  458. checkpass: [
  459. {
  460. validator: (rule, value, callback) => {
  461. if (value === '') {
  462. callback(new Error(this.$L('请重新输入新密码!')));
  463. } else if (value !== this.formPass.newpass) {
  464. callback(new Error(this.$L('两次密码输入不一致!')));
  465. } else {
  466. callback();
  467. }
  468. },
  469. required: true,
  470. trigger: 'change'
  471. }
  472. ],
  473. };
  474. },
  475. formatDatum() {
  476. this.$set(this.formDatum, 'userimg', this.usrInfo.userimg)
  477. this.$set(this.formDatum, 'nickname', this.usrInfo.nickname)
  478. this.$set(this.formDatum, 'profession', this.usrInfo.profession)
  479. this.$set(this.formSetting, 'bgid', this.usrInfo.bgid)
  480. this.formDatum__reset = $A.cloneData(this.formDatum);
  481. this.formSetting__reset = $A.cloneData(this.formSetting);
  482. this.formPass__reset = $A.cloneData(this.formPass);
  483. this.changepass();
  484. },
  485. changepass() {
  486. if (this.usrInfo.changepass) {
  487. this.userDrawerShow = true;
  488. this.userDrawerTab = 'account';
  489. setTimeout(() => {
  490. this.changepass()
  491. }, 500);
  492. }
  493. },
  494. getBgUrl(id, thumb) {
  495. id = Math.max(1, parseInt(id));
  496. return 'url(' + window.location.origin + '/images/bg/' + (thumb ? 'thumb/' : '') + id + '.jpg' + ')';
  497. },
  498. tabPage(path) {
  499. this.goForward({path: '/' + path});
  500. },
  501. setRightSelect(act) {
  502. switch (act) {
  503. case 'system':
  504. this.systemSetting(false);
  505. this.systemDrawerShow = true;
  506. break;
  507. case 'user':
  508. this.userDrawerShow = true;
  509. break;
  510. case 'out':
  511. this.logout();
  512. break;
  513. }
  514. },
  515. logout() {
  516. this.$Modal.confirm({
  517. title: this.$L('退出登录'),
  518. content: this.$L('您确定要退出登录吗?'),
  519. onOk: () => {
  520. $A.userLogout();
  521. },
  522. });
  523. },
  524. systemSetting(save) {
  525. this.loadIng++;
  526. $A.apiAjax({
  527. url: 'system/setting?type=' + (save ? 'save' : 'get'),
  528. data: this.formSystem,
  529. complete: () => {
  530. this.loadIng--;
  531. },
  532. success: (res) => {
  533. if (res.ret === 1) {
  534. let tempData = res.data;
  535. tempData.github = tempData.github || 'show';
  536. tempData.reg = tempData.reg || 'open';
  537. tempData.callav = tempData.callav || 'open';
  538. tempData.autoArchived = tempData.autoArchived || 'close';
  539. tempData.archivedDay = tempData.archivedDay || 7;
  540. this.formSystem = tempData;
  541. this.formSystem__reset = $A.cloneData(this.formSystem);
  542. if (save) {
  543. this.$Message.success(this.$L('修改成功'));
  544. }
  545. } else {
  546. if (save) {
  547. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
  548. }
  549. }
  550. }
  551. });
  552. },
  553. handleSubmit(name) {
  554. this.$refs[name].validate((valid) => {
  555. if (valid) {
  556. switch (name) {
  557. case "formSystem": {
  558. this.systemSetting(true);
  559. break;
  560. }
  561. case "formDatum": {
  562. this.loadIng++;
  563. $A.apiAjax({
  564. url: 'users/editdata',
  565. data: this.formDatum,
  566. complete: () => {
  567. this.loadIng--;
  568. },
  569. success: (res) => {
  570. if (res.ret === 1) {
  571. $A.getUserInfo(true);
  572. $A.getUserBasic(this.usrInfo.username, () => {}, 0);
  573. this.$Message.success(this.$L('修改成功'));
  574. } else {
  575. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
  576. }
  577. }
  578. });
  579. break;
  580. }
  581. case "formPass": {
  582. this.loadIng++;
  583. $A.apiAjax({
  584. url: 'users/editpass',
  585. data: this.formPass,
  586. complete: () => {
  587. this.loadIng--;
  588. },
  589. success: (res) => {
  590. if (res.ret === 1) {
  591. this.userDrawerShow = false;
  592. this.$Message.success(this.$L('修改成功,请重新登录!'));
  593. this.$refs[name].resetFields();
  594. $A.userLogout();
  595. } else {
  596. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
  597. }
  598. }
  599. });
  600. break;
  601. }
  602. case "formSetting": {
  603. this.loadIng++;
  604. $A.apiAjax({
  605. url: 'users/editdata',
  606. data: this.formSetting,
  607. complete: () => {
  608. this.loadIng--;
  609. },
  610. success: (res) => {
  611. if (res.ret === 1) {
  612. $A.getUserInfo(true);
  613. this.$Message.success(this.$L('修改成功'));
  614. } else {
  615. this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
  616. }
  617. }
  618. });
  619. break;
  620. }
  621. }
  622. }
  623. })
  624. },
  625. handleReset(name) {
  626. if (typeof this[name + '__reset'] !== "undefined") {
  627. this[name] = $A.cloneData(this[name + '__reset']);
  628. return;
  629. }
  630. this.$refs[name].resetFields();
  631. },
  632. formArchived(value) {
  633. this.formSystem = { ...this.formSystem, autoArchived: value };
  634. }
  635. },
  636. }
  637. </script>