master
lion 1 year ago
parent b5ac493ac6
commit 245252b6bf

@ -197,3 +197,7 @@ top: 41px !important;
#nprogress .bar{
background: $primaryColor !important;
}
.pickerTime .el-picker-panel__shortcut{
margin-left:0;
}

@ -54,7 +54,7 @@
</div>
<div class="box box4" @click="toUrl">
<div class="boxtitle">
<span>当日到期提醒</span>
<span>到期提醒</span>
<i class="el-icon-warning statIcon"></i>
</div>
<div class="bline"></div>

@ -60,7 +60,8 @@
methods: {
async getList() {
this.nowDate = this.$moment().format("YYYY-MM-DD")
console.log("this.nowDate",this.nowDate)
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
console.log("this.nowDate",this.nowDate,this.startDate)
const res = await index({
page_size: 9999,
page: 1,
@ -70,7 +71,7 @@
filter:[{
key:'end_date',
op:'range',
value:[this.nowDate,this.nowDate]
value:[this.startDate,this.nowDate]
},{
key:'status',
op:'eq',

@ -18,7 +18,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>状态
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.status" placeholder="请选择">
<el-select :disabled="is_next" style="width:100%" v-model="form.status" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -116,12 +116,12 @@
<template v-slot:footerContent>
<div>
<Button ghost type="primary" @click="isShow = false">取消</Button>
<Button type="primary" v-if="form.status<2" @click="clickSubmit"></Button>
<Button type="primary" v-else @click="clickSubmit('next')"></Button>
<Button type="primary" v-if="form.status<2 || is_next" @click="clickSubmit"></Button>
<Button type="primary" v-else @click="addLink"></Button>
</div>
</template>
</xy-dialog>
<addRecordLink ref="addRecordLink" @refreshLink="saveLink"></addRecordLink>
</div>
</template>
@ -133,6 +133,8 @@
} from "@/api/system/baseForm.js"
import wangEditor from '@/components/wangEditor';
import addRecordLink from './addRecordLink.vue';
import {
deepCopy,
isNull
@ -143,7 +145,8 @@
import state from '@/store/modules/user.js'
export default {
components: {
wangEditor
wangEditor,
addRecordLink
},
data() {
return {
@ -151,7 +154,7 @@
isShow: false,
id: '',
showTinymce: false,
is_next: false, //
is_next: false, //
catalogList: [],
statusList: [{
id: 0,
@ -221,11 +224,11 @@
changeEditor(e) {
this.form.content = e
},
setList(cat,area,tag){
this.catalogList = cat?cat:[]
this.areaList = area?area:[]
this.tagList = tag?tag:[]
},
setList(cat, area, tag) {
this.catalogList = cat ? cat : []
this.areaList = area ? area : []
this.tagList = tag ? tag : []
},
getSelectedNodes(data, node) {
console.log("data", data)
this.$refs.tree.setCheckedKeys([]); //
@ -242,9 +245,9 @@
this.checkArr = []
this.form.catalog_id = ''
}
},
setLinkId(e){
this.form.link_id = e?e:''
},
setLinkId(e) {
this.form.link_id = e ? e : ''
},
handleRemove(file, fileList) {
this.filesList = fileList
@ -259,13 +262,24 @@
this.filesList = fileList
},
clickSubmit(bol) {
if (bol === 'next') {
this.is_next = true
} else {
this.is_next = false
}
this.$refs.dialog.submit()
},
//
addLink() {
this.$refs.addRecordLink.type = 'add'
this.$refs.addRecordLink.setLinkId(this.id)
this.$refs.addRecordLink.setList(this.catalogList, this.areaList, this.tagList)
this.$refs.addRecordLink.setCheck(this.form.catalog_id)
this.$refs.addRecordLink.isShow = true
},
saveLink(e,id) {
console.log("e", e,id)
if (e) {
this.is_next = true
this.form.next_link_id = id
this.clickSubmit()
}
},
submit() {
if (this.id) {
@ -302,14 +316,9 @@
this.$message({
type: 'success',
message: '保存成功'
})
if(this.is_next){
this.$emit('refresh', this.is_next, this.id)
}else{
this.$emit('refresh')
}
})
this.$emit('refresh')
this.isShow = false
console.log("is_next", this.is_next)
})
},
@ -328,6 +337,10 @@
this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [],
this.form.status = res.status ? res.status : 0
//
if (this.form.status === 2) {
this.is_next = true
}
this.form.content = res.content ? res.content : ''
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
@ -358,7 +371,8 @@
this.id = ''
this.showTinymce = false
this.checkArr = []
this.filesList = []
this.filesList = []
this.is_next = false
this.form = {
title: '',
status: 0,

@ -290,9 +290,9 @@
}).then(res => {
this.$message({
type: 'success',
message: '保存成功'
message: '延续成功'
})
this.$emit('refresh')
this.$emit('refreshLink',true,res.id)
this.isShow = false
})
},
@ -301,28 +301,13 @@
show({
id: id,
table_name: this.table_name,
json_data_fields: ['files']
}).then(res => {
console.log("res---", res)
this.form = this.base.requestToForm(res, this.form)
console.log("form---", this.form)
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form.catalog_id = res.catalog_id?res.catalog_id:''
this.form.area_ids = res.area_ids ? res.area_ids : []
this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [],
this.form.status = 0
this.form.content = res.content ? res.content : ''
this.form.status = 0
this.form.link_id = id
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
this.filesList.push({
name: item.original_name,
id: item.id,
url: item.url
})
})
}
this.showTinymce = true
console.log("this.form", this.form)
})

@ -16,11 +16,11 @@
</el-select>
</div>
<div v-if="is_search">
<el-select style="width:200px" clearable @clear="clearCatalog" v-model="select.catalog_name" placeholder="请选择目录">
<el-select style="width:200px" clearable @clear="clearCatalog" v-model="select.catalog_name"
placeholder="请选择目录">
<el-option value="">
<el-tree :default-checked-keys="checkArr" :check-strictly="true" @check="getSelectedNodes"
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current
:props="defaultProps">
<el-tree @node-click="getSelectedNodes" :data="catalogList" node-key="id" ref="tree"
highlight-current :props="defaultProps">
</el-tree>
</el-option>
@ -41,15 +41,15 @@
</el-select>
</div>
<div>
<el-date-picker style="width:250px" @change="changeStart" v-model="select.startRange" type="daterange"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
end-placeholder="">
<el-date-picker popper-class="pickerTime" :picker-options="pickerOptions" style="width:250px"
@change="changeStart" v-model="select.startRange" type="daterange" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="">
</el-date-picker>
</div>
<div>
<el-date-picker style="width:250px" @change="changeEnd" v-model="select.endRange" type="daterange"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期"
end-placeholder="">
<el-date-picker popper-class="pickerTime" :picker-options="pickerOptions" style="width:250px"
@change="changeEnd" v-model="select.endRange" type="daterange" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" end-placeholder="">
</el-date-picker>
</div>
<div>
@ -59,7 +59,7 @@
<el-button type="primary" size="small" @click="resetSearch"></el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editIndex('add')"></el-button>
<el-button type="primary" size="small" v-if="!is_search" @click="editIndex('add')"></el-button>
</div>
</div>
</div>
@ -125,6 +125,24 @@
</div>
</template>
</el-table-column>
</template>
<template v-slot:link_id>
<el-table-column align='center' label="来源文档" width="120" header-align="center">
<template slot-scope="scope">
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.link_id" @click="showIndex('show',scope.row.link_id)">
查看
</div>
</template>
</el-table-column>
</template>
<template v-slot:next_link_id>
<el-table-column align='center' label="延续文档" width="120" header-align="center">
<template slot-scope="scope">
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.next_link_id" @click="showIndex('show',scope.row.next_link_id)">
查看
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
@ -147,16 +165,13 @@
</div>
<add-record ref="addRecord" @refresh="getRefresh"></add-record>
<addRecordLink ref="addRecordLink" @refresh="getList"></addRecordLink>
<add-record ref="addRecord" @refresh="getList"></add-record>
<show-record ref="showRecord"></show-record>
</div>
</template>
<script>
import addRecord from './components/addRecord.vue';
import addRecordLink from './components/addRecordLink.vue';
import showRecord from './components/showRecord.vue';
import {
index,
@ -166,11 +181,94 @@
export default {
components: {
addRecord,
addRecordLink,
showRecord
},
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近半年',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一年',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
picker.$emit('pick', [start, end]);
}
}, {
text: '本年度',
onClick(picker) {
const end = new Date();
const start = new Date();
const currentYear = new Date().getFullYear();
const firstDayOfYear = new Date(currentYear, 0, 1);
const lastDayOfYear = new Date(currentYear, 11, 31);
start.setTime(firstDayOfYear);
end.setTime(lastDayOfYear)
picker.$emit('pick', [start, end]);
}
}, {
text: '本月度',
onClick(picker) {
const end = new Date();
const start = new Date();
const currentYear = start.getFullYear();
const month = start.getMonth() + 1;
const firstDayOfMonth = new Date(currentYear, start.getMonth(), 1);
const lastDayOfMonth = new Date(currentYear, month, 0);
start.setTime(firstDayOfMonth);
end.setTime(lastDayOfMonth);
picker.$emit('pick', [start, end]);
}
}, {
text: '本周',
onClick(picker) {
const end = new Date();
const start = new Date();
const date = new Date();
const today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
const firstDay = new Date(today);
const lastDay = new Date(today);
const diff = 1 - today.getDay();
firstDay.setDate(today.getDate() + diff); //
lastDay.setDate(today.getDate() + (6 - today.getDay() + 1)); //
start.setTime(firstDay);
end.setTime(lastDay);
picker.$emit('pick', [start, end]);
}
}]
},
select: {
title: '',
table_name: 'records',
@ -201,7 +299,7 @@
tagList: [],
nowDate: '',
is_search: false,
checkArr: [],
statusList: [{
id: 0,
name: '正常',
@ -249,6 +347,18 @@
label: '状态',
align: 'center',
width: 120
},
{
prop: 'link_id',
label: '来源文档',
align: 'center',
width: 120
},
{
prop: 'next_link_id',
label: '延续文档',
align: 'center',
width: 120
},
{
@ -271,6 +381,7 @@
created() {
//
this.nowDate = this.$moment().format("YYYY-MM-DD")
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
this.stateObj = state.state
this.is_search = false
if (this.$route.query.searchTitle) {
@ -278,11 +389,12 @@
this.is_search = true
}
if (this.$route.query.dateTotal) {
this.select.endRange = [this.nowDate, this.nowDate]
this.select.endRange = [this.startDate, this.nowDate]
this.select.status = 0
this.is_search = true
}
// this.getCatalogList()
//
if (this.$route.path) {
let path = this.$route.path.split("_")
this.select.catalog_id = path[1]
@ -310,18 +422,23 @@
this.myHeight = e + 37
},
getSelectedNodes(data, node) {
console.log("data", data)
this.$refs.tree.setCheckedKeys([]); //
this.$refs.tree.setCheckedNodes([data]); //
console.log("data", data, node)
if (data.children && data.children.length > 0) {
// node.disabled = true
return
}
// this.$refs.tree.setCheckedKeys([]); //
// this.$refs.tree.setCheckedNodes([data]); //
this.select.catalog_id = data.id
this.select.catalog_name = data.name
this.$refs.tree.setCurrentKey(data.id)
this.$forceUpdate()
},
clearCatalog(e){
this.select.catalog_id = ''
this.select.catalog_name = ''
this.checkArr = []
this.$refs.tree.setCheckedKeys([]);
},
clearCatalog(e) {
this.select.catalog_id = ''
this.select.catalog_name = ''
this.$refs.tree.setCurrentKey(null)
},
toUrl(item) {
let path = ''
@ -413,14 +530,13 @@
this.select.area_id = []
this.select.tag_id = []
this.select.startRange = []
this.select.endRange = []
if(this.is_search){
this.select.catalog_id = ''
this.select.catalog_name = ''
this.checkArr = []
this.$refs.tree.setCheckedKeys([]);
}else{
this.select.title = ''
this.select.endRange = []
if (this.is_search) {
this.select.catalog_id = ''
this.select.catalog_name = ''
this.$refs.tree.setCurrentKey(null)
} else {
this.select.title = ''
}
// this.select.catalog_id = ''
this.getList()
@ -439,21 +555,6 @@
this.select.endRange = ''
}
},
getRefresh(bol, id) {
if (bol) {
console.log('getRefresh', bol, id)
// if(this.select.catalog_id){
// this.$refs.addRecord.setCatalogId(this.select.catalog_id)
// }
this.$refs.addRecordLink.type = 'add'
this.$refs.addRecordLink.setLinkId(id)
this.$refs.addRecordLink.setList(this.catalogList, this.areaList, this.tagList)
this.$refs.addRecordLink.setCheck(this.select.catalog_id)
this.$refs.addRecordLink.isShow = true
}
this.getList()
},
async getList() {
const res = await index({
page_size: this.select.page_size,
@ -541,8 +642,9 @@
margin-bottom: 10px;
}
}
}
::v-deep .el-checkbox__input .el-checkbox__inner {
border-radius: 50%;
}
::v-deep .el-checkbox__input .el-checkbox__inner {
border-radius: 50%;
}
</style>

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin_test',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save