|
@@ -21,19 +21,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['report:RECORD:add']"
|
|
|
- >新增
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['report:RECORD:edit']"
|
|
|
- >修改
|
|
|
+ >导入
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -51,7 +39,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="RECORDList" @selection-change="handleSelectionChange" >
|
|
|
+ <el-table v-loading="loading" :data="RECORDList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column type="index" width="50" align="center" label="序号"/>
|
|
|
<el-table-column label="年份" align="center" prop="reportYear">
|
|
@@ -74,15 +62,15 @@
|
|
|
icon="el-icon-paperclip"
|
|
|
@click="handleInfo(scope.row)"
|
|
|
|
|
|
- >分析详情
|
|
|
+ >报告详情
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
+ icon="el-icon-upload"
|
|
|
v-hasPermi="['report:RECORD:edit']"
|
|
|
- >修改
|
|
|
+ @click="uploadReport(scope.row)"
|
|
|
+ >上传报告
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -103,26 +91,35 @@
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
- <div v-if="detail.open">
|
|
|
- <div>{{detail.title}}</div>
|
|
|
- <div>一、主要指标运行情况</div>
|
|
|
- <div>{?}</div>
|
|
|
- <p v-html="detail.form.result"></p>
|
|
|
- </div>
|
|
|
|
|
|
<!-- 添加或修改辅助决策对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body id="upload-win">
|
|
|
+ <el-dialog :title="title" :visible.sync="open" :modal="false" width="700px" append-to-body id="upload-win">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item prop="preface" label="报告总结">
|
|
|
+ <el-input v-model="form.preface" type="textarea" :rows="6" style="width: 450px"
|
|
|
+ placeholder="报告总结 ${preface}"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="gxTradeTotalMoney" label="全区外贸总值">
|
|
|
+ <el-input v-model="form.gxTradeTotalMoney" type="number" step="0.1" style="width: 450px"
|
|
|
+ placeholder="全区外贸进出口">
|
|
|
+ <template slot="append">亿元</template>
|
|
|
+ </el-input>
|
|
|
+ <div>用于计算综保区外贸占全区外贸进出口百分比</div>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="进出口总值">
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
+ :auto-upload="false"
|
|
|
:limit="1"
|
|
|
+ :data="{gxTradeTotalMoney:form.gxTradeTotalMoney}"
|
|
|
accept=".xlsx, .xls"
|
|
|
:headers="upload.headers"
|
|
|
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
|
:disabled="upload.isUploading"
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
:on-success="handleFileSuccess"
|
|
|
+ :on-change="onChange"
|
|
|
drag
|
|
|
>
|
|
|
<i class="el-icon-upload"></i>
|
|
@@ -145,19 +142,90 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :append-to-body="true"
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="notice.visible"
|
|
|
+ width="30%">
|
|
|
+ <span>确认不填写全区外贸总值直接上传?</span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="notice.visible = false">返回填写</el-button>
|
|
|
+ <el-button type="warning" @click="sureUpload">直接上传</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :title="word.title"
|
|
|
+ :visible.sync="word.visible"
|
|
|
+ width="800px">
|
|
|
+ <div style="height: 400px;overflow-y: auto">
|
|
|
+ <el-timeline>
|
|
|
+ <el-timeline-item
|
|
|
+ v-for="(activity, index) in word.activities"
|
|
|
+ :key="index"
|
|
|
+ :timestamp="activity.timestamp" style="padding-top: 20px">
|
|
|
+ {{activity.content}}<span style="font-size: 10px;padding-left: 15px"><el-link type="primary" @click="prev(activity)">下载</el-link></span>
|
|
|
+ </el-timeline-item>
|
|
|
+ </el-timeline>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="word.visible=false">关 闭</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :title="self.title" :visible.sync="self.open" :modal="false" width="500px" append-to-body id="upload-win">
|
|
|
+ <div style="text-align: center;padding: 20px">
|
|
|
+ <el-upload
|
|
|
+ ref="selfUpload"
|
|
|
+ :limit="1"
|
|
|
+ accept=".doc,.docx"
|
|
|
+ :headers="upload.headers"
|
|
|
+ :data="{id:self.form.id}"
|
|
|
+ :action="selfUrl"
|
|
|
+ :on-success="handleUploadSuccess"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ 将文件拖到此处,或
|
|
|
+ <em>点击上传</em>
|
|
|
+ </div>
|
|
|
+ <div class="el-upload__tip text-left" slot="tip">
|
|
|
+ <span>仅允许导入doc、docx格式文件。</span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="self.open=false">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {getRECORD, listRECORD, addRECORD, delRECORD, updateRECORD} from "@/api/report/RECORD";
|
|
|
+import {listAllWORD} from "@/api/report/WORD"
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
-import {Loading} from 'element-ui';
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
name: "RECORD",
|
|
|
data() {
|
|
|
return {
|
|
|
+ word:{
|
|
|
+ title:'',
|
|
|
+ visible: false,
|
|
|
+ activities:[]
|
|
|
+ },
|
|
|
+ notice: {
|
|
|
+ visible: false,
|
|
|
+ },
|
|
|
+ selfUrl: process.env.VUE_APP_BASE_API + '/report/RECORD/upload',
|
|
|
+ self:{
|
|
|
+ title:'',
|
|
|
+ visible: false,
|
|
|
+ open:false,
|
|
|
+ form:{}
|
|
|
+ },
|
|
|
// 根路径
|
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
|
// 遮罩层
|
|
@@ -181,6 +249,7 @@ export default {
|
|
|
upload: {
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
open: false,
|
|
|
+ uploadFinish: false,
|
|
|
// 弹出层标题(用户导入)
|
|
|
title: '',
|
|
|
// 是否禁用上传
|
|
@@ -201,16 +270,20 @@ export default {
|
|
|
reportMonth: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ preface: null,
|
|
|
+ gxTradeTotalMoney: null,
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ gxTradeTotalMoney: []
|
|
|
},
|
|
|
- detail:{
|
|
|
- title:'详情',
|
|
|
- open:false,
|
|
|
- form:{
|
|
|
- result:''
|
|
|
- }
|
|
|
+ detail: {
|
|
|
+ title: '详情',
|
|
|
+ open: false,
|
|
|
+ form: {
|
|
|
+ result: ''
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -218,12 +291,28 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ beforeUpload(file) {
|
|
|
+
|
|
|
+ },
|
|
|
+ sureUpload() {
|
|
|
+ this.notice.visible = false;
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ },
|
|
|
+ onChange(file, fileList) {
|
|
|
+ let gxTradeTotalMoney = this.form.gxTradeTotalMoney;
|
|
|
+ if (!gxTradeTotalMoney && !this.upload.uploadFinish) {
|
|
|
+ this.notice.visible = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ },
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
|
|
|
},
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
let code = response.code;
|
|
|
this.$refs.upload.clearFiles();
|
|
|
+ this.upload.uploadFinish = true;
|
|
|
if (code !== 200) {
|
|
|
this.$message.error(response.msg);
|
|
|
return;
|
|
@@ -233,12 +322,51 @@ export default {
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
},
|
|
|
- handleInfo(row){
|
|
|
- this.detail={
|
|
|
- title:row.reportYear+'年'+row.reportMonth+'月',
|
|
|
+ handleUploadSuccess(response, file, fileList) {
|
|
|
+ let code = response.code;
|
|
|
+ this.$refs.selfUpload.clearFiles();
|
|
|
+ if (code !== 200) {
|
|
|
+ this.$message.error(response.msg);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$message.success('上传成功');
|
|
|
+ this.self.open = false;
|
|
|
+ this.self.visible=false;
|
|
|
+ },
|
|
|
+ uploadReport(data){
|
|
|
+ this.self={
|
|
|
+ title: "上传【"+data.reportYear+"年"+data.reportMonth+"月】的自定义报告",
|
|
|
+ visible: true,
|
|
|
open: true,
|
|
|
- form:row
|
|
|
+ form: data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleInfo(row) {
|
|
|
+ listAllWORD({recordId:row.id}).then(resp=>{
|
|
|
+ let list = resp.data;
|
|
|
+ if (list.length===1){
|
|
|
+ window.location.href=list[0].wordPath;
|
|
|
+ return;
|
|
|
}
|
|
|
+ let activities=[];
|
|
|
+ list.forEach(data=>{
|
|
|
+ let obj={
|
|
|
+ timestamp:data.createTime,
|
|
|
+ content:data.wordName,
|
|
|
+ path:data.wordPath
|
|
|
+ }
|
|
|
+ activities.push(obj)
|
|
|
+ })
|
|
|
+ this.word = {
|
|
|
+ title: row.reportYear + '年' + row.reportMonth + '月历史报告',
|
|
|
+ open: true,
|
|
|
+ visible:true,
|
|
|
+ activities: activities
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ prev(data){
|
|
|
+ window.location.href=data.path;
|
|
|
},
|
|
|
/** 查询辅助决策列表 */
|
|
|
getList() {
|
|
@@ -286,7 +414,8 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加辅助决策";
|
|
|
+ this.title = "导入分析数据";
|
|
|
+ this.upload.uploadFinish = false;
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|