Browse Source

bug提交

V1.0
mk 3 years ago
parent
commit
a377e003ee
  1. 6
      src/views/modules/shequzhili/issue/issueAuditList.vue
  2. 6
      src/views/modules/shequzhili/issue/issueList.vue
  3. 533
      src/views/modules/shequzhili/xiangmu/index.vue
  4. 32
      src/views/modules/visual/cpts/line-chart.vue

6
src/views/modules/shequzhili/issue/issueAuditList.vue

@ -260,10 +260,10 @@ export default {
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
// disabledDate: endDisabledDate
disabledDate: endDisabledDate
},
startPickerOptions: {
// disabledDate: startDisabledDate
disabledDate: startDisabledDate
},
issueId: '',
issueDetailData: {},
@ -482,7 +482,7 @@ export default {
}
this.pageNo = 1
// this.getTableData();
this.getTableData();
},
deepTree (arr, child) {

6
src/views/modules/shequzhili/issue/issueList.vue

@ -287,10 +287,10 @@ export default {
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
endPickerOptions: {
// disabledDate: endDisabledDate
disabledDate: endDisabledDate
},
startPickerOptions: {
// disabledDate: startDisabledDate
disabledDate: startDisabledDate
},
issueId: '',
issueDetailData: {},
@ -531,7 +531,7 @@ export default {
}
this.pageNo = 1
// this.getTableData();
this.getTableData();
},
deepTree (arr, child) {

533
src/views/modules/shequzhili/xiangmu/index.vue

@ -1,218 +1,274 @@
<template>
<div class="resi-container">
<div class="g-main"
v-show="pageType == 'list'">
<div ref="searchCard"
class="m-search">
<el-form ref="searchForm"
:inline="true"
:model="fmData"
:label-width="'100px'"
class="demo-form-inline">
<el-form-item label="项目标题"
prop="title">
<el-input v-model="fmData.title"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="转项目时间"
prop="date">
<el-date-picker v-model="fmData.startDate"
size="small"
class="u-item-width-daterange"
type="date"
value-format="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model="fmData.endDate"
size="small"
type="date"
class="u-item-width-daterange u-data-tag"
value-format="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态"
prop="status">
<el-select v-model.trim="fmData.status"
placeholder="请选择"
size="small"
clearable
class="u-item-width-normal">
<el-option v-for="item in optionsStatus"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="24" align="right">
<el-button type="primary"
size="small"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--white"
size="small"
@click="resetForm('searchForm')">重置</el-button>
</el-col>
</el-row>
<div class="g-main" v-show="pageType == 'list'">
<div ref="searchCard" class="m-search">
<el-form
ref="searchForm"
:inline="true"
:model="fmData"
:label-width="'100px'"
class="demo-form-inline"
>
<el-form-item label="项目标题" prop="title">
<el-input
v-model="fmData.title"
class="u-item-width-normal"
size="small"
clearable
placeholder="请输入"
>
</el-input>
</el-form-item>
<el-form-item label="转项目时间" prop="date">
<el-date-picker
v-model="fmData.startDate"
size="small"
:picker-options="startPickerOptions"
class="u-item-width-daterange"
type="date"
value-format="yyyy-MM-dd"
placeholder="开始时间"
>
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker
v-model="fmData.endDate"
:picker-options="endPickerOptions"
size="small"
type="date"
class="u-item-width-daterange u-data-tag"
value-format="yyyy-MM-dd"
placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model.trim="fmData.status"
placeholder="请选择"
size="small"
clearable
class="u-item-width-normal"
>
<el-option
v-for="item in optionsStatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="24" align="right">
<el-button type="primary" size="small" @click="handleSearch"
>查询</el-button
>
<el-button
class="diy-button--white"
size="small"
@click="resetForm"
>重置</el-button
>
</el-col>
</el-row>
</el-form>
</div>
<div class="resi-row-btn">
<el-button v-if="false"
class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button v-if="false"
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload :headers="$getElUploadHeaders()"
v-if="false"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--delete"
:loading="importLoading">{{ importBtnTitle }}</el-button>
</el-upload>
<div class="resi-row-btn">
<el-button
v-if="false"
class="diy-button--add"
size="small"
@click="handleAdd"
>新增</el-button
>
<el-button
v-if="false"
class="diy-button--export"
size="small"
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
:headers="$getElUploadHeaders()"
v-if="false"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button
size="small"
class="diy-button--delete"
:loading="importLoading"
>{{ importBtnTitle }}</el-button
>
</el-upload>
</div>
<div class="m-table">
<div class="div_btn">
<el-button @click="handleChu" type="primary" size="small"
>导出</el-button
>
</div>
<div class="m-table">
<div class="div_btn">
<el-button @click="handleChu"
type="primary"
size="small">导出</el-button>
</div>
<el-table :data="tableData"
border
style="width: 100%"
class="m-table-item"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true">
<el-table
:data="tableData"
border
style="width: 100%"
class="m-table-item"
:height="maxTableHeight"
>
<el-table-column
label="序号"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
prop="gridName"
align="center"
label="所属网格"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="title"
label="项目标题"
align="center"
:show-overflow-tooltip="true">
<el-table-column
prop="title"
label="项目标题"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="shiftProjectTime"
width="100"
align="center"
label="转项目时间"
:show-overflow-tooltip="true">
<el-table-column
prop="shiftProjectTime"
width="100"
align="center"
label="转项目时间"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="projectScheme"
align="center"
label="项目方案"
:show-overflow-tooltip="true">
<el-table-column
prop="projectScheme"
align="center"
label="项目方案"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="internalRemark"
align="center"
label="内部备注"
:show-overflow-tooltip="true">
<el-table-column
prop="internalRemark"
align="center"
label="内部备注"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="originName"
align="center"
label="来源"
width="100"
:show-overflow-tooltip="true">
<el-table-column
prop="originName"
align="center"
label="来源"
width="100"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="departmentNameList"
align="center"
label="当前处理部门 "
:show-overflow-tooltip="true">
<el-table-column
prop="departmentNameList"
align="center"
label="当前处理部门 "
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column prop="detentionDays"
align="center"
label="滞留工作日 "
:show-overflow-tooltip="true">
<el-table-column
prop="detentionDays"
align="center"
label="滞留工作日 "
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<el-table-column
fixed="right"
label="操作"
align="center"
width="100"
>
<template slot-scope="scope">
<el-button v-if="scope.row.status == 'pending' && scope.row.processable"
@click="handleEdit(scope.$index)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button>
<el-button v-else
@click="handleWatch(scope.$index)"
type="text"
size="small">查看</el-button>
<el-popconfirm v-if="false"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px">删除</el-button>
<el-button
v-if="scope.row.status == 'pending' && scope.row.processable"
@click="handleEdit(scope.$index)"
type="text"
size="small"
class="div-table-button--edit"
>处理</el-button
>
<el-button
v-else
@click="handleWatch(scope.$index)"
type="text"
size="small"
>查看</el-button
>
<el-popconfirm
v-if="false"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)"
>
<el-button
slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
<div class="g-page"
v-if="pageType == 'edit' || pageType == 'info'">
<project-info ref="eleEditForm"
:type="pageType"
:projectId="currentProject.projectId"
@close="handleClose"
@afterEdit="handleEditSuccess" />
<div class="g-page" v-if="pageType == 'edit' || pageType == 'info'">
<project-info
ref="eleEditForm"
:type="pageType"
:projectId="currentProject.projectId"
@close="handleClose"
@afterEdit="handleEditSuccess"
/>
</div>
</div>
</template>
@ -227,7 +283,26 @@ import axios from "axios";
export default {
components: { projectInfo },
data () {
data() {
let endDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
if (this.fmData.startDate) {
let startDate = new Date(this.fmData.startDate);
return (
time.getTime() > nowData ||
time.getTime() < startDate ||
time.getTime() === startDate
);
} else {
return time.getTime() > nowData;
}
};
let startDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
return time.getTime() > nowData;
};
return {
pageType: "list", // list dispose info issue-info
@ -259,6 +334,13 @@ export default {
importBtnTitle: "导入",
importLoading: false,
endPickerOptions: {
disabledDate: endDisabledDate,
},
startPickerOptions: {
disabledDate: startDisabledDate,
},
currentProject: {
projectId: "",
userId: "",
@ -267,7 +349,7 @@ export default {
};
},
computed: {
maxTableHeight () {
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 360 + this.iframeHeigh
: this.clientHeight - 360;
@ -285,11 +367,11 @@ export default {
}
},
},
mounted () {
mounted() {
this.getTableData();
},
methods: {
async handleExportModule () {
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
@ -326,18 +408,18 @@ export default {
});
},
//
handleExcelSuccess (res, file) {
handleExcelSuccess(res, file) {
if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res);
} else {
this.$message.error(res.msg);
}
},
handleProgress (event, file, fileList) {
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
beforeExcelUpload (file) {
beforeExcelUpload(file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
@ -354,7 +436,7 @@ export default {
}
return fileType && isLt1M;
},
async uploadHttpRequest (file) {
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
@ -409,29 +491,35 @@ export default {
this.$refs.upload.clearFiles();
},
handleSizeChange (val) {
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleSearch (val) {
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.handleSearch();
resetForm(formName) {
(this.fmData = {
title: "",
status: "",
startDate: "",
endDate: "",
date: ["", ""],
}),
this.handleSearch();
},
async handleChu () {
async handleChu() {
const url = "/governance/project/project-list-export";
const { pageSize, pageNo, fmData } = this;
axios({
@ -466,8 +554,8 @@ export default {
});
},
async handleAdd () { },
async handleWatch (rowIndex) {
async handleAdd() {},
async handleWatch(rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
@ -475,7 +563,7 @@ export default {
this.pageType = "info";
},
async handleEdit (rowIndex) {
async handleEdit(rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
@ -483,19 +571,19 @@ export default {
this.pageType = "edit";
},
handleClose () {
handleClose() {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess () {
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleDel (rowData, rowIndex) {
async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
@ -513,7 +601,7 @@ export default {
}
},
async getTableData () {
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/governance/project/project-list";
const { pageSize, pageNo, fmData } = this;
@ -527,27 +615,24 @@ export default {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
return item;
})
: [];
this.tableData.forEach(item => {
if (item.origin === 'issue') {
item.originName = '议题 '
} else if (item.origin === 'agency') {
item.originName = '项目立项'
} else if (item.origin === 'resi_event') {
item.originName = '旧版事件上报'
} else if (item.origin === 'work_event') {
item.originName = '巡查上报'
} else if (item.origin === 'ic_event') {
item.originName = '事件'
this.tableData.forEach((item) => {
if (item.origin === "issue") {
item.originName = "议题 ";
} else if (item.origin === "agency") {
item.originName = "项目立项";
} else if (item.origin === "resi_event") {
item.originName = "旧版事件上报";
} else if (item.origin === "work_event") {
item.originName = "巡查上报";
} else if (item.origin === "ic_event") {
item.originName = "事件";
} else {
item.sourceTypeName = '--'
item.sourceTypeName = "--";
}
});
} else {
}

32
src/views/modules/visual/cpts/line-chart.vue

@ -87,6 +87,7 @@ const iniChart = function (config, srcData) {
// type: "linear",
},
});
//
chart.axis("date", {
line: {
@ -117,6 +118,19 @@ const iniChart = function (config, srcData) {
fill: "#B5B7BF",
},
});
chart.tooltip({
custom: true, // tooltip
showXTip: true, // X
showYTip: true, // Y
snap: true, // 线
crosshairsType: "xy", // 线
crosshairsStyle: {
// 线
lineDash: [2], // 线
stroke: "rgba(255, 0, 0, 0.25)",
lineWidth: 20,
},
});
//
chart.legend({
position: "bottom",
@ -156,6 +170,21 @@ const iniChart = function (config, srcData) {
],
});
// 线
// chart.tooltip({
// showCrosshairs: true, // Tooltip 线
// shared: true,
// });
// // new Add -- tooltip:change
// chart.on('tooltip:change', ev => {
// // ev
// hoverData = ev.data.items[0].data;
// })
// // new Add -- plot
// chart.on('plot:click', ev => {
// // tooltiphoverDatahoverData线
// console.log(JSON.stringify(hoverData));
// })
chart
.line()
.position("date*value")
@ -170,7 +199,6 @@ const iniChart = function (config, srcData) {
})
.animate();
chart.render();
addTextShape();
// chart return
@ -216,6 +244,8 @@ export default {
},
async created() {
await nextTick(200);
console.log(this.config, "config");
console.log(this.list, "list");
iniChart(this.config, this.list);
await nextTick(200);
this.iniLoading = true;

Loading…
Cancel
Save