master
lion 1 year ago
parent b5ac493ac6
commit 245252b6bf

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

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

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

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

@ -290,9 +290,9 @@
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '保存成功' message: '延续成功'
}) })
this.$emit('refresh') this.$emit('refreshLink',true,res.id)
this.isShow = false this.isShow = false
}) })
}, },
@ -301,28 +301,13 @@
show({ show({
id: id, id: id,
table_name: this.table_name, table_name: this.table_name,
json_data_fields: ['files']
}).then(res => { }).then(res => {
console.log("res---", res) this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form = this.base.requestToForm(res, this.form) this.form.catalog_id = res.catalog_id?res.catalog_id:''
console.log("form---", this.form)
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form.area_ids = res.area_ids ? res.area_ids : [] this.form.area_ids = res.area_ids ? res.area_ids : []
this.form.tag_ids = res.tag_ids ? res.tag_ids : [] this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [], this.form.status = 0
this.form.status = 0
this.form.content = res.content ? res.content : ''
this.form.link_id = id 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 this.showTinymce = true
console.log("this.form", this.form) console.log("this.form", this.form)
}) })

@ -16,11 +16,11 @@
</el-select> </el-select>
</div> </div>
<div v-if="is_search"> <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-option value="">
<el-tree :default-checked-keys="checkArr" :check-strictly="true" @check="getSelectedNodes" <el-tree @node-click="getSelectedNodes" :data="catalogList" node-key="id" ref="tree"
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current highlight-current :props="defaultProps">
:props="defaultProps">
</el-tree> </el-tree>
</el-option> </el-option>
@ -41,15 +41,15 @@
</el-select> </el-select>
</div> </div>
<div> <div>
<el-date-picker style="width:250px" @change="changeStart" v-model="select.startRange" type="daterange" <el-date-picker popper-class="pickerTime" :picker-options="pickerOptions" style="width:250px"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" @change="changeStart" v-model="select.startRange" type="daterange" format="yyyy-MM-dd"
end-placeholder=""> value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="">
</el-date-picker> </el-date-picker>
</div> </div>
<div> <div>
<el-date-picker style="width:250px" @change="changeEnd" v-model="select.endRange" type="daterange" <el-date-picker popper-class="pickerTime" :picker-options="pickerOptions" style="width:250px"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" @change="changeEnd" v-model="select.endRange" type="daterange" format="yyyy-MM-dd"
end-placeholder=""> value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" end-placeholder="">
</el-date-picker> </el-date-picker>
</div> </div>
<div> <div>
@ -59,7 +59,7 @@
<el-button type="primary" size="small" @click="resetSearch"></el-button> <el-button type="primary" size="small" @click="resetSearch"></el-button>
</div> </div>
<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> </div>
</div> </div>
@ -125,6 +125,24 @@
</div> </div>
</template> </template>
</el-table-column> </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>
<template v-slot:btns> <template v-slot:btns>
@ -147,16 +165,13 @@
</div> </div>
<add-record ref="addRecord" @refresh="getRefresh"></add-record> <add-record ref="addRecord" @refresh="getList"></add-record>
<addRecordLink ref="addRecordLink" @refresh="getList"></addRecordLink>
<show-record ref="showRecord"></show-record> <show-record ref="showRecord"></show-record>
</div> </div>
</template> </template>
<script> <script>
import addRecord from './components/addRecord.vue'; import addRecord from './components/addRecord.vue';
import addRecordLink from './components/addRecordLink.vue';
import showRecord from './components/showRecord.vue'; import showRecord from './components/showRecord.vue';
import { import {
index, index,
@ -166,11 +181,94 @@
export default { export default {
components: { components: {
addRecord, addRecord,
addRecordLink,
showRecord showRecord
}, },
data() { data() {
return { 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: { select: {
title: '', title: '',
table_name: 'records', table_name: 'records',
@ -201,7 +299,7 @@
tagList: [], tagList: [],
nowDate: '', nowDate: '',
is_search: false, is_search: false,
checkArr: [],
statusList: [{ statusList: [{
id: 0, id: 0,
name: '正常', name: '正常',
@ -249,6 +347,18 @@
label: '状态', label: '状态',
align: 'center', align: 'center',
width: 120 width: 120
},
{
prop: 'link_id',
label: '来源文档',
align: 'center',
width: 120
},
{
prop: 'next_link_id',
label: '延续文档',
align: 'center',
width: 120
}, },
{ {
@ -271,6 +381,7 @@
created() { created() {
// //
this.nowDate = this.$moment().format("YYYY-MM-DD") this.nowDate = this.$moment().format("YYYY-MM-DD")
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
this.stateObj = state.state this.stateObj = state.state
this.is_search = false this.is_search = false
if (this.$route.query.searchTitle) { if (this.$route.query.searchTitle) {
@ -278,11 +389,12 @@
this.is_search = true this.is_search = true
} }
if (this.$route.query.dateTotal) { if (this.$route.query.dateTotal) {
this.select.endRange = [this.nowDate, this.nowDate] this.select.endRange = [this.startDate, this.nowDate]
this.select.status = 0 this.select.status = 0
this.is_search = true this.is_search = true
} }
// this.getCatalogList() // this.getCatalogList()
//
if (this.$route.path) { if (this.$route.path) {
let path = this.$route.path.split("_") let path = this.$route.path.split("_")
this.select.catalog_id = path[1] this.select.catalog_id = path[1]
@ -310,18 +422,23 @@
this.myHeight = e + 37 this.myHeight = e + 37
}, },
getSelectedNodes(data, node) { getSelectedNodes(data, node) {
console.log("data", data) console.log("data", data, node)
this.$refs.tree.setCheckedKeys([]); // if (data.children && data.children.length > 0) {
this.$refs.tree.setCheckedNodes([data]); // // node.disabled = true
return
}
// this.$refs.tree.setCheckedKeys([]); //
// this.$refs.tree.setCheckedNodes([data]); //
this.select.catalog_id = data.id this.select.catalog_id = data.id
this.select.catalog_name = data.name this.select.catalog_name = data.name
this.$refs.tree.setCurrentKey(data.id)
this.$forceUpdate() this.$forceUpdate()
}, },
clearCatalog(e){ clearCatalog(e) {
this.select.catalog_id = '' this.select.catalog_id = ''
this.select.catalog_name = '' this.select.catalog_name = ''
this.checkArr = []
this.$refs.tree.setCheckedKeys([]); this.$refs.tree.setCurrentKey(null)
}, },
toUrl(item) { toUrl(item) {
let path = '' let path = ''
@ -413,14 +530,13 @@
this.select.area_id = [] this.select.area_id = []
this.select.tag_id = [] this.select.tag_id = []
this.select.startRange = [] this.select.startRange = []
this.select.endRange = [] this.select.endRange = []
if(this.is_search){ if (this.is_search) {
this.select.catalog_id = '' this.select.catalog_id = ''
this.select.catalog_name = '' this.select.catalog_name = ''
this.checkArr = [] this.$refs.tree.setCurrentKey(null)
this.$refs.tree.setCheckedKeys([]); } else {
}else{ this.select.title = ''
this.select.title = ''
} }
// this.select.catalog_id = '' // this.select.catalog_id = ''
this.getList() this.getList()
@ -439,21 +555,6 @@
this.select.endRange = '' 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() { async getList() {
const res = await index({ const res = await index({
page_size: this.select.page_size, page_size: this.select.page_size,
@ -541,8 +642,9 @@
margin-bottom: 10px; 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> </style>

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', 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', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save