|
@@ -110,37 +110,37 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="应急物资说明">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="filterForm.data.explain"
|
|
|
- placeholder="应急物资说明"
|
|
|
- style="width: 100%;"
|
|
|
- @keyup.enter.native="getTableData(1)"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <!-- <el-col :span="6">
|
|
|
- <el-form-item label="展示模式">
|
|
|
- <el-select
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- allow-create
|
|
|
- v-model="filterForm.data.pattern"
|
|
|
- placeholder="请选择数据展示模式,默认为表格"
|
|
|
- style="width: 100%;"
|
|
|
- @change="selectTrigger(filterForm.data.pattern)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item,key) in nameObj.pattern.arr"
|
|
|
- :key="item.id"
|
|
|
- :value="item.id"
|
|
|
- :label="item.name"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="应急物资说明">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="filterForm.data.explain"
|
|
|
+ placeholder="应急物资说明"
|
|
|
+ style="width: 100%;"
|
|
|
+ @keyup.enter.native="getTableData(1)"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="6">
|
|
|
+ <el-form-item label="展示模式">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ allow-create
|
|
|
+ v-model="filterForm.data.pattern"
|
|
|
+ placeholder="请选择数据展示模式,默认为表格"
|
|
|
+ style="width: 100%;"
|
|
|
+ @change="selectTrigger(filterForm.data.pattern)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,key) in nameObj.pattern.arr"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-col> -->
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -194,14 +194,14 @@
|
|
|
@click="but_edit_plural()"
|
|
|
:loading="loading"
|
|
|
>修改</el-button>
|
|
|
- <el-button
|
|
|
- class="button"
|
|
|
- type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- v-privilege="activeMenu + 'DELETE'"
|
|
|
- @click="but_del_plural()"
|
|
|
- :loading="loading"
|
|
|
+ <el-button
|
|
|
+ class="button"
|
|
|
+ type="danger"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-privilege="activeMenu + 'DELETE'"
|
|
|
+ @click="but_del_plural()"
|
|
|
+ :loading="loading"
|
|
|
>删除</el-button>
|
|
|
<div style="float:right; text-align: right;">
|
|
|
<el-button
|
|
@@ -253,7 +253,7 @@
|
|
|
fixed="left"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- sortable
|
|
|
+ sortable
|
|
|
fixed
|
|
|
prop="fileName"
|
|
|
label="文件名称"
|
|
@@ -261,7 +261,7 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- sortable
|
|
|
+ sortable
|
|
|
fixed
|
|
|
prop="fileUrl"
|
|
|
label="文件路径"
|
|
@@ -303,7 +303,7 @@
|
|
|
<el-input
|
|
|
class="input-new-tag"
|
|
|
v-if="tableFormDataObj[scope.row.ID].showInput"
|
|
|
- v-model="tableFormDataObj[scope.row.ID].inputValue"
|
|
|
+ v-model="tableFormDataObj[scope.row.ID].inputValue"
|
|
|
style="width: 40%;"
|
|
|
:ref="scope.row.ID+'-saveTagInput'"
|
|
|
@keyup.enter.native="rowhandleInputConfirm(scope.row)"
|
|
@@ -327,46 +327,46 @@
|
|
|
{{ tag }}
|
|
|
</el-tag></template>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- sortable
|
|
|
- prop="explain"
|
|
|
- label="应急物资说明"
|
|
|
- width="140px"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- > <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-if="scope.row.isSelection"
|
|
|
- :prop="scope.row.ID + '.explain'"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- style="width: 100%;"
|
|
|
- v-model="tableFormDataObj[scope.row.ID].explain"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <span v-else>{{scope.row.explain}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- sortable
|
|
|
- prop="memo"
|
|
|
- label="备注"
|
|
|
- width="180px"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- > <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-if="scope.row.isSelection"
|
|
|
- :prop="scope.row.ID + '.memo'"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- style="width: 100%;"
|
|
|
- v-model="tableFormDataObj[scope.row.ID].memo"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <span v-else>{{scope.row.memo}}</span>
|
|
|
- </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ prop="explain"
|
|
|
+ label="应急物资说明"
|
|
|
+ width="140px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ > <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ v-if="scope.row.isSelection"
|
|
|
+ :prop="scope.row.ID + '.explain'"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="tableFormDataObj[scope.row.ID].explain"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <span v-else>{{scope.row.explain}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ prop="memo"
|
|
|
+ label="备注"
|
|
|
+ width="180px"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ > <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ v-if="scope.row.isSelection"
|
|
|
+ :prop="scope.row.ID + '.memo'"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="tableFormDataObj[scope.row.ID].memo"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <span v-else>{{scope.row.memo}}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
sortable
|
|
@@ -433,9 +433,9 @@
|
|
|
@current-change="getTableData()"
|
|
|
style="text-align: right;margin-top: 10px;"
|
|
|
></el-pagination>
|
|
|
- </div>
|
|
|
- <div class="icore-graphical-index" v-if="chart.show" :style="indiviadualStyle">
|
|
|
- <div class="icore-graphical-area" ref="graphical-area"></div>
|
|
|
+ </div>
|
|
|
+ <div class="icore-graphical-index" v-if="chart.show" :style="indiviadualStyle">
|
|
|
+ <div class="icore-graphical-area" ref="graphical-area"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -444,17 +444,17 @@
|
|
|
:visible.sync="dialogVisible"
|
|
|
destroy-on-close
|
|
|
width="90%"
|
|
|
- top="10vh">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-download"
|
|
|
- v-privilege="activeMenu + 'DOWNLOAD'"
|
|
|
- @click="downloadFile(chart.fileData)"
|
|
|
- :loading="loading"
|
|
|
- style="position: absolute; right: 100px; top: 20px;"
|
|
|
- >点击保存
|
|
|
- </el-button>
|
|
|
+ top="10vh">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ v-privilege="activeMenu + 'DOWNLOAD'"
|
|
|
+ @click="downloadFile(chart.fileData)"
|
|
|
+ :loading="loading"
|
|
|
+ style="position: absolute; right: 100px; top: 20px;"
|
|
|
+ >点击保存
|
|
|
+ </el-button>
|
|
|
<iframe :src="previewUrl" width="100%" :height="singleTableHeight"></iframe>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
@@ -626,16 +626,16 @@ export default {
|
|
|
name: 'DocumentClassification',
|
|
|
components: {
|
|
|
'zj-formulaEditor': formulaEditor
|
|
|
- },
|
|
|
- props: {
|
|
|
- width: {
|
|
|
- type: [Number, String],
|
|
|
- default: '100%'
|
|
|
- },
|
|
|
- height: {
|
|
|
- type: [Number, String],
|
|
|
- default: 1024
|
|
|
- }
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ width: {
|
|
|
+ type: [Number, String],
|
|
|
+ default: '100%'
|
|
|
+ },
|
|
|
+ height: {
|
|
|
+ type: [Number, String],
|
|
|
+ default: 1024
|
|
|
+ }
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -653,8 +653,8 @@ export default {
|
|
|
securityTag: '',
|
|
|
isprimary: '',
|
|
|
version: formatDate(new Date(), 'yyyyMM00'),
|
|
|
- fileName: '',
|
|
|
- pattern: 'table',
|
|
|
+ fileName: '',
|
|
|
+ pattern: 'table',
|
|
|
explain: '',
|
|
|
},
|
|
|
rules: {
|
|
@@ -697,26 +697,26 @@ export default {
|
|
|
securityTag: {
|
|
|
obj: {},
|
|
|
arr: []
|
|
|
- },
|
|
|
- pattern: {
|
|
|
- obj: {
|
|
|
- 'graphical': '图例',
|
|
|
- 'table': '表格'
|
|
|
- },
|
|
|
- arr: [
|
|
|
- {
|
|
|
- id: 'graphical',
|
|
|
- name: '图例'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'table',
|
|
|
- name: '表格'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- explain: {
|
|
|
- obj: {},
|
|
|
- arr: []
|
|
|
+ },
|
|
|
+ pattern: {
|
|
|
+ obj: {
|
|
|
+ 'graphical': '图例',
|
|
|
+ 'table': '表格'
|
|
|
+ },
|
|
|
+ arr: [
|
|
|
+ {
|
|
|
+ id: 'graphical',
|
|
|
+ name: '图例'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 'table',
|
|
|
+ name: '表格'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ explain: {
|
|
|
+ obj: {},
|
|
|
+ arr: []
|
|
|
}
|
|
|
},
|
|
|
loading: false,
|
|
@@ -737,8 +737,8 @@ export default {
|
|
|
unitid: '',
|
|
|
seqno: '',
|
|
|
code: '',
|
|
|
- fileType: '',
|
|
|
- explain: '',
|
|
|
+ fileType: '',
|
|
|
+ explain: '',
|
|
|
memo: ''
|
|
|
},
|
|
|
rules: {
|
|
@@ -769,81 +769,81 @@ export default {
|
|
|
qrRole: [],
|
|
|
userRoles: [],
|
|
|
dialogVisible: false,
|
|
|
- previewUrl: '',
|
|
|
- chart: {
|
|
|
- show: false,
|
|
|
- fileData: {
|
|
|
- fileName: '',
|
|
|
- fileUrl: ''
|
|
|
- },
|
|
|
- option: {
|
|
|
- title: {
|
|
|
- text: '文件一览图'
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
- triggerOn: 'mousemove'
|
|
|
- },
|
|
|
- toolbox: {
|
|
|
- feature: {
|
|
|
- saveAsImage: {}
|
|
|
- }
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- type: 'tree',
|
|
|
- data: [],
|
|
|
- top: '2%',
|
|
|
- left: '5%',
|
|
|
- bottom: '1%',
|
|
|
- right: '20%',
|
|
|
- symbolSize: 8,
|
|
|
- label: {
|
|
|
- position: 'left',
|
|
|
- verticalAlign: 'bottom',
|
|
|
- lineHeight: 40,
|
|
|
- align: 'right',
|
|
|
- fontSize: 16
|
|
|
- },
|
|
|
- leaves: {
|
|
|
- label: {
|
|
|
- position: 'right',
|
|
|
- verticalAlign: 'middle',
|
|
|
- align: 'left'
|
|
|
- }
|
|
|
- },
|
|
|
- emphasis: {
|
|
|
- focus: 'descendant'
|
|
|
- },
|
|
|
- initialTreeDepth: 2,
|
|
|
- expandAndCollapse: true,
|
|
|
- animationDuration: 550,
|
|
|
- animationDurationUpdate: 750,
|
|
|
- roam: true
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ previewUrl: '',
|
|
|
+ chart: {
|
|
|
+ show: false,
|
|
|
+ fileData: {
|
|
|
+ fileName: '',
|
|
|
+ fileUrl: ''
|
|
|
+ },
|
|
|
+ option: {
|
|
|
+ title: {
|
|
|
+ text: '文件一览图'
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ triggerOn: 'mousemove'
|
|
|
+ },
|
|
|
+ toolbox: {
|
|
|
+ feature: {
|
|
|
+ saveAsImage: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ type: 'tree',
|
|
|
+ data: [],
|
|
|
+ top: '2%',
|
|
|
+ left: '5%',
|
|
|
+ bottom: '1%',
|
|
|
+ right: '20%',
|
|
|
+ symbolSize: 8,
|
|
|
+ label: {
|
|
|
+ position: 'left',
|
|
|
+ verticalAlign: 'bottom',
|
|
|
+ lineHeight: 40,
|
|
|
+ align: 'right',
|
|
|
+ fontSize: 16
|
|
|
+ },
|
|
|
+ leaves: {
|
|
|
+ label: {
|
|
|
+ position: 'right',
|
|
|
+ verticalAlign: 'middle',
|
|
|
+ align: 'left'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ focus: 'descendant'
|
|
|
+ },
|
|
|
+ initialTreeDepth: 2,
|
|
|
+ expandAndCollapse: true,
|
|
|
+ animationDuration: 550,
|
|
|
+ animationDurationUpdate: 750,
|
|
|
+ roam: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
this.activeMenu = window.localStorage.getItem('activeMenu');
|
|
|
- },
|
|
|
- computed: {
|
|
|
- indiviadualStyle: function() {
|
|
|
- return (
|
|
|
- "width:" +
|
|
|
- (typeof this.width === "string" &&
|
|
|
- this.width.indexOf("%") !== -1
|
|
|
- ? this.width
|
|
|
- : parseFloat(this.width) + "px") +
|
|
|
- ";height:" +
|
|
|
- (typeof this.height === "string" &&
|
|
|
- this.height.indexOf("%") !== -1
|
|
|
- ? this.height
|
|
|
- : parseFloat(this.height) + "px")
|
|
|
- );
|
|
|
- }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ indiviadualStyle: function() {
|
|
|
+ return (
|
|
|
+ "width:" +
|
|
|
+ (typeof this.width === "string" &&
|
|
|
+ this.width.indexOf("%") !== -1
|
|
|
+ ? this.width
|
|
|
+ : parseFloat(this.width) + "px") +
|
|
|
+ ";height:" +
|
|
|
+ (typeof this.height === "string" &&
|
|
|
+ this.height.indexOf("%") !== -1
|
|
|
+ ? this.height
|
|
|
+ : parseFloat(this.height) + "px")
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
mounted () {
|
|
|
let that = this;
|
|
@@ -918,8 +918,8 @@ export default {
|
|
|
that.$message.error(res.message);
|
|
|
}
|
|
|
that.listTopicTree.loading = false;
|
|
|
- }).catch(function () {
|
|
|
- that.listTopicTree.loading = false;
|
|
|
+ }).catch(function () {
|
|
|
+ that.listTopicTree.loading = false;
|
|
|
});
|
|
|
},
|
|
|
// 获取产品
|
|
@@ -977,7 +977,7 @@ export default {
|
|
|
params = {
|
|
|
fileName: that.filterForm.data.fileName,
|
|
|
type: that.filterForm.data.securityTypeid,
|
|
|
- fileType: that.filterForm.data.securityTag.toString(),
|
|
|
+ fileType: that.filterForm.data.securityTag.toString(),
|
|
|
explain: that.filterForm.data.explain
|
|
|
};
|
|
|
that.pageNum = pageNum || that.pageNum;
|
|
@@ -1021,8 +1021,8 @@ export default {
|
|
|
updateMan: item.updateMan,
|
|
|
updateTime: item.updateTime,
|
|
|
showInput: false,
|
|
|
- inputValue: '',
|
|
|
- explain: item.explain,
|
|
|
+ inputValue: '',
|
|
|
+ explain: item.explain,
|
|
|
memo: item.memo
|
|
|
})
|
|
|
// }
|
|
@@ -1035,7 +1035,7 @@ export default {
|
|
|
that.total = res.data.total;
|
|
|
} else {
|
|
|
that.$message.error(res.message);
|
|
|
- }
|
|
|
+ }
|
|
|
that.getFileTreeData ();
|
|
|
that.tableLoading = false;
|
|
|
}).catch(function () {
|
|
@@ -1159,11 +1159,11 @@ export default {
|
|
|
// 行内input获取焦点
|
|
|
rowshowInput (row) {
|
|
|
let that = this;
|
|
|
- that.tableFormDataObj[row.ID].showInput = true;
|
|
|
+ that.tableFormDataObj[row.ID].showInput = true;
|
|
|
let id = row.ID + '-saveTagInput';
|
|
|
setTimeout(function(){
|
|
|
that.$nextTick(() => {
|
|
|
- // that.$refs[id].$refs.input.focus();
|
|
|
+ // that.$refs[id].$refs.input.focus();
|
|
|
that.$refs[id].focus();
|
|
|
});
|
|
|
},50)
|
|
@@ -1190,8 +1190,8 @@ export default {
|
|
|
SubmitData.push({
|
|
|
Id: that.tableFormDataObj[key].ID,
|
|
|
fileType: fileTypes,
|
|
|
- seqno: that.tableFormDataObj[key].seqno,
|
|
|
- explain: that.tableFormDataObj[key].explain,
|
|
|
+ seqno: that.tableFormDataObj[key].seqno,
|
|
|
+ explain: that.tableFormDataObj[key].explain,
|
|
|
memo: that.tableFormDataObj[key].memo
|
|
|
});
|
|
|
}
|
|
@@ -1248,12 +1248,12 @@ export default {
|
|
|
|
|
|
}
|
|
|
that.$message.error(res.message);
|
|
|
- }
|
|
|
+ }
|
|
|
that.loading = false;
|
|
|
}).catch(function () {
|
|
|
that.loading = false;
|
|
|
});
|
|
|
- }).catch(() => {
|
|
|
+ }).catch(() => {
|
|
|
that.loading = false;
|
|
|
});
|
|
|
} else {
|
|
@@ -1366,7 +1366,7 @@ export default {
|
|
|
fileUrl: data.fileUrl
|
|
|
};
|
|
|
// 不带token访问方式,留底后端修改shiroconfig.java,application.properties
|
|
|
- // let url = '/zhongsteel.pass.web/pass/ems/v1/uploadfiles/downloadFile/?fileName=' + that.tableFormDataObj[key].fileName + '&fileUrl=' + that.tableFormDataObj[key].fileUrl;
|
|
|
+ // let url = '/icore.icp.web/pass/ems/v1/uploadfiles/downloadFile/?fileName=' + that.tableFormDataObj[key].fileName + '&fileUrl=' + that.tableFormDataObj[key].fileUrl;
|
|
|
// const xhr = new XMLHttpRequest();
|
|
|
// xhr.open('GET', url, true);
|
|
|
// xhr.responseType = 'blob';
|
|
@@ -1435,7 +1435,7 @@ export default {
|
|
|
},
|
|
|
preview (data) {
|
|
|
let that = this;
|
|
|
- that.loading = true;
|
|
|
+ that.loading = true;
|
|
|
that.chart.fileData = data;
|
|
|
let SubmitData = {
|
|
|
fileName: data.fileName,
|
|
@@ -1454,7 +1454,7 @@ export default {
|
|
|
that.axios.get(urla, {
|
|
|
params: SubmitData,
|
|
|
responseType: responseType
|
|
|
- }).then(function (res) {
|
|
|
+ }).then(function (res) {
|
|
|
console.log('111');
|
|
|
let urlObject = window.URL || window.webkitURL || window;
|
|
|
// 将二进制流转为blob
|
|
@@ -1498,129 +1498,129 @@ export default {
|
|
|
that.$message.error('预览失败');
|
|
|
that.loading = false;
|
|
|
})
|
|
|
- },
|
|
|
- selectTrigger(val) {
|
|
|
- let that = this;
|
|
|
- if (val === 'graphical') {
|
|
|
- that.listTopicTree.show = false;
|
|
|
- that.chart.show = true;
|
|
|
- that.loading = true;
|
|
|
- setTimeout(() => {
|
|
|
- that.setGraphical();
|
|
|
- }, 1000)
|
|
|
- console.log(val);
|
|
|
- } else {
|
|
|
- that.chart.show = false;
|
|
|
- that.listTopicTree.show = true;
|
|
|
- console.log(val);
|
|
|
- }
|
|
|
- },
|
|
|
- getFileTreeData () {
|
|
|
- let that = this,
|
|
|
- params = {
|
|
|
- fileName: that.filterForm.data.fileName,
|
|
|
- type: that.filterForm.data.securityTypeid,
|
|
|
- fileType: that.filterForm.data.securityTag.toString()
|
|
|
- };
|
|
|
- that.tableLoading = true;
|
|
|
- let url = 'pass/ems/v1/uploadfiles/getFileTree/?securityInfo=' + that.qrRole;
|
|
|
- that.axios.get(url, {
|
|
|
- params: params
|
|
|
- })
|
|
|
- .then(function (res) {
|
|
|
- if (res.code === '0') {
|
|
|
- let arr = [];
|
|
|
- arr = that.treeDataUtil(res.data);
|
|
|
- that.chart.option.series[0].data = arr;
|
|
|
- that.setGraphical();
|
|
|
- } else {
|
|
|
- that.$message.error(res.message);
|
|
|
- }
|
|
|
- that.tableLoading = false;
|
|
|
- }).catch(function () {
|
|
|
- that.tableLoading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- treeDataUtil (treeData) {
|
|
|
- let that = this;
|
|
|
- let data = [];
|
|
|
- let children = [];
|
|
|
- let children1 = [];
|
|
|
- let i = 0;
|
|
|
- let name = '';
|
|
|
- for (let item of treeData) {
|
|
|
- i++;
|
|
|
- if(item.fileName === null) {
|
|
|
- if (item.children !== null){
|
|
|
- children = that.treeDataUtil(item.children);
|
|
|
- };
|
|
|
- data.push({
|
|
|
- name: item.createMan,
|
|
|
- children: children,
|
|
|
- });
|
|
|
- children = [];
|
|
|
- } else {
|
|
|
- if(name === '' || i === 1){
|
|
|
- name = item.createMan;
|
|
|
- } else if(name !== item.createMan) {
|
|
|
- data.push({
|
|
|
- name: name,
|
|
|
- children: children1,
|
|
|
- });
|
|
|
- children1 = [];
|
|
|
- name = item.createMan;
|
|
|
- }
|
|
|
- children1.push({
|
|
|
- name: item.fileName,
|
|
|
- value: item.fileUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if ( i=== treeData.length && children1.length !== 0 ) {
|
|
|
- data.push({
|
|
|
- name: name,
|
|
|
- children: children1,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- return data;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 根据参数生成不同类型的图形化控件
|
|
|
- */
|
|
|
- setGraphical: function() {
|
|
|
- let that = this;
|
|
|
- // 引入 ECharts 主模块
|
|
|
- let echarts = require("echarts");
|
|
|
- require("echarts-gl");
|
|
|
- // 基于准备好的dom,初始化echarts实例
|
|
|
- let myChart = echarts.init(this.$refs["graphical-area"]);
|
|
|
- myChart.showLoading();
|
|
|
- // 绘制图表
|
|
|
- myChart.setOption(that.chart.option);
|
|
|
- // 设置树图的点击事件
|
|
|
- myChart.on("click", function(param) {
|
|
|
- // 老版本不支持
|
|
|
- // if(param.event.target.culling === true){
|
|
|
- // return
|
|
|
- // } else if(param.event.target.culling === false){
|
|
|
- // let args = {
|
|
|
- // fileName: param.data.name,
|
|
|
- // fileUrl: param.data.value
|
|
|
- // } //当前节点及其子节点的值
|
|
|
- // let level = param.data.level; //当前节点的层级 eg:"1-1-0",可以通过level判断当前的层级,从而进行不同的操作
|
|
|
- // that.preview (args);
|
|
|
- // }
|
|
|
- if(param.data.value){
|
|
|
- let args = {
|
|
|
- fileName: param.data.name,
|
|
|
- fileUrl: param.data.value
|
|
|
- } //当前节点及其子节点的值
|
|
|
- let level = param.data.level; //当前节点的层级 eg:"1-1-0",可以通过level判断当前的层级,从而进行不同的操作
|
|
|
- that.preview (args);
|
|
|
- }
|
|
|
- });
|
|
|
- myChart.hideLoading();
|
|
|
- that.loading = false;
|
|
|
+ },
|
|
|
+ selectTrigger(val) {
|
|
|
+ let that = this;
|
|
|
+ if (val === 'graphical') {
|
|
|
+ that.listTopicTree.show = false;
|
|
|
+ that.chart.show = true;
|
|
|
+ that.loading = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.setGraphical();
|
|
|
+ }, 1000)
|
|
|
+ console.log(val);
|
|
|
+ } else {
|
|
|
+ that.chart.show = false;
|
|
|
+ that.listTopicTree.show = true;
|
|
|
+ console.log(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getFileTreeData () {
|
|
|
+ let that = this,
|
|
|
+ params = {
|
|
|
+ fileName: that.filterForm.data.fileName,
|
|
|
+ type: that.filterForm.data.securityTypeid,
|
|
|
+ fileType: that.filterForm.data.securityTag.toString()
|
|
|
+ };
|
|
|
+ that.tableLoading = true;
|
|
|
+ let url = 'pass/ems/v1/uploadfiles/getFileTree/?securityInfo=' + that.qrRole;
|
|
|
+ that.axios.get(url, {
|
|
|
+ params: params
|
|
|
+ })
|
|
|
+ .then(function (res) {
|
|
|
+ if (res.code === '0') {
|
|
|
+ let arr = [];
|
|
|
+ arr = that.treeDataUtil(res.data);
|
|
|
+ that.chart.option.series[0].data = arr;
|
|
|
+ that.setGraphical();
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.message);
|
|
|
+ }
|
|
|
+ that.tableLoading = false;
|
|
|
+ }).catch(function () {
|
|
|
+ that.tableLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ treeDataUtil (treeData) {
|
|
|
+ let that = this;
|
|
|
+ let data = [];
|
|
|
+ let children = [];
|
|
|
+ let children1 = [];
|
|
|
+ let i = 0;
|
|
|
+ let name = '';
|
|
|
+ for (let item of treeData) {
|
|
|
+ i++;
|
|
|
+ if(item.fileName === null) {
|
|
|
+ if (item.children !== null){
|
|
|
+ children = that.treeDataUtil(item.children);
|
|
|
+ };
|
|
|
+ data.push({
|
|
|
+ name: item.createMan,
|
|
|
+ children: children,
|
|
|
+ });
|
|
|
+ children = [];
|
|
|
+ } else {
|
|
|
+ if(name === '' || i === 1){
|
|
|
+ name = item.createMan;
|
|
|
+ } else if(name !== item.createMan) {
|
|
|
+ data.push({
|
|
|
+ name: name,
|
|
|
+ children: children1,
|
|
|
+ });
|
|
|
+ children1 = [];
|
|
|
+ name = item.createMan;
|
|
|
+ }
|
|
|
+ children1.push({
|
|
|
+ name: item.fileName,
|
|
|
+ value: item.fileUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if ( i=== treeData.length && children1.length !== 0 ) {
|
|
|
+ data.push({
|
|
|
+ name: name,
|
|
|
+ children: children1,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 根据参数生成不同类型的图形化控件
|
|
|
+ */
|
|
|
+ setGraphical: function() {
|
|
|
+ let that = this;
|
|
|
+ // 引入 ECharts 主模块
|
|
|
+ let echarts = require("echarts");
|
|
|
+ require("echarts-gl");
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ let myChart = echarts.init(this.$refs["graphical-area"]);
|
|
|
+ myChart.showLoading();
|
|
|
+ // 绘制图表
|
|
|
+ myChart.setOption(that.chart.option);
|
|
|
+ // 设置树图的点击事件
|
|
|
+ myChart.on("click", function(param) {
|
|
|
+ // 老版本不支持
|
|
|
+ // if(param.event.target.culling === true){
|
|
|
+ // return
|
|
|
+ // } else if(param.event.target.culling === false){
|
|
|
+ // let args = {
|
|
|
+ // fileName: param.data.name,
|
|
|
+ // fileUrl: param.data.value
|
|
|
+ // } //当前节点及其子节点的值
|
|
|
+ // let level = param.data.level; //当前节点的层级 eg:"1-1-0",可以通过level判断当前的层级,从而进行不同的操作
|
|
|
+ // that.preview (args);
|
|
|
+ // }
|
|
|
+ if(param.data.value){
|
|
|
+ let args = {
|
|
|
+ fileName: param.data.name,
|
|
|
+ fileUrl: param.data.value
|
|
|
+ } //当前节点及其子节点的值
|
|
|
+ let level = param.data.level; //当前节点的层级 eg:"1-1-0",可以通过level判断当前的层级,从而进行不同的操作
|
|
|
+ that.preview (args);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ myChart.hideLoading();
|
|
|
+ that.loading = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1725,15 +1725,15 @@ export default {
|
|
|
left: 530px;
|
|
|
top: -100px;
|
|
|
width: 200px;
|
|
|
- }
|
|
|
- .icore-graphical-index {
|
|
|
- display: inline-block;
|
|
|
- height: inherit;
|
|
|
- width: inherit;
|
|
|
- .icore-graphical-area {
|
|
|
- height: 100%;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .icore-graphical-index {
|
|
|
+ display: inline-block;
|
|
|
+ height: inherit;
|
|
|
+ width: inherit;
|
|
|
+ .icore-graphical-area {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|