fixed headers issue of cost file in admin UI

pull/19/MERGE
13621160019@163.com 2021-03-17 11:34:16 +08:00
parent b99d251e4c
commit 409617ff75
1 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,17 @@
'use strict'; 'use strict';
app.controller('CostFileController', function ($scope, $common, $cookies, $translate, $uibModal, $interval, CostFileService, toaster, SweetAlert) { app.controller('CostFileController', function (
$scope,
$window,
$common,
$translate,
$uibModal,
$interval,
CostFileService,
toaster,
SweetAlert) {
$scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser"));
$scope.getAllCostFiles = function () { $scope.getAllCostFiles = function () {
CostFileService.getAllCostFiles(function (error, data) { CostFileService.getAllCostFiles(function (error, data) {
@ -18,7 +29,7 @@ app.controller('CostFileController', function ($scope, $common, $cookies, $trans
acceptedFiles: '.xlsx', acceptedFiles: '.xlsx',
dictDefaultMessage: 'Click(or Drop) to add files', dictDefaultMessage: 'Click(or Drop) to add files',
maxFilesize: '100', maxFilesize: '100',
headers: { "User-UUID": $cookies.get("user_uuid"), "Token": $cookies.get("token") } headers: { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token }
}; };
$scope.dzCallbacks = { $scope.dzCallbacks = {