dev-zcx
zcxee 2 years ago
parent 58d702f6f7
commit e151ad7c9c
  1. 11
      src/api/sch/place.js
  2. 35
      src/api/system/maillist.js
  3. 28
      src/api/system/summary.js
  4. 27
      src/global/func.js
  5. 194
      src/views/system/maillist/index.vue
  6. 346
      src/views/system/notice/index.vue
  7. 259
      src/views/system/summary/index.vue
  8. 12
      src/views/zs/clue.vue
  9. 80
      src/views/zs/clue/components/SearchForm.vue
  10. 0
      src/views/zs/clue/index.vue
  11. 12
      vue.config.js

@ -25,3 +25,14 @@ export function savePlace(data) {
data: data data: data
}); });
} }
// 查询场地
export function getAllPlaces(param) {
return request({
url: `/sch/place/all`,
method: 'get',
params: param
})
}

@ -0,0 +1,35 @@
import request from '@/utils/request'
// 查询通讯录列表
export function getMaillistTableList(query) {
return request({
url: '/system/maillist/list',
method: 'get',
params: query
})
}
// 新增通讯录
export function insertMaillist(params) {
return request({
url: '/system/maillist',
method: 'post',
data: params
})
}
// 修改通讯录
export function updateMaillist(params) {
return request({
url: '/system/maillist',
method: 'put',
data: params
})
}
// 删除通讯录
export function deleteMaillist(params) {
return request({
url: '/system/maillist/' + params,
method: 'delete'
})
}

@ -0,0 +1,28 @@
import request from '@/utils/request'
// 查询任务
export function getList(query) {
return request({
url: '/system/summary/list',
method: 'get',
params: query
})
}
// 查询任务
export function getTask(query) {
return request({
url: '/system/summary',
method: 'get',
params: query
})
}
// 保存
export function saveTask(data) {
return request({
url: '/system/summary',
method: 'post',
data: data
})
}

@ -1,9 +1,25 @@
import Vue from 'vue'; import Vue from 'vue';
import { parseTime, resetForm, handleTree, addDateRange } from '@/utils/ruoyi'; import {
import { deepClone } from '@/utils/index'; parseTime,
import { download } from '@/utils/request'; resetForm,
import { getConfigKey } from '@/api/system/config'; handleTree,
addDateRange,
selectDictLabel,
isNullOrEmpty
} from '@/utils/ruoyi';
import {
deepClone
} from '@/utils/index';
import {
download
} from '@/utils/request';
import {
getConfigKey
} from '@/api/system/config';
import {
getDicts
} from '@/api/system/dict/data'
// 全局方法挂载 // 全局方法挂载
Vue.prototype.parseTime = parseTime; Vue.prototype.parseTime = parseTime;
@ -13,3 +29,6 @@ Vue.prototype.handleTree = handleTree;
Vue.prototype.deepClone = deepClone; Vue.prototype.deepClone = deepClone;
Vue.prototype.addDateRange = addDateRange; Vue.prototype.addDateRange = addDateRange;
Vue.prototype.getConfigKey = getConfigKey; Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.getDicts = getDicts;
Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.isNullOrEmpty = isNullOrEmpty

@ -0,0 +1,194 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" size="mini">
<el-form-item>
<el-input v-model="queryParams.contact" placeholder="姓名/主办业务" clearable size="mini" style="width: 240px" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:maillist:add']">新增</el-button>
</el-form-item>
</el-form>
</el-row>
<el-table v-loading="loading.tableLoading" :data="tableDataList" stripe size="mini">
<el-table-column type="index" width="50" align="center" />
<el-table-column label="姓名" align="center" prop="contact" show-overflow-tooltip />
<el-table-column label="手机" align="center" prop="phone" show-overflow-tooltip />
<el-table-column label="固话" align="center" prop="tel" show-overflow-tooltip />
<el-table-column label="主办业务" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:maillist:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDelete(scope.row)" v-hasPermi="['system:maillist:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getPageList" />
<el-dialog title="通讯录" :visible.sync="modalVisible" width="500px" append-to-body :close-on-click-modal="false">
<el-form :model="modalForm" ref="modalForm" :rules="modalRules" size="mini" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="姓名" prop="contact">
<el-input v-model="modalForm.contact" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="modalForm.phone" placeholder="请输入联系电话"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="联系固话" prop="tel">
<el-input v-model="modalForm.tel" placeholder="请输入联系固话"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="主办业务" prop="remark">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" v-model="modalForm.remark" placeholder="请输入主办业务" />
</el-form-item>
</el-row>
</el-form>
<span slot="footer">
<el-button size="mini" @click="modalVisible = false"> </el-button>
<el-button size="mini" type="primary" v-loading="loading.modalSaveLoading" @click="handleSave"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getMaillistTableList, updateMaillist, insertMaillist, deleteMaillist } from "@/api/system/maillist";
import { validateMoney } from '@/utils/validate'
export default {
name: 'Maillist',
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
typeName: undefined,
status: undefined,
deptId: this.$store.getters.schoolId,
licenseType: undefined
},
loading: {
tableLoading: false,
modalSaveLoading: false
},
tableDataList: [],
total: 0,
statusOptions: [],
licenseTypeOption: [],
modalVisible: false,
modalForm: {},
modalRules: {
contact: { required: true, message: '姓名不为空', trigger: 'blur' },
originalPrice: { required: true, validator: validateMoney, trigger: 'blur' },
currentPrice: { required: true, validator: validateMoney, trigger: 'blur' }
},
};
},
created() {
this.getPageList();
},
methods: {
//
handleQuery() {
this.queryParams.page = 1;
this.getPageList();
},
getPageList() {
this.loading.tableLoading = true;
getMaillistTableList(this.queryParams).then(response => {
this.tableDataList = response.rows;
this.total = response.total;
this.loading.tableLoading = false;
});
},
//
resetQuery() {
this.queryParams.typeName = "";
this.queryParams.status = undefined;
this.handleQuery();
},
//
handleAdd() {
this.modalVisible = true;
this.modalForm = {
typeName: '',
status: '0',
originalPrice: undefined,
licenseType: 'C1',
description: '',
currentPrice: undefined
}
},
//
handleUpdate(listItem) {
this.modalForm = Object.assign({}, listItem);
this.modalVisible = true;
},
//
handleSave() {
this.$refs.modalForm.validate((valid) => {
if (valid) {
this.loading.modalSaveLoading = true;
if (this.modalForm.mailId) {
updateMaillist(this.modalForm).then(resp => {
if (resp.code == 200) {
this.$message.success('修改成功');
this.modalVisible = false;
this.loading.modalSaveLoading = false;
this.getPageList();
} else {
this.$message.error('修改失败:' + resp.message);
this.loading.modalSaveLoading = false;
}
})
} else {
this.$set(this.modalForm, 'deptId', this.$store.getters.schoolId);
insertMaillist(this.modalForm).then(resp => {
if (resp.code == 200) {
this.$message.success('新增成功');
this.modalVisible = false;
this.loading.modalSaveLoading = false;
this.getPageList();
} else {
this.$message.error('新增失败:' + resp.message);
this.loading.modalSaveLoading = false;
}
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(listItem) {
this.modalForm = Object.assign({}, listItem);
const roleIds = this.modalForm.mailId || this.ids;
this.$confirm('是否确认删除通讯录"' + this.modalForm.contact + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
return deleteMaillist(roleIds);
}).then(() => {
this.getPageList();
this.msgSuccess("删除成功");
}).catch(function () { });
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
}
};
</script>

@ -1,50 +1,24 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="公告标题" prop="noticeTitle"> <el-form-item label="标题" prop="noticeTitle">
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.noticeTitle" placeholder="请输入通知标题" clearable size="mini" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="操作人员" prop="createBy">
<el-input v-model="queryParams.createBy" placeholder="请输入操作人员" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="类型" prop="noticeType">
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable>
<el-option v-for="dict in dict.type.sys_notice_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:notice:add']">新增</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:notice:remove']">删除</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <!-- 列表 -->
<el-col :span="1.5"> <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange" border>
<el-button v-hasPermi="['system:notice:add']" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:notice:edit']" type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['system:notice:remove']" type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除</el-button>
</el-col>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" /> <el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column label="公告标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true" /> <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true" />
<el-table-column label="公告类型" align="center" prop="noticeType" width="100"> <!-- <el-table-column label="公告类型" align="center" prop="noticeType" :formatter="typeFormat" width="100" /> -->
<template slot-scope="scope"> <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" width="100" />
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="100" /> <el-table-column label="创建者" align="center" prop="createBy" width="100" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100"> <el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -53,8 +27,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-hasPermi="['system:notice:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button>
<el-button v-hasPermi="['system:notice:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -65,33 +39,53 @@
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="24">
<el-form-item label="标题" prop="noticeTitle">
<el-input v-model="form.noticeTitle" placeholder="请输入标题" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公告标题" prop="noticeTitle"> <el-form-item label="频次" prop="frequency">
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" /> <el-select v-model="form.frequency" @change="frequencyChange">
<el-option v-for="dict in frequencyOptions" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公告类型" prop="noticeType"> <el-form-item label="时间" prop="timeList">
<el-select v-model="form.noticeType" placeholder="请选择公告类型"> <el-select v-model="form.timeList" placeholder="请选择" :multiple="timeMultiple">
<el-option v-for="dict in dict.type.sys_notice_type" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in timeOptions" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="状态"> <el-form-item label="发送给" prop="toUserList">
<el-radio-group v-model="form.status"> <!-- <el-input v-model="form.toUserName" v-if="form.toUserName != undefined" :disabled="true"></el-input>
<el-radio v-for="dict in dict.type.sys_notice_status" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio> + -->
</el-radio-group> <el-select v-model="form.toUserList" multiple placeholder="请选择" size="small" style="width:97%; padding-top:5px;">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="内容"> <el-form-item label="内容">
<editor v-model="form.noticeContent" :min-height="192" /> <el-input type="textarea" :rows="6" v-model="form.noticeContent"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer" style="padding-top:20px">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
@ -100,11 +94,22 @@
</template> </template>
<script> <script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/notice'; import {
listNotice,
getNotice,
delNotice,
addNotice,
updateNotice,
exportNotice,
} from '@/api/system/notice'
import Editor from '@/components/Editor'
import empApi from '@/api/system/employee'
export default { export default {
name: 'Notice', name: 'Notice',
dicts: ['sys_notice_status', 'sys_notice_type'], components: {
Editor,
},
data() { data() {
return { return {
// //
@ -115,8 +120,6 @@ export default {
single: true, single: true,
// //
multiple: true, multiple: true,
//
showSearch: true,
// //
total: 0, total: 0,
// //
@ -125,40 +128,93 @@ export default {
title: '', title: '',
// //
open: false, open: false,
//
statusOptions: [],
//
typeOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
noticeTitle: undefined, noticeTitle: undefined,
createBy: undefined, createBy: undefined,
status: undefined status: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
noticeTitle: [{ required: true, message: '公告标题不能为空', trigger: 'blur' }], noticeTitle: [
noticeType: [{ required: true, message: '公告类型不能为空', trigger: 'change' }] { required: true, message: '公告标题不能为空', trigger: 'blur' },
} ],
}; noticeType: [
{ required: true, message: '公告类型不能为空', trigger: 'blur' },
],
frequency: [
{ required: true, message: '频次不能为空', trigger: 'blur' },
],
},
frequencyOptions: [
{
label: '实时',
value: 0,
},
{
label: '每天',
value: 1,
},
{
label: '每周',
value: 2,
},
{
label: '每月',
value: 3,
},
],
timeOptions: [],
userOptions: [],
timeMultiple: false,
days: [],
weeks: [],
months: [],
}
}, },
created() { created() {
this.getList(); this.getList()
this.getDicts('sys_notice_status').then((response) => {
this.statusOptions = response.data
})
this.getDicts('sys_notice_type').then((response) => {
this.typeOptions = response.data
})
this.getEmployee()
this.getDays()
this.getWeeks()
this.getMonths()
}, },
methods: { methods: {
/** 查询公告列表 */ /** 查询公告列表 */
getList() { getList() {
this.loading = true; this.loading = true
listNotice(this.queryParams).then((response) => { listNotice(this.queryParams).then((response) => {
this.noticeList = response.rows; this.noticeList = response.rows
this.total = response.total; this.total = response.total
this.loading = false; this.loading = false
}); })
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status)
},
//
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.noticeType)
}, },
// //
cancel() { cancel() {
this.open = false; this.open = false
this.reset(); this.reset()
}, },
// //
reset() { reset() {
@ -167,76 +223,152 @@ export default {
noticeTitle: undefined, noticeTitle: undefined,
noticeType: undefined, noticeType: undefined,
noticeContent: undefined, noticeContent: undefined,
status: '0' status: '0',
}; frequency: 0,
timeList: undefined,
}
this.resetForm('form'); this.resetForm('form');
this.timeOptions = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm'); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.noticeId); this.ids = selection.map((item) => item.noticeId)
this.single = selection.length !== 1; this.single = selection.length != 1
this.multiple = !selection.length; this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset()
this.open = true; this.open = true
this.title = '添加公告'; this.title = '添加通知'
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset()
const noticeId = row.noticeId || this.ids; const noticeId = row.noticeId || this.ids
getNotice(noticeId).then((response) => { getNotice(noticeId).then((response) => {
this.form = response.data; this.form = response.data
this.open = true; this.open = true
this.title = '修改公告'; this.title = '修改通知'
}); this.getTimeValue(this.form.frequency)
})
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.noticeId) { if (this.form.noticeId != undefined) {
updateNotice(this.form).then((response) => { updateNotice(this.form).then((response) => {
this.$modal.msgSuccess('修改成功'); if (response.code === 200) {
this.open = false; this.$message.success('修改成功');
this.getList(); this.open = false
}); this.getList()
}
})
} else { } else {
addNotice(this.form).then((response) => { addNotice(this.form).then((response) => {
this.$modal.msgSuccess('新增成功'); if (response.code === 200) {
this.open = false; this.$message.success('新增成功');
this.getList(); this.open = false
}); this.getList()
}
})
} }
} }
}); })
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const noticeIds = row.noticeId || this.ids; const noticeIds = row.noticeId || this.ids
this.$modal this.$confirm(
.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?') '是否确认删除公告编号为"' + noticeIds + '"的数据项?',
'警告',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(function () { .then(function () {
return delNotice(noticeIds); return delNotice(noticeIds)
}) })
.then(() => { .then((resp) => {
this.getList(); if (resp.code === 200) {
this.$modal.msgSuccess('删除成功'); this.getList()
this.$message.success('删除成功');
}
}) })
.catch(() => {}); .catch(function () { })
} },
} frequencyChange(e) {
}; console.log(e)
</script> this.timeMultiple = false;
this.form.timeList = [];
this.timeOptions = [];
this.getTimeValue(e);
},
getTimeValue(e) {
if (e == 1) {
//
this.timeMultiple = true
this.timeOptions = this.days
} else if (e == 2) {
//
this.timeMultiple = true
this.timeOptions = this.weeks
} else if (e == 3) {
//
this.timeMultiple = true
this.timeOptions = this.months
} else {
this.timeOptions = undefined;
this.form.timeList = undefined;
}
},
getEmployee() {
empApi.getEmployee({ coach: false }).then((resp) => {
if (resp.code == 200) {
//this.userOptions = resp.data;
if (resp.data && resp.data.length > 0) {
this.userOptions.push({ id: 0, name: '所有人' });
resp.data.forEach(item => {
this.userOptions.push(item);
});
}
}
})
},
getDays() {
for (var i = 0; i < 24; i++) {
this.days.push({ label: i + '点', value: i })
}
},
getWeeks() {
this.weeks.push({ label: '周一', value: 2 })
this.weeks.push({ label: '周二', value: 3 })
this.weeks.push({ label: '周三', value: 4 })
this.weeks.push({ label: '周四', value: 5 })
this.weeks.push({ label: '周五', value: 6 })
this.weeks.push({ label: '周六', value: 7 })
this.weeks.push({ label: '周日', value: 1 })
},
getMonths() {
for (var i = 1; i < 31; i++) {
this.months.push({ label: i + '号', value: i })
}
},
},
}
</script>

@ -0,0 +1,259 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="60px" size="mini">
<el-form-item label="员工" prop="userId" v-hasPermi="['system:task:send']">
<el-select v-model="queryParams.userId" placeholder="请选择" size="mini">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="类型" prop="summaryType">
<el-select v-model="queryParams.summaryType" placeholder="请选择" size="mini">
<el-option label="月总结" :value="1" />
<el-option label="日总结" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="月份" prop="month">
<el-select v-model="queryParams.month" placeholder="请选择" size="mini">
<el-option v-for="dict in 12" :key="dict" :label="dict" :value="dict" />
</el-select>
</el-form-item>
<el-form-item label="日期" prop="day">
<el-date-picker v-model="queryParams.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" v-hasPermi="['system:summary:add']" size="mini" @click="handleAdd()">新增</el-button>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="taskList" border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column label="姓名" align="center" prop="employeeName" width="100" />
<el-table-column label="任务类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.summaryType == 1">月总结</span>
<span v-else>日总结</span>
</template>
</el-table-column>
<el-table-column label="月份" align="center" prop="month" />
= <el-table-column label="日期" align="center" prop="day" width="100" />
<el-table-column label="内容" align="center" min-width="100">
<template slot-scope="scope">
<div v-html="scope.row.content" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['system:summary:edit']" @click="handleUpdate(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<!-- <el-col :span="24">
<el-form-item label="员工" prop="userId">
<el-select v-model="form.userId" placeholder="请选择" size="small" :disabled="dayEdit">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item label="总结类型" prop="summaryType">
<el-radio-group v-model="form.summaryType">
<el-radio :label="1">月总结</el-radio>
<el-radio :label="2">日总结</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="月份" prop="month">
<el-select v-model="form.month" placeholder="请选择" size="mini" :disabled="dayEdit">
<el-option v-for="dict in 12" :key="dict" :label="dict" :value="dict" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.summaryType === 2">
<el-form-item label="日期" prop="day">
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" :disabled="dayEdit" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="任务内容" prop="content">
<!-- <editor v-model="form.content" /> -->
<el-input type="textarea" :rows="13" v-model="form.content"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="padding-top:20px">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { saveTask, getList } from '@/api/system/summary'
import Editor from '@/components/Editor'
import empAPi from '@/api/system/employee'
export default {
name: 'Summary',
components: {
Editor,
},
data() {
return {
//
loading: true,
//
total: 0,
//
taskList: [],
//
title: '',
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
userId: undefined,
summaryType: 1,
month: undefined,
day: undefined,
},
//
form: {},
//
rules: {
userId: [{ required: true, message: '员工不能为空', trigger: 'blur' }],
month: [{ required: true, message: '月份不能为空', trigger: 'blur' }],
day: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
content: [
{ required: true, message: '任务内容不能为空', trigger: 'blur' },
],
summaryType: [{ required: true, message: '总结类型不能为空', trigger: 'blur' }],
},
taskType: 1,
userOptions: [],
month: undefined,
day: undefined,
dayEdit: false,
userId: localStorage.getItem('userId'),
}
},
created() {
this.getList()
this.getEmployee()
let now = new Date()
let year = now.getFullYear() //
let month = now.getMonth() + 1 //
let date = now.getDate() //
this.month = month
this.day = year + '-' + month + '-' + date
},
methods: {
/** 查询公告列表 */
getList() {
this.loading = true
getList(this.queryParams).then((response) => {
this.taskList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
summaryType: 1,
userId: undefined,
month: this.month,
day: undefined,
content: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.$set(this.form, 'userId', this.userId)
this.$set(this.form, 'day', this.day)
this.dayEdit = false
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
this.form = Object.assign({}, row)
this.taskType = this.form.taskType
if (this.form.taskType == 1) {
this.title = this.month + '月-总结'
} else {
this.title = this.month + '月-总结'
}
this.open = true
this.dayEdit = true
},
/** 提交按钮 */
submitForm: function () {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.summaryType === 1) {
this.form.day = undefined
}
saveTask(this.form).then((response) => {
if (response.code === 200) {
this.$message.success('保存成功');
this.open = false
this.getList()
}
})
}
})
},
//
getEmployee() {
empAPi.getEmployee({ coach: false }).then((resp) => {
if (resp.code == 200) {
//this.userOptions = resp.data;
if (resp.data && resp.data.length > 0) {
resp.data.forEach((item) => {
this.userOptions.push(item)
})
}
}
})
},
},
}
</script>

@ -174,7 +174,9 @@ import {
updateAccept, updateAccept,
getAccept getAccept
} from '@/api/zs/clue'; } from '@/api/zs/clue';
import { getEmployee, getAllPlaces, importData } from '@/api/tool/common'; import { importData } from '@/api/tool/common';
import empApi from '@/api/system/employee'
import { getAllPlaces } from '@/api/sch/place'
export default { export default {
name: 'Clue', name: 'Clue',
components: { components: {
@ -308,7 +310,7 @@ export default {
getPageList() { getPageList() {
this.tableLoading = true; this.tableLoading = true;
const params = { ...this.queryParams, etc: undefined }; const params = { ...this.queryParams, etc: undefined };
getClueList(this.opearateRequestParams(params)).then((response) => { getClueList(params).then((response) => {
this.tableDataList = response.rows; this.tableDataList = response.rows;
this.queryParams.total = response.total; this.queryParams.total = response.total;
this.tableLoading = false; this.tableLoading = false;
@ -437,7 +439,7 @@ export default {
} }
}); });
}) })
.catch(function () {}); .catch(function () { });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -477,7 +479,7 @@ export default {
}); });
}, },
getEmployee() { getEmployee() {
getEmployee({ coach: false }).then((resp) => { empApi.getEmployee({ coach: false }).then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
this.userOptions = resp.data; this.userOptions = resp.data;
} }
@ -485,7 +487,7 @@ export default {
}, },
// 线 // 线
getEmployee2() { getEmployee2() {
getEmployee({ coach: false }).then((resp) => { empApi.getEmployee().then((resp) => {
if (resp.code === 200) { if (resp.code === 200) {
this.userOptions2 = resp.data; this.userOptions2 = resp.data;
this.userOptions2 = this.userOptions2.filter((item) => { this.userOptions2 = this.userOptions2.filter((item) => {

@ -0,0 +1,80 @@
<template>
<div>
<el-row>
<el-form ref="queryForm" :model="queryParams" inline>
<el-row>
<el-form-item>
<el-input v-model="queryParams.name" placeholder="姓名/联系方式" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.source" placeholder="选择线索来源" clearable @change="handleQuery">
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :value="dict.dictValue" />
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.intentionState" placeholder="选择意向状态" clearable @change="handleQuery">
<el-option v-for="dict in intentionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue">
<i class="el-icon-star-on" :style="dict.cssClass" />
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictValue }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.followUser2" placeholder="选择跟进人员" filterable clearable @change="handleQuery">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label-width="80">
<template slot="label">
<el-button type="text" @click="handleFilter">筛选</el-button>
</template>
<el-checkbox-group v-model="queryParams.etc" @change="etcChange">
<el-checkbox v-if="filterItems.myCreate" label="myCreate">我创建的</el-checkbox>
<el-checkbox v-if="filterItems.myValid" label="myValid">我的有效</el-checkbox>
<el-checkbox v-if="filterItems.valid" label="valid">有效线索</el-checkbox>
<el-checkbox v-if="filterItems.todayValid" label="todayValid">今日有效线索</el-checkbox>
<el-checkbox v-if="filterItems.todayFollow" label="todayFollow">今日跟踪</el-checkbox>
<el-checkbox v-if="filterItems.outtime" label="outtime">
<el-badge :value="expireCount" type="danger">过期线索</el-badge>
</el-checkbox>
<el-checkbox v-if="filterItems.relate" label="relate">相关线索</el-checkbox>
<el-checkbox v-if="filterItems.reSign" label="reSign">撞单线索</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item class="m20">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="handlePublicClue">公海</el-button>
<el-dropdown trigger="click">
<el-button type="primary">
更多
<i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleImport(false)">导入</el-dropdown-item>
<el-dropdown-item @click.native="handleImport(true)">一点通导入</el-dropdown-item>
<el-dropdown-item v-if="admin == 'true'" @click.native="handleExport">导出</el-dropdown-item>
<el-dropdown-item v-if="admin == 'true'" @click.native="handleBatChUpdate()">批量修改</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-form-item>
<!-- <el-button type="primary" v-if="admin != 'true' && accept" @click="handleAccept(false)">停止接收</el-button>
<el-button type="primary" v-if="admin != 'true' && !accept" @click="handleAccept(true)">启动接收</el-button> -->
</el-row>
</el-form>
</el-row>
</div>
</template>
<script>
export default {
}
</script>

@ -35,7 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://192.168.1.114:8086`, target: `http://192.168.2.39:8086`,
// target: `http://vue.ruoyi.vip/prod-api/`, // target: `http://vue.ruoyi.vip/prod-api/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
@ -105,12 +105,10 @@ module.exports = {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
.after('html') .after('html')
.use('script-ext-html-webpack-plugin', [ .use('script-ext-html-webpack-plugin', [{
{ // `runtime` must same as runtimeChunk name. default is `runtime`
// `runtime` must same as runtimeChunk name. default is `runtime` inline: /runtime\..*\.js$/
inline: /runtime\..*\.js$/ }])
}
])
.end(); .end();
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: 'all',

Loading…
Cancel
Save