|
@@ -2,7 +2,7 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-12-04 14:23:58
|
|
|
* @LastEditors : yuanrunwei
|
|
|
- * @LastEditTime : 2021-12-28 18:25:07
|
|
|
+ * @LastEditTime : 2021-12-28 20:20:48
|
|
|
* @FilePath : \spfm-market-front\src\pages\main\performance\components\sheet.vue
|
|
|
-->
|
|
|
|
|
@@ -201,13 +201,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleAllow({ row, column }) {
|
|
|
- console.log(
|
|
|
- row,
|
|
|
- this.row_list,
|
|
|
- column,
|
|
|
- this.column_list,
|
|
|
- this.row_list.includes(row) && this.column_list.includes(column)
|
|
|
- );
|
|
|
return (
|
|
|
this.row_list.includes(row) && this.column_list.includes(column)
|
|
|
);
|
|
@@ -254,7 +247,9 @@ export default {
|
|
|
this.form = {
|
|
|
...this.form,
|
|
|
type: JSON.parse(type),
|
|
|
- array: allowEditingColumns.split(","),
|
|
|
+ array: allowEditingColumns
|
|
|
+ ? allowEditingColumns.split(",")
|
|
|
+ : [],
|
|
|
charge: list.map(
|
|
|
({ principalId, principalName, rowNum }) => ({
|
|
|
value: `${principalId},${principalName}`,
|
|
@@ -276,7 +271,7 @@ export default {
|
|
|
: [];
|
|
|
}
|
|
|
this.handleCreate({
|
|
|
- json: JSON.parse(templateContent),
|
|
|
+ json: templateContent ? JSON.parse(templateContent) : {},
|
|
|
name: templateName,
|
|
|
type: "json",
|
|
|
});
|
|
@@ -358,6 +353,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
window.luckysheet.create(options);
|
|
|
+ let clock = setInterval(() => {
|
|
|
+ if (window.luckysheet) {
|
|
|
+ window.luckysheet.refresh();
|
|
|
+ clearInterval(clock);
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
},
|
|
|
async handleChange(response) {
|
|
|
this.handleCreate({ file: response.raw, type: "file" });
|