提交 2f05b64a 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

...@@ -52,6 +52,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -52,6 +52,7 @@ import CodeListService from "@/codelist/codelist-service";
import EntityService from '@/service/entity-service'; import EntityService from '@/service/entity-service';
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import moment from "moment";
@Component({ @Component({
}) })
...@@ -395,11 +396,11 @@ export default class AppDataUploadView extends Vue { ...@@ -395,11 +396,11 @@ export default class AppDataUploadView extends Vue {
let reader = new FileReader(); let reader = new FileReader();
reader.onload = (e:any) => { reader.onload = (e:any) => {
let data = e.target.result; let data = e.target.result;
this.workBookData = XLSX.read(data, {type: 'binary'}); this.workBookData = XLSX.read(data, {type: 'binary',cellDates: true});
let xlsxData = XLSX.utils.sheet_to_json(this.workBookData.Sheets[this.workBookData.SheetNames[0]]); let xlsxData = XLSX.utils.sheet_to_json(this.workBookData.Sheets[this.workBookData.SheetNames[0]]);
let list1 = this.getFirstRow(this.workBookData); let list1 = this.getFirstRow(this.workBookData);
xlsxData = this.AddXlsxData(xlsxData, list1); xlsxData = this.AddXlsxData(xlsxData, list1);
this.importDataArray = JSON.parse(JSON.stringify(xlsxData)); this.importDataArray = this.$util.deepCopy(xlsxData);
(this.$refs.inputUpLoad as any).value = ''; (this.$refs.inputUpLoad as any).value = '';
}; };
reader.readAsBinaryString(f); reader.readAsBinaryString(f);
...@@ -505,6 +506,11 @@ export default class AppDataUploadView extends Vue { ...@@ -505,6 +506,11 @@ export default class AppDataUploadView extends Vue {
data.forEach((item:any) =>{ data.forEach((item:any) =>{
let curObject:any = {}; let curObject:any = {};
Object.keys(item).forEach((ele:any) => { Object.keys(item).forEach((ele:any) => {
// todo XLSX读取时间为国际时间(东8区)+8H转为标准时间
if (item[ele] instanceof Date){
const tempDate:Date = item[ele];
item[ele] = moment(tempDate).add(8, 'h').format("YYYY-MM-DD HH:mm:ss");
}
if(this.allFieldMap.get(ele).codelist){ if(this.allFieldMap.get(ele).codelist){
let codelistTag:string = this.allFieldMap.get(ele).codelist.tag; let codelistTag:string = this.allFieldMap.get(ele).codelist.tag;
let codelistIsNumber:boolean = this.allFieldMap.get(ele).codelist.isnumber; let codelistIsNumber:boolean = this.allFieldMap.get(ele).codelist.isnumber;
......
...@@ -84,13 +84,12 @@ ...@@ -84,13 +84,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {Vue, Component, Prop, Model, Emit} from "vue-property-decorator"; import {Vue, Component, Prop, Model, Emit} from "vue-property-decorator";
import {Subject} from "rxjs"; import {Environment} from '@/environments/environment';
import {Environment} from '@/environments/environment'; import moment from 'moment';
import moment from 'moment';
@Component({}) @Component({})
export default class AppMessagePopover extends Vue { export default class AppMessagePopover extends Vue {
// 是否显示小圆点 // 是否显示小圆点
public showIsDot: any = false; public showIsDot: any = false;
...@@ -118,6 +117,9 @@ ...@@ -118,6 +117,9 @@
* vue挂载 * vue挂载
*/ */
mounted(): void { mounted(): void {
if(!Environment.workflow){
return;
}
// 首次获取待办列表 // 首次获取待办列表
this.getMyTasks(); this.getMyTasks();
// 定时器:每隔1分钟重新获取待办列表 // 定时器:每隔1分钟重新获取待办列表
...@@ -217,7 +219,7 @@ ...@@ -217,7 +219,7 @@
this.msgShowCnt = this.myMsgs.length >= 10 ? 10 : this.myMsgs.length; this.msgShowCnt = this.myMsgs.length >= 10 ? 10 : this.myMsgs.length;
} }
} }
</script> </script>
<style lang='less'> <style lang='less'>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
:filterable="filterable" :filterable="filterable"
@on-open-change="onClick" @on-open-change="onClick"
:placeholder="placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')"> :placeholder="placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value.toString()" :label="item.text"> <i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value ? item.value.toString():''" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true"> <Checkbox :value="(currentVal.indexOf(item.value ? item.value.toString() : '')) == -1 ? false : true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}} {{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</Checkbox> </Checkbox>
</i-option> </i-option>
......
...@@ -394,7 +394,9 @@ export default class DropDownList extends Vue { ...@@ -394,7 +394,9 @@ export default class DropDownList extends Vue {
if(type === 'number'){ if(type === 'number'){
item.value = item.value.toString(); item.value = item.value.toString();
}else{ }else{
if(item.value.indexOf('.') == -1){ if(type == "null") {
this.valueType == "number" ? item.value = 0 : item.value = '';
}else if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value); item.value = parseInt(item.value);
}else{ }else{
item.value = parseFloat(item.value); item.value = parseFloat(item.value);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册