예제 #1
0
        /// <summary>
        /// 复制sheet
        /// </summary>
        /// <param name="requestMsg">请求信息</param>
        /// <param name="gridKey">execl文档key</param>
        /// <returns></returns>
        private static async Task Operation_Shc(JObject requestMsg, string gridKey)
        {
            // 请求信息
            var jObject    = requestMsg.Value <JObject>();
            var i          = jObject.Value <string>("i");
            var v          = jObject.Value <JObject>("v");
            var vCopyIndex = v.Value <int>("copyindex");
            var vName      = v.Value <string>("name");

            // sheet页
            var sheetList = await SheetService.GetSheets(gridKey);

            var sheetModel = sheetList.ToList()[vCopyIndex];
            var sheet      = (JObject)sheetModel.json_data;

            sheet["index"] = i;
            sheet["name"]  = vName;

            // 提交修改
            await SheetService.AddSheet(gridKey, i, sheet.ToJson(), sheetModel.status, sheetModel.order, sheetModel.is_delete);
        }