master
yujialong 2 years ago
parent 49e09732fc
commit 83660771a0
  1. 3
      src/api/index.js
  2. 2
      src/pages/account/login/index.vue
  3. 12
      src/pages/annex/list/index.vue
  4. 17
      src/pages/article/add/editor.js
  5. 20
      src/pages/article/add/index.vue
  6. 10
      src/pages/column/add/index.vue
  7. 7
      src/pages/column/list/index.vue
  8. 7
      src/pages/role/list/index.vue
  9. 20
      src/pages/setting/list/index.vue
  10. 90
      src/pages/setting/list/info.vue
  11. 17
      src/pages/user/list/index.vue
  12. 2
      src/pages/userGroup/list/index.vue
  13. 14
      src/styles/common.scss

@ -8,6 +8,7 @@ export default {
upload: `${host}iasf/sysFiles/upload`,
listByPage: `iasf/sysFiles/listByPage`,
delFile: `iasf/sysFiles/delete`,
updateFile: `iasf/sysFiles/update`,
dept: `iasf/sys/dept`,
deptTree: `iasf/sys/dept/tree`,
depts: `iasf/sys/dept/tree`,
@ -20,10 +21,12 @@ export default {
checkJobNumber: `iasf/sys/checkJobNumber`,
checkUsername: `iasf/sys/checkUsername`,
resetPwd: `iasf/sys/resetPwd`,
pwd: `iasf/sys/user/pwd`,
exportFailure: `${host}iasf/sys/exportFailure`,
importStaff: `${host}iasf/sys/importStaff`,
roles: `iasf/sys/roles`,
role: `iasf/sys/role`,
deleteRole: `iasf/sys/role/deleted`,
perTree: `iasf/sys/permission/tree/all`,
groupAdd: `iasf/sys/userGroup/add`,
groupDel: `iasf/sys/userGroup/delete`,

@ -25,7 +25,7 @@
</el-input>
<img @click="getVerImg" :src="verificationIMG" class="verification" alt="">
</div>
<div class="forget">忘记密码</div>
<!-- <div class="forget">忘记密码</div> -->
<el-button class="submit" type="primary" @click="submit">登录</el-button>
</div>
</div>

@ -48,7 +48,12 @@
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" :selectable="row => !row.quote"></el-table-column>
<el-table-column type="index" width="60" label="ID"></el-table-column>
<el-table-column prop="site" label="站点" min-width="180"></el-table-column>
<el-table-column prop="fileName" label="名称" min-width="180"></el-table-column>
<el-table-column prop="quote" label="文章名称" min-width="180">
<template slot-scope="scope">
{{ scope.row.quote || '--' }}
</template>
</el-table-column>
<el-table-column prop="fileName" label="名称" min-width="180" show-overflow-tooltip></el-table-column>
<el-table-column prop="type" label="文件类型" min-width="80"></el-table-column>
<el-table-column prop="format" label="格式" min-width="80"></el-table-column>
<el-table-column prop="fileSize" label="大小" min-width="80">
@ -58,11 +63,6 @@
</el-table-column>
<el-table-column prop="createDate" label="上传时间" min-width="150"></el-table-column>
<el-table-column prop="uploader" label="上传人" min-width="100"></el-table-column>
<el-table-column prop="quote" label="文章名称" min-width="180">
<template slot-scope="scope">
{{ scope.row.quote || '--' }}
</template>
</el-table-column>
<el-table-column prop="deleted" label="是否使用" min-width="100">
<template slot-scope="scope">
{{ scope.row.quote ? '是' : '否' }}

@ -9,11 +9,18 @@ export default {
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em lineheight formatpainter',
height: 650, //编辑器高度
min_height: 400,
/*content_css: [ //css使
'/static/reset.css',
'/static/ax.css',
'/static/css.css',
],*/
// content_css: [ //可设置编辑区内容展示的css,谨慎使用
// '/static/reset.css',
// ],
content_style: `.mce-content-body:not([dir=rtl]) blockquote {
padding: 8px 15px;
border-left: 0;
background-color: #ededed;
}
blockquote p {
margin: 0;
font-style: italic;
}`,
fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
font_formats: '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;知乎配置=BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;小米配置=Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif',
link_list: [

@ -272,7 +272,7 @@ export default {
fileList: [],
editorConfig,
submiting: false, //
updateTime: 0
updateTime: 0,
};
},
computed: {
@ -464,8 +464,22 @@ export default {
form.linkAddress = links.join()
}
if (((form.templateStatus && form.articleTemplate === 2) || !form.templateStatus) && !form.mainBody && isRelease) return util.errorMsg('请输入正文')
const { columnId } = form
if (typeof columnId === 'object') form.columnId = columnId[columnId.length - 1]
const { columnId, bannerImg, file, titleImg } = form
const fileId = []
if (typeof columnId === 'object') form.columnId = columnId[columnId.length - 1] // id
// idurlid
if (bannerImg) fileId.push(bannerImg.substr(bannerImg.lastIndexOf('/') + 1))
if (file) fileId.push(file.substr(file.lastIndexOf('/') + 1))
if (titleImg) fileId.push(titleImg.substr(titleImg.lastIndexOf('/') + 1))
//
fileId.map(e => {
this.$post(this.api.updateFile, {
id: e,
isRelease,
quote: form.title
}).then(res => {}).catch(err => {})
})
form.isRelease = isRelease
this.submiting = true
if (form.id) {

@ -320,6 +320,7 @@ export default {
cropperModel: false,
isUpload: false,
file: {}, //
fileId: ''
};
},
components: {
@ -550,6 +551,7 @@ export default {
let url = this.form.columnBanner
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {})
this.form.columnBanner = res.url
this.fileId = res.id
},
//
preview() {
@ -576,6 +578,14 @@ export default {
if (otherArticle) form.linkAddress += '-' + otherArticle
}
}
//
this.$post(this.api.updateFile, {
id: this.fileId,
isRelease: 1,
quote: this.form.columnName
}).then(res => {
this.fileId = ''
}).catch(err => {})
this.submiting = true
if (this.isEdit) {
delete form.children

@ -395,9 +395,9 @@ export default {
height: auto;
border-bottom: 1px solid #EBEDF0;
}
.el-tree-node__expand-icon {
display: none;
}
// .el-tree-node__expand-icon {
// display: none;
// }
}
.sort-line {
display: flex;
@ -406,7 +406,6 @@ export default {
padding: 12px 0;
&:first-child {
width: 230px;
padding-left: 30px;
}
&:nth-child(2) {
position: absolute;

@ -130,7 +130,7 @@ export default {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$del(`${this.api.role}/${row.id}`).then(res => {
this.$del(this.api.deleteRole, [row.id]).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {});
@ -144,10 +144,7 @@ export default {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.id;
});
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => {
this.$del(this.api.deleteRole, this.multipleSelection.map(e => e.id)).then(res => {
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();

@ -21,10 +21,8 @@
</template>
<script>
import Setting from '@/setting'
import { mapState,mapActions, mapMutations } from 'vuex'
import { mapState, mapMutations } from 'vuex'
import info from './info'
import util from '@/libs/util'
export default {
data() {
return {
@ -44,6 +42,21 @@ export default {
'avatar', 'userId'
]),
},
// ,
beforeRouteLeave(to, from, next) {
if(this.edited){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.$refs.info.submit()
next()
}).catch(() => {
next(false)
})
}else{
next()
}
},
mounted() {
},
@ -52,7 +65,6 @@ export default {
'setAvatar'
]),
changeAvatar(res) {
console.log("🚀 ~ file: index.vue ~ line 55 ~ changeAvatar ~ res", res)
this.setAvatar(res.data)
},
updateStatus(status){

@ -16,8 +16,8 @@
</li>
<li>
<label>账号</label>
<el-input class="m-r-10" type="text" size="small" v-model="form.username" disabled></el-input>
<el-button type="text" size="small" @click="showAccount">修改</el-button>
<el-input class="m-r-10" type="text" size="small" v-model="form.username"></el-input>
<!-- <el-button type="text" size="small" @click="showAccount">修改</el-button> -->
</li>
<li>
<label>工号</label>
@ -31,20 +31,20 @@
</li> -->
<li>
<label>手机号</label>
<el-input class="m-r-10" type="text" size="small" v-model="form.phone" disabled></el-input>
<el-input class="m-r-10" type="text" size="small" maxlength="11" v-model="form.phone"></el-input>
<!-- <el-button type="text" size="small" @click="bindPhone">{{ form.phone ? '更换' : '绑定' }}</el-button>
<el-button v-if="form.phone" type="text" size="small" @click="unbind">解绑</el-button> -->
</li>
<li>
<label>密码</label>
<el-input class="m-r-10" size="small" value="******" disabled></el-input>
<!-- <el-button type="text" size="small" @click="bindPassword">更换</el-button> -->
<el-button type="text" size="small" @click="bindPassword">修改</el-button>
</li>
</ul>
</div>
<div class="btn-wrap">
<el-button size="small" v-throttle @click="$router.back()">取消</el-button>
<el-button type="primary" size="small" v-throttle @click="save">更新</el-button>
<el-button type="primary" size="small" v-throttle @click="submit">更新</el-button>
</div>
</div>
<el-dialog
@ -93,23 +93,23 @@
</el-dialog>
<el-dialog
title="更换密码"
:visible.sync="passwordVisible"
:visible.sync="pwdVisible"
:close-on-click-modal="false"
@close="closePassword"
width="30%">
<el-form ref="passwordForm" :model="form" label-width="60px">
<el-form ref="pwdForm" :model="form" label-width="60px">
<el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
<el-input type="password" v-model="pwdForm.password" placeholder="请输入原密码"></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input>
<el-input type="password" v-model="pwdForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input>
<el-input type="password" v-model="pwdForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="passwordVisible = false"> </el-button>
<el-button @click="pwdVisible = false"> </el-button>
<el-button type="primary" @click="editPassword"> </el-button>
</span>
</el-dialog>
@ -130,8 +130,7 @@
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapState, mapActions } from 'vuex'
import { mapState, mapMutations } from 'vuex'
export default {
data() {
return {
@ -150,10 +149,10 @@ export default {
sex: 1,
},
emailVisible: false,
passwordVisible: false,
pwdVisible: false,
phoneVisible: false,
showArch: false,
passwordForm: {
pwdForm: {
password: "",
newPassword: "",
reNewPassword: ""
@ -194,7 +193,7 @@ export default {
form: {
handler(){
this.updateTime++
// if(this.updateTime > 1) this.$emit('updateStatus',this.updateTime > 1)
if(this.updateTime > 1) this.$emit('updateStatus', this.updateTime > 1)
},
deep:true
}
@ -203,7 +202,7 @@ export default {
this.getData()
},
methods: {
...mapActions('user', [
...mapMutations('user', [
'setUserName'
]),
//
@ -252,32 +251,42 @@ export default {
}).catch(() => {})
},
bindPassword() {
this.passwordVisible = true
this.pwdVisible = true
},
editPassword() {
if (!this.passwordForm.password) return util.warningMsg("请输入原密码")
if (!this.passwordForm.newPassword) return util.warningMsg("请输入新密码")
if (!this.passwordForm.reNewPassword) return util.warningMsg("请确认新密码")
if (this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return util.warningMsg("请输入6位数以上的密码")
if (this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return util.warningMsg("输入的新密码不一致,请重新确认")
if (this.passwordForm.password === this.passwordForm.newPassword) return util.warningMsg("原密码跟新密码不能一致")
let data = this.passwordForm
data.userid = this.userId
this.$put(this.api.examinePassword, data).then(res => {
const data = this.pwdForm
if (!data.password) return util.warningMsg("请输入原密码")
if (!data.newPassword) return util.warningMsg("请输入新密码")
if (!data.reNewPassword) return util.warningMsg("请确认新密码")
if (data.newPassword.length < 6 || data.reNewPassword.length < 6) return util.warningMsg("请输入6位数以上的密码")
if (data.newPassword !== data.reNewPassword) return util.warningMsg("输入的新密码不一致,请重新确认")
if (data.password === data.newPassword) return util.warningMsg("原密码跟新密码不能一致")
this.$put(this.api.pwd, {
id: this.form.id,
oldPwd: data.password,
newPwd: data.newPassword
}).then(res => {
util.successMsg("更换成功")
this.passwordVisible = false
this.pwdVisible = false
}).catch(err => {})
},
closePassword() {
this.passwordForm = {
password: "",
newPassword: "",
reNewPassword: ""
this.pwdForm = {
password: "",
newPassword: "",
reNewPassword: ""
}
},
save() {
submit() {
const { form } = this
this.$put(this.api.user, form).then(res => {
this.$put(this.api.user, {
id: form.id,
jobNumber: form.jobNumber,
phone: form.phone,
realName: form.realName,
username: form.username,
sex: form.sex,
}).then(res => {
this.setUserName(form.username)
this.$message.success("提交成功!")
}).catch(res => {})
@ -394,19 +403,6 @@ export default {
this.phoneVisible = false;
}).catch(res => {
});
},
goBack() {
if(this.updateTime > 0){
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.save()
this.$router.go(-1);
}).catch(() => {
})
}else{
this.$router.go(-1);
}
}
}
};

@ -433,7 +433,7 @@ export default {
this.orgListDia = list
this.orgForm = {
id: '',
pid: data ? data.id : '0',
pid: data ? data.id : 0,
pidName: data ? data.name : '',
name: ''
}
@ -491,7 +491,6 @@ export default {
if (cas && len) {
this.orgForm.pid = cas[len - 1]
}
debugger
if (!form.id) {
//
this.$post(this.api.dept, form).then(res => {
@ -616,7 +615,7 @@ export default {
this.$get(`${this.api.user}/${row.id}`).then(({ data }) => {
const { deptArchitectureId, roleId } = data
if (roleId) {
const ids = roleId.split(',')
const ids = roleId.split(',').map(e => +e)
const list = this.roleIds
if (ids.length) {
let has = false //
@ -640,7 +639,17 @@ export default {
data.deptArchitectureId = this.archId
}
data.groupId = +data.groupId
this.form = data
this.form = {
id: data.id,
realName: data.realName,
username: data.username,
phone: data.phone,
jobNumber: data.jobNumber,
email: data.email,
groupId: +data.groupId,
roleIds: data.roleIds,
deptArchitectureId: data.deptArchitectureId || []
}
this.originAccount = data.username
this.originWorkNumber = data.jobNumber
}).catch(res => {})

@ -163,7 +163,7 @@ export default {
this.submiting = true
const { form } = this
if (form.id) {
this.$post(this.api.groupUpdate, form).then(res => {
this.$put(this.api.groupUpdate, form).then(res => {
util.successMsg("编辑成功!")
this.formVisible = false
this.getData()

@ -4,24 +4,18 @@
font-family: youshe;
src: url('font/YouSheBiaoTiHei.ttf');
}
[v-cloak] {
display: none;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
background: #d7d7d7;
}
.el-tooltip__popper.is-dark, .el-menu--vertical[x-placement="right-start"] {
// display: none !important;
}
.flex-between {
display: flex;
justify-content: space-between;
@ -108,7 +102,7 @@
}
.input-form {
&.model {
height: calc(100vh - 278px);
height: calc(100vh - 200px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {
@ -407,6 +401,10 @@
}
}
}
.tox-tinymce-aux {
.tox-notifications-container {
display: none;
}
.mce-content-body:not([dir=rtl]) blockquote {
border-left: 0;
background-color: #ccc;
}
Loading…
Cancel
Save