Browse Source

档案管理/dialog垂直居中/table多线条bug

master
xuhuajiao 3 years ago
parent
commit
c73463f8dc
  1. 16
      src/assets/styles/yxk-admin.scss
  2. 21
      src/views/archivesManage/archivesList/index.vue
  3. 43
      src/views/components/category/PreviewForm.vue
  4. 31
      src/views/system/role/index.vue

16
src/assets/styles/yxk-admin.scss

@ -340,7 +340,7 @@
.el-table__header{ .el-table__header{
th.el-table__cell{ th.el-table__cell{
background-color: #02255F; background-color: #02255F;
border-top: 1px solid #113D72;
// border-top: 1px solid #113D72;
border-bottom: none; border-bottom: none;
&>.cell{ &>.cell{
font-size: 16px; font-size: 16px;
@ -478,8 +478,13 @@
// 弹框 // 弹框
.el-dialog{ .el-dialog{
position: relative; position: relative;
position: fixed;
width: 620px; width: 620px;
padding: 2px; padding: 2px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
margin-top: 2vh !important;
background: linear-gradient(135deg, transparent 10px, #339CFF 0) top left, background: linear-gradient(135deg, transparent 10px, #339CFF 0) top left,
linear-gradient(-135deg, transparent 10px, #339CFF 0) top right, linear-gradient(-135deg, transparent 10px, #339CFF 0) top right,
linear-gradient(-45deg, transparent 10px, #339CFF 0) bottom right, linear-gradient(-45deg, transparent 10px, #339CFF 0) bottom right,
@ -753,6 +758,9 @@
background-size: contain; background-size: contain;
} }
} }
.el-table__header{
border-top: 1px solid #113D72;
}
} }
// 默认底图 - 暂时只有头像 // 默认底图 - 暂时只有头像
@ -860,11 +868,6 @@
.preview-dialog{ .preview-dialog{
.el-dialog{ .el-dialog{
width: 680px !important; width: 680px !important;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
margin-top: 2vh !important;
.preview-content{ .preview-content{
max-height: calc(100vh - 330px) !important; max-height: calc(100vh - 330px) !important;
overflow: hidden !important; overflow: hidden !important;
@ -977,7 +980,6 @@ input[type='number'] {
} }
.el-table__header-wrapper{ .el-table__header-wrapper{
background-color: #02255f; background-color: #02255f;
border-top: 1px solid #113d72;
} }
.svg-style{ .svg-style{

21
src/views/archivesManage/archivesList/index.vue

@ -237,6 +237,7 @@ export default {
getAjInProjectBtnState(data) { getAjInProjectBtnState(data) {
this.isProject = data this.isProject = data
}, },
//
getProjectSelections(data, selectData) { getProjectSelections(data, selectData) {
this.smartQuery = { this.smartQuery = {
'archiveYear': null, 'archiveYear': null,
@ -250,6 +251,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.anjuanData = [] this.$refs.anjuan.anjuanData = []
this.$refs.file.junneiData = []
} }
}) })
} else if (selectData && selectData.length === 1) { } else if (selectData && selectData.length === 1) {
@ -257,6 +259,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()
this.$refs.file.junneiData = []
} }
}) })
} else { } else {
@ -264,10 +267,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()
this.$refs.file.junneiData = []
} }
}) })
} }
}, },
//
getSelections(data, selectData) { getSelections(data, selectData) {
this.smartQuery = { this.smartQuery = {
'archiveYear': null, 'archiveYear': null,
@ -299,6 +304,7 @@ export default {
}) })
} }
}, },
//
getYear(obj) { getYear(obj) {
if (this.$refs.smartTree) { if (this.$refs.smartTree) {
this.intellClassifyLoading = true this.intellClassifyLoading = true
@ -328,20 +334,6 @@ export default {
const selectedKey = this.$refs.smartTree.getCurrentNode() const selectedKey = this.$refs.smartTree.getCurrentNode()
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.data.dicCode
this.treeCurrentNode = ele.$el this.treeCurrentNode = ele.$el
// if (data.ifChild) {
// this.treeCurrentNode = ele.$el
// const eles = document.querySelectorAll('.el-tree-node__children .el-tree-node.is-focusable')
// for (let i = 0; i < eles.length; i++) {
// eles[i].classList.remove('is-current')
// }
// this.treeCurrentNode.classList.add('is-current')
// } else {
// ele.$el.classList.remove('is-current')
// console.log(this.treeCurrentNode)
// if (this.treeCurrentNode) {
// this.treeCurrentNode.classList.add('is-current')
// }
// }
if (ele.$el.classList.contains('is-current')) { if (ele.$el.classList.contains('is-current')) {
this.treeCurrentNode.classList.remove('is-current') this.treeCurrentNode.classList.remove('is-current')
this.smartQuery = { this.smartQuery = {
@ -384,6 +376,7 @@ export default {
} }
} }
}, },
// list
handleTableList() { handleTableList() {
if (this.selectedCategory.isType === 2) { if (this.selectedCategory.isType === 2) {
this.$nextTick(() => { this.$nextTick(() => {

43
src/views/components/category/PreviewForm.vue

@ -11,6 +11,7 @@
v-model="addOrUpdateForm[item.fieldName]" v-model="addOrUpdateForm[item.fieldName]"
:options="item.options" :options="item.options"
:normalizer="normalizer" :normalizer="normalizer"
:clearable="false"
placeholder="" placeholder=""
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled" :disabled="isDisabled"
@ -134,15 +135,18 @@ export default {
parentsId: function(newValue, oldValue) { parentsId: function(newValue, oldValue) {
} }
}, },
mounted() {
created() {
this.editFormRow() this.editFormRow()
},
mounted() {
this.FetchNoFormatField() this.FetchNoFormatField()
}, },
methods: { methods: {
getAuto() {
//
handleAuto() {
let string = '' let string = ''
this.autoMatic.forEach(val => { this.autoMatic.forEach(val => {
if (this.addOrUpdateForm[val.fieldName] === '' || this.addOrUpdateForm[val.fieldName] === null) {
if (!this.addOrUpdateForm[val.fieldName]) {
string += '' string += ''
} else { } else {
string += '' + this.addOrUpdateForm[val.fieldName] + val.connector string += '' + this.addOrUpdateForm[val.fieldName] + val.connector
@ -154,10 +158,11 @@ export default {
}) })
}) })
}, },
//
FetchNoFormatField() { FetchNoFormatField() {
getNoFormatField({ categoryId: this.selectedCategory.id }).then(res => { getNoFormatField({ categoryId: this.selectedCategory.id }).then(res => {
this.autoMatic = res this.autoMatic = res
this.getAuto()
this.handleAuto()
}) })
}, },
// //
@ -176,7 +181,7 @@ export default {
handlerIsRepeat(params, item) { handlerIsRepeat(params, item) {
FetchDoeditIsRepeat(params).then(res => { FetchDoeditIsRepeat(params).then(res => {
if (res) { if (res) {
this.$message.error(item.fieldCnName + '字段不可重复,请重新输入或选择')
this.$message.error(item.fieldCnName + '不可重复')
} }
}) })
}, },
@ -193,7 +198,7 @@ export default {
this.handlerIsRepeat(params, item) this.handlerIsRepeat(params, item)
} }
if (!item.isAutomatic) { if (!item.isAutomatic) {
this.getAuto()
this.handleAuto()
} }
}, },
// tree - open // tree - open
@ -205,6 +210,7 @@ export default {
// tree - select // tree - select
selectTree(val) { selectTree(val) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName
this.treeName = val.dicName
// - - treeSelect // - - treeSelect
if (this.treeCurrentFiled.isRepeat) { if (this.treeCurrentFiled.isRepeat) {
const params = { const params = {
@ -215,8 +221,7 @@ export default {
} }
this.handlerIsRepeat(params, this.treeCurrentFiled) this.handlerIsRepeat(params, this.treeCurrentFiled)
} }
console.log(val)
this.getAuto()
this.handleAuto()
}, },
// popover - table // popover - table
clickRowHandler(row) { clickRowHandler(row) {
@ -230,7 +235,7 @@ export default {
} }
this.$refs.popoverTable.clearSelection() this.$refs.popoverTable.clearSelection()
this.popoverVisible = false this.popoverVisible = false
this.getAuto()
this.handleAuto()
}, },
// popover - // popover -
handleCurrentFieldName(item) { handleCurrentFieldName(item) {
@ -242,13 +247,17 @@ export default {
editFormRow() { editFormRow() {
this.rules = {} this.rules = {}
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isInputClass === 'select') {
this.$set(item, 'options', [])
this.$set(this.addOrUpdateForm, item.fieldName, null) // unkonwn
}
if (item.isDefaultValue !== '') { if (item.isDefaultValue !== '') {
this.$set(this.addOrUpdateForm, item.fieldName, item.isDefaultValue) this.$set(this.addOrUpdateForm, item.fieldName, item.isDefaultValue)
} else { } else {
this.$set(this.addOrUpdateForm, item.fieldName, '') this.$set(this.addOrUpdateForm, item.fieldName, '')
}
if (item.isInputClass === 'select') {
this.$set(this.addOrUpdateForm, item.fieldName, null) // unkonwn
if (item.isInputClass === 'select') {
this.$set(this.addOrUpdateForm, item.fieldName, null) // unkonwn
}
} }
this.rules[item.fieldName] = [ this.rules[item.fieldName] = [
{ {
@ -306,14 +315,10 @@ export default {
'parentsId': this.setParentsId, 'parentsId': this.setParentsId,
'jsonString': JSON.stringify(this.addOrUpdateForm) 'jsonString': JSON.stringify(this.addOrUpdateForm)
} }
console.log(params)
// console.log(this.addOrUpdateForm)
edit(params).then(res => { edit(params).then(res => {
if (res) { if (res) {
this.$notify({
title: res,
type: 'success',
duration: 2500
})
this.$message.success(res)
this.$emit('emitTableList') this.$emit('emitTableList')
this.crud.refresh() this.crud.refresh()
} }
@ -335,8 +340,6 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.preview-content { .preview-content {
// width: 640px !important;
// height: calc(100vh - 312px);
padding: 20px 0 0 0 !important; padding: 20px 0 0 0 !important;
margin-top: 0 !important; margin-top: 0 !important;
border-radius: 4px; border-radius: 4px;

31
src/views/system/role/index.vue

@ -361,18 +361,21 @@ export default {
.head-container{ .head-container{
padding: 0 0 20px 0; padding: 0 0 20px 0;
} }
::v-deep .el-input-number .el-input__inner {
text-align: left;
}
::v-deep .vue-treeselect__multi-value{
margin-bottom: 0;
}
::v-deep .vue-treeselect__multi-value-item{
border: 0;
padding: 0;
}
::v-deep .el-table__body tr.current-row > td{
color: #fff;
background-color: #13439E;
}
::v-deep .el-input-number .el-input__inner {
text-align: left;
}
::v-deep .vue-treeselect__multi-value{
margin-bottom: 0;
}
::v-deep .vue-treeselect__multi-value-item{
border: 0;
padding: 0;
}
::v-deep .el-table__body tr.current-row > td{
color: #fff;
background-color: #13439E;
}
::v-deep .el-table__header{
border-top: 1px solid #113D72;
}
</style> </style>
Loading…
Cancel
Save